diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1052 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1052')
182 files changed, 3635 insertions, 0 deletions
diff --git a/1052/CH10/EX10.1/101.sce b/1052/CH10/EX10.1/101.sce new file mode 100755 index 000000000..083f1e9cf --- /dev/null +++ b/1052/CH10/EX10.1/101.sce @@ -0,0 +1,15 @@ +clc;
+//Example 10.1
+//page no 98
+printf("Example 10.1 pagr no. 98\n\n");
+// in a column of liquid
+h=2.493//height of the liquid (mercury) column
+rho=848.7//density of mercury
+P_at=2116//atmospheric pressure
+printf("\n height of mercury h=%f ft\n density of mercury rho=%f lb/ft^3\n atmospheric pressure P_at=%f psf ",h,rho,P_at);
+//refer to equation 10.5
+g=9.8
+g_c=9.8
+P=rho*(g/g_c)*h//gauge pressure
+P_ab=round(P+P_at)//absolute pressure
+printf("gauge pressure P=%f psf\n absolute pressure P_ab=%f psf",P,P_ab);
diff --git a/1052/CH10/EX10.2/2.sce b/1052/CH10/EX10.2/2.sce new file mode 100755 index 000000000..ae6e3cdba --- /dev/null +++ b/1052/CH10/EX10.2/2.sce @@ -0,0 +1,13 @@ +clc;
+//Example 10.2
+//page no 99
+printf("Example 10.2 page no 99\n\n");
+//determining the depth of atlantic ocean
+rho=1000//density of water
+P1=10//pressure at which depth is to be determine
+P2=1//pressure at the ocean surface z1
+z1=0//ocean surface
+g=9.807//gravitational constant
+printf("\n density rho=%f kg/m^3\n pressure P1=%f atm\n pressure P2=%f atm\n height at ocean surface z1=%f m",rho,P1,P2,z1);
+z2=z1-(P1-P2)*101325/(rho*g)//depth at pressure P2
+printf(" \n depth z2=%f m",z2);
diff --git a/1052/CH10/EX10.3/103.sce b/1052/CH10/EX10.3/103.sce new file mode 100755 index 000000000..c0df53c80 --- /dev/null +++ b/1052/CH10/EX10.3/103.sce @@ -0,0 +1,31 @@ +clc;
+//Example 10.3
+//page no 99 fig 10.1
+printf("Example 10.3 page no 99 fig 10.1\n\n\n");
+//a cylindrical tank contain water and immiscible oil ,tank isvopen to the atmosphere
+rho=1000//density of water
+SG=0.89//special gravity of oil
+rho_oil=rho*SG//density of oil
+printf("\ density of water rho=%f kg/m^3\n density of oil rho_oil=%f kg/m^3",rho,rho_oil);
+//applying bernoulli equationbetween point 1 and 2 to calculate the gauge pressure at water oil interface
+z1=0//depth at surface
+P1=1//pressure at point 1
+z2=-10.98//depth at point 2
+printf("\n depth at point 1, z1=%f m\n pressure P1=%f atm\n depth at point 2,z2=%f m",z1,P1,z2);
+g=9.807//gravitational constant
+P2_gu=rho_oil*g*(z1-z2)//gauge pressure at point 2
+printf("\n gauge pressure P2_gu=%f Pag",P2_gu);
+//gauge preesure at bottom z3
+z3=-13.72
+P3=P2_gu+rho*g*(z2-z3)
+printf("\n depth z3=%f m\n pressure at bottom P3=%f Pag",z3,P3);
+d=6.1//diameter of tank
+s=%pi*d^2/4//surface area of tank
+printf("\n diameter of tank d=%f m\n surface area of tank s=%f m^2",d,s);
+P3_ab=P3+101325//absolute pressure
+F=P3_ab*s//pressure force at the bottom of tank
+printf("\n absolute pressure P3_ab=%f Pag\n pressure force at bottom F=%f N",P3_ab,F);
+//the force on the side of the tank ,within water layer
+F_s=(%pi*d)*integrate('-11910-9807*z','z',-13.72,-10.98);
+printf("\n force on the side of the tank F_s=%f N",F_s);
+
diff --git a/1052/CH10/EX10.4/104.sce b/1052/CH10/EX10.4/104.sce new file mode 100755 index 000000000..107497aea --- /dev/null +++ b/1052/CH10/EX10.4/104.sce @@ -0,0 +1,15 @@ +clc;
+//Example 10.4
+//page no 102
+printf(" Example 10.4 page n0 102 \n\n");
+W_a=200//weight of material in air
+W_w=120//weight of material in water
+gamma_w=62.4//specific weight of water
+printf("\n weight of air W_a=%f lbf\n weight of water W_w=%f lbf\n sp.weight of water gamma_w=%f lbf/ft^3",W_a,W_w,gamma_w);
+F_b=W_a-W_w//buoyant force\
+printf("\nbuoyant force F_b=%f lbf",F_b);
+V_dis=F_b/gamma_w//volume displaced
+printf("\n volume displaced V_dis=%f ft^3",V_dis);
+rho_b=W_a/V_dis//density of block
+printf("\n density of block rho_b=%f lb/ft^3",rho_b);//printing mistake in book
+//assumption of rho_b>rho_w is justified
diff --git a/1052/CH10/EX10.5/5.sce b/1052/CH10/EX10.5/5.sce new file mode 100755 index 000000000..d0ee7a283 --- /dev/null +++ b/1052/CH10/EX10.5/5.sce @@ -0,0 +1,14 @@ +clc;
+//Example 10.5
+//page no 103
+printf("\n Example 10.5 page no 103\n\n");
+//a hydrometer is a liquid specific gravity indicator with the value being indicated by the level at which the surface of the liquid intersects the sten when floating in avliquid
+F=0.13//the total hydrometer weight, N
+SG=1.3//sp. gravity of liquid
+D=.008//stem diameter of hydrometer,m
+rho_w=1000//density of water ,kg/m^3
+g=9.807
+pi=22/7
+printf("\n force F=%f N\n sp.gravity SG=%f \n stem diameter D=%f m\n density rho_w=%f kg/m^3\n g=ravitational acc. g=%f m/s^2",F,SG,D,rho_w,g);
+h=(4*F/(pi*D^2*rho_w*g))*(1-1/SG)//height where it will float
+printf("\n height h=%f m",h);
diff --git a/1052/CH10/EX10.6/106.sce b/1052/CH10/EX10.6/106.sce new file mode 100755 index 000000000..1ef781cfa --- /dev/null +++ b/1052/CH10/EX10.6/106.sce @@ -0,0 +1,21 @@ +clc;
+// Example 10.6
+//page no 105 fig. 10.3
+printf("\n Example 10.6 page no 105 fig. 10.3\n\n\n");
+// since the density of air is effectively zero,the contribution of air to the 3 ft. manometer can be neglected
+//the contribution due to the carbon tetrachloride can be found by using the hydrostatic equation
+rho=62.3//density of water
+SG=1.4///specific gravity of ccl4
+h=3//height in manometer
+P=rho*SG*h/144//factor 144 for psf to psi
+printf(" \n pressure P=%f psi",P);
+P_r=14.7//the right leg of manometer is open to atmosphere,atmospheric pressure at this point
+//contribution to the prssure due to the height of water above pressure gauge
+P_w=rho*h/144
+printf("\n pressure at right leg P_r=%f psia\n pressure due to water height P_w=%f psi",P_r,P_w);
+P_a=P_r-P+P_w//absolute pressure
+P_g=P_a-14.7//gauge pressure
+printf("\n absolute pressure P_a=%f psia\n gauge pressure P_g=%f psig",P_a,P_g);
+P_af=P_a*144
+P_gf=round(P_g*144)
+printf("\npressure in psfa P_af=%f psfa\n pressure in psfg P_gf=%f psfg",P_af,P_gf);
diff --git a/1052/CH11/EX11.2/112.sce b/1052/CH11/EX11.2/112.sce new file mode 100755 index 000000000..6f3b218e2 --- /dev/null +++ b/1052/CH11/EX11.2/112.sce @@ -0,0 +1,15 @@ +clc;
+//Example 11.2
+//Page no. 113
+printf("Example 11.2-Page no.113\n\n")
+//given
+//Pressure(P),Temp.(T),Molecular wt. of gas(M)
+P=1//atm
+T_d=60//degree F
+M=29//gram
+//Gas constant R
+R=.73
+T=T_d+460// rankin
+//density of gaS
+rho=(P*M)/(R*T)
+printf("density of gas rho =%flb/ft^3",rho)
diff --git a/1052/CH11/EX11.3/113.sce b/1052/CH11/EX11.3/113.sce new file mode 100755 index 000000000..f830aa86e --- /dev/null +++ b/1052/CH11/EX11.3/113.sce @@ -0,0 +1,15 @@ +clc
+//Example 11.3
+//Page no. 114
+printf("Example 11.3-Page no. 114\n\n")
+//given
+//standard volumetric flowrate of a gas stream(Qs),standard conditions,actual conditions
+ Qs=2000//scfm
+ Ps=1//atm
+ Ts=60//degree F
+ Pa=1//atm
+ Ta=700//degree F
+Ta=Ta+460//rankin
+Ts=Ts+460//rankin
+ Qa=Qs*(Ta/Ts)*(Ps/Pa)
+printf("actual volumetric flowrate Qa=%f acfm",Qa)
diff --git a/1052/CH11/EX11.4/114.sce b/1052/CH11/EX11.4/114.sce new file mode 100755 index 000000000..c6963d0aa --- /dev/null +++ b/1052/CH11/EX11.4/114.sce @@ -0,0 +1,14 @@ +clc
+//Example 11.4
+//Page no. 115
+printf("Example 11.4-Page no. 115\n\n")
+//given
+//mass flowrate of flue gas ,average moleculer weight flue gas,standard conditions
+ m=50//lb/min
+ M=29//lb/lbmol
+ Ts=60//degree F
+ Ps=1//atm
+ R=0.73//atm.ft^3/(lbmol.degree R)
+ Ts=Ts+460//rankin
+ Qs=(m/M)*(R*Ts/Ps)
+ printf("standard volumetric flowrate Qs=%f scfm",Qs)
diff --git a/1052/CH11/EX11.5/115.sce b/1052/CH11/EX11.5/115.sce new file mode 100755 index 000000000..a370d96bc --- /dev/null +++ b/1052/CH11/EX11.5/115.sce @@ -0,0 +1,13 @@ +clc
+//Example 11.5
+//Page no. 116
+printf("Example 11.5-Page no.1 116\n\n")
+//given
+//specific volume(V),temperature(T),pressure(P)
+V=12.084//ft^3/lb
+T=70//degree F
+P=1//atm
+R=0.73
+T=T+460//rankin
+Mw=(R*T)/(P*V)
+printf("molecular weight of gas Mw=%f",Mw)
diff --git a/1052/CH11/EX11.6/116.sce b/1052/CH11/EX11.6/116.sce new file mode 100755 index 000000000..a3c78492f --- /dev/null +++ b/1052/CH11/EX11.6/116.sce @@ -0,0 +1,15 @@ +clc;
+//Example 11.6
+//page no 118
+printf("Example 11.6 page no 118\n\n");
+clear;
+//first and second viral coeff.
+B=-0.159//m^3/kgmol
+C=0.009//(m^3/kgmol)^2
+V_new=0
+V=0.820;
+for i=1:3
+ V_new=(1+(B)/V+(C)/(V^2))/1.22
+ V=V_new
+end
+printf("\nVolume of gas V=%f L/gmol",V)
diff --git a/1052/CH11/EX11.7/117.sce b/1052/CH11/EX11.7/117.sce new file mode 100755 index 000000000..3a12cd6db --- /dev/null +++ b/1052/CH11/EX11.7/117.sce @@ -0,0 +1,18 @@ +clc;
+//Example 11.7
+//page no 118
+printf("Example 11.7 page no 118\n\n");
+//given
+T_c=343// critical temperature,deg R
+P_c=45.4//critical pressure,atm
+//emplying redlich kwong (R-K)equation
+R=0.73//gas constant
+a=round(0.42748*R^2*T_c^2.5/P_c)//R-k constant
+b=0.08664*R*T_c/P_c//R-k constant
+ // V_new=[[490/(V-b)]-[a/(25.9*V*V+b)]]/10
+ // V=V_new
+//by trial and error method
+V=48.8
+printf("\n Volume V=%f ft^3/lbmol ",V);
+
+
diff --git a/1052/CH12/EX12.1/121.sce b/1052/CH12/EX12.1/121.sce new file mode 100755 index 000000000..fdb0e116a --- /dev/null +++ b/1052/CH12/EX12.1/121.sce @@ -0,0 +1,21 @@ +clc;
+//Example 12.1
+//page no 124
+printf("Example 12.1 page no 124\n\n");
+T_i=660//temperature of flue at inlet in furnsce
+D_1=6//inside diameter of pipe,ft
+v_1=25//velocity at inlet
+printf("\n temperature at inlet T_i=%f k\n diameter at inlet D_1=%f ft\n velocity at inlet v_1=%f ft/s",T_i,D_1,v_1);
+A_1=%pi/4*D_1^2;
+q_1=A_1*v_1//volumatric flow rate at inlet
+printf ("\n area at ilet A_1=%f st^2\n volumatric flow rate at inlet q_1=%f ft^3/s",A_1,q_1);
+//applying charle's law for volumatic flow out of the scrubber
+//given
+T_2=2360//the temperature up to which furnace heats the gas
+v_2=40//velocity of flow at outlet
+printf("\n temperature T_2=%f k\n velocity of flow at outlet v_2=%f ft/s",T_2,v_2);
+q_2=q_1*(T_2/T_i)//volumatric flow rate at outlet
+A_2=q_2/v_2// cross sectional area at outlet duct
+printf("\n volumatric flow rate at outlet q_2=%f ft^3/s\n cross sectional area at outlet A_2=%f ft^2 ",q_2,A_2);
+D_2=sqrt(4*A_2/%pi)//diameter at outlet
+printf("\n diameter at outlet D_2=%f ft ",D_2);
diff --git a/1052/CH12/EX12.2/122.sce b/1052/CH12/EX12.2/122.sce new file mode 100755 index 000000000..dbfab1d9f --- /dev/null +++ b/1052/CH12/EX12.2/122.sce @@ -0,0 +1,12 @@ +clc;
+//Example 12.2
+//page no 125
+printf("Example 12.2 page no 125\n\n");
+//to calculate reynolds number
+L=2.54//diameter of tube in cm
+rho=1.50//density of liquid in gm/cm^3
+v=20//velocity of flow in cm/s
+meu=0.78e-2//viscosity of liquid in g/cm*s
+printf("\n diameter of tube L=%f cm\n density rho=%f gm/cm^3\n velocity v=%f cm/s\n viscosity meu=%f g/cm*s",L,rho,v,meu);
+R_e=L*rho*v/meu//reynolds number
+printf("\n Reynolds no. R_e=%f ",R_e);
diff --git a/1052/CH12/EX12.3/123.sce b/1052/CH12/EX12.3/123.sce new file mode 100755 index 000000000..820cb4690 --- /dev/null +++ b/1052/CH12/EX12.3/123.sce @@ -0,0 +1,12 @@ +clc;
+//Example 12.3
+//page no 126
+printf("\n Example 12.3 page no 126\n\n");
+//to determine the teynolds no of a gas stream
+v=3.8//velocity through the duct
+D=0.45//duct diameter
+rho=1.2//density of gas
+meu=1.73e-5//viscosity of gas
+printf("\n velocity v=%f m/s\n diameter D=%f m\n density rho=%f kg/m^3\n viscosity meu=%f kg/m*s",v,D,rho,meu);
+R_e=D*v*rho/meu//reynolds no
+printf("\n reynoldsno R_e=%f ",R_e);
diff --git a/1052/CH12/EX12.5/125.sce b/1052/CH12/EX12.5/125.sce new file mode 100755 index 000000000..7d868812b --- /dev/null +++ b/1052/CH12/EX12.5/125.sce @@ -0,0 +1,16 @@ +clc;
+//Example 12.5
+//page no 128
+printf(" Example 12.5 page no 128\n\n");
+SG=0.96//sp.gravity of a liquid
+R=0.03//radius of long circular tube through which liquid flow
+//flow rate is related with the diameter of circular tube
+q=2*%pi*(3*R^2-(200/3)*R^3);
+printf("\n volumatric flow rate q=%f m^3/s",q);
+rho_w=1000//density of water
+rho_l=SG*rho_w//density of liquid
+m_dot=rho_l*q//mass flow rate
+printf("\n mass flow rate m_dot=%f kg/s",m_dot);
+s=%pi*R^2//surface area
+v_av=q/s//average velocity
+printf("\n average velocity v_av=%f m/s",v_av);
diff --git a/1052/CH12/EX12.6/126.sce b/1052/CH12/EX12.6/126.sce new file mode 100755 index 000000000..34313347c --- /dev/null +++ b/1052/CH12/EX12.6/126.sce @@ -0,0 +1,9 @@ +clc;
+//Example 12.6
+//page no 129
+printf("Example 12.6 page no 129\n\n");
+//refer to example 12.6
+V=20//volume of liquid passes through the section,m^3
+q=0.00565//volumatric flow rate
+t=V/q//time to pass liquid pass through volume V
+printf("\n time t=%f s",t);
diff --git a/1052/CH12/EX12.7/127.sce b/1052/CH12/EX12.7/127.sce new file mode 100755 index 000000000..b8250b445 --- /dev/null +++ b/1052/CH12/EX12.7/127.sce @@ -0,0 +1,31 @@ +clc;
+//Example 12.7
+//page no 130
+printf("Example 12.7 page no. 130\n\n");
+//a gas is flowing through a circular duct
+D=1.2//diameter of duct,ft
+T=760//temperature,k
+P=1//pressure
+T_s=520//standard temperature
+P_s=1//standard pressure
+q_s=1000// standard volumatric flow rate,in scfm(given)
+q=q_s*(T/T_s)*(P/P_s)//actual volumatric flow rate
+printf("\n actual volumatric flow rate q=%f acfm ",q);
+s=%pi*D^2/4//cross sectional area
+s_m=s*0.0929//area in m^2
+v=(q/s)/60//velocity
+printf("\n average velocity v=%f ft/s",v);
+MW=33//mlecular weight of gas
+R=0.7302//gas constant
+rho=(P*MW)/(R*T)//density from ideal gas law
+printf("\n density rho=%f lb/ft^3",rho);
+m_dot=rho*v*s_m//mass flow rate
+printf("\n mass flow rate m_dot=%f lb/s",m_dot);//printing mistake in book
+D_m=0.366//diamter in m
+v_m=6.55//velocity in m/s
+rho_m=rho*(0.4536/.3048^3)//density in kg/m^3
+rho_m=0.952//round off value
+printf("\nv_m=%f",v_m);
+meu=2.2e-5//viscosity of gas in
+R_e=D_m*v_m*rho_m/meu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);//calculation error in book
diff --git a/1052/CH13/EX13.1/131.sce b/1052/CH13/EX13.1/131.sce new file mode 100755 index 000000000..e25505f58 --- /dev/null +++ b/1052/CH13/EX13.1/131.sce @@ -0,0 +1,24 @@ +clc;
+//Example 13.1
+//page no 136
+printf("Example 13.1 page no 136\n\n");
+//calculate average velocities for which th flow will be viscous,laminar
+//(a) water at 60 deg F in a 2-inch standard pipe
+R_e=2100//reynolds number <2100, for laminar flow
+meu_w=6.72e-4//viscosity of water,lb/ft.s
+rho_w=62.4//density of water,lb/ft^3
+D_w=2.067//diameter of pipe,ft
+v_w=(R_e*meu_w)/((D_w/12)*rho_w)//velocity of water
+printf("\n velocity v_w=%f ft/s",v_w);
+//(b) air at 60 deg F and 5 psig in a 2 inch standard pipe
+meu_a=12.1e-6//viscosity of air ,lb/ft.s
+rho_a=.1024// density of air,lb/ft^3
+D_a=0.17225//diameter of pipe ,ft
+v_a=(R_e*meu_a)/(D_a*rho_a)//velocity of air
+printf("\n velocity of air v_a=%f ft/s",v_a);
+//(c) oil of a viscosity of 300 cP and SG of .92 in a 4 inch standard pipe
+meu_o=300*6.72e-4//viscosity of oil ,lb/ft.s
+rho_o=0.92*62.4//density of oil, lb/ft^3
+D_o=.3355//diameter of pipe,ft
+v_o=round((R_e*meu_o)/(D_o*rho_o))//velocity of oil
+printf("\n velocity of oil v_o=%f ft/s",v_o);
diff --git a/1052/CH13/EX13.2/132.sce b/1052/CH13/EX13.2/132.sce new file mode 100755 index 000000000..b8d524eb9 --- /dev/null +++ b/1052/CH13/EX13.2/132.sce @@ -0,0 +1,11 @@ +clc;
+//Example 13.2
+//page no 137
+printf(" Example 13.2 page no 137\n\n");
+//refer to part a of example 1
+//appplying Hagen-Poiseuille equation
+meu=6.72e-4//viscosity of water
+v=0.13//velocity of water
+D=2.067/12//diameter of pipe
+P_l=32*meu*v/(D^2)
+printf("\n pressure drop per unit length P_l=%f psf/ft",P_l);
diff --git a/1052/CH13/EX13.4/134.sce b/1052/CH13/EX13.4/134.sce new file mode 100755 index 000000000..e1376b86d --- /dev/null +++ b/1052/CH13/EX13.4/134.sce @@ -0,0 +1,13 @@ +clc;
+//Example 13.4
+//page no 138
+printf(" Example 13.4 page no 138\n\n ");
+//an air conducting duct has a rectangular cross section
+w=1//width of rectangular section
+h=0.25//height of rectangular section
+D=2*w*h/(w+h)//equivalent or hydraulic diameter
+printf("\n hydraulic diameter D=%f m",D)
+R_e=2300//critical reynolds no
+neu=1e-5//kinematic viscosity of air
+v=R_e*neu/D//velocity
+printf("\n velocity of air v=%f m/s",v);
diff --git a/1052/CH13/EX13.5/135.sce b/1052/CH13/EX13.5/135.sce new file mode 100755 index 000000000..59184f7cb --- /dev/null +++ b/1052/CH13/EX13.5/135.sce @@ -0,0 +1,23 @@ +clc;
+//Example 13.5
+//page no 139
+printf(" Example 13.5 page no 139\n\n");
+//a circulsr horizontal tube cntains asphalt
+D=0.1667//diameter of tube,ft
+s=%pi*D^2/4//surface area of tube,ft^2
+q=0.486//volumatric flow rate,ft^3/s
+v=q/s//flow velocity
+printf("flow velocity v=%f ft/s",v);
+g=32.174
+P_grad=144//pressure gradient ,psf/ft
+meu=(%pi*P_grad*g*D^4)/(128*q)//dynamic viscosity,laminar flow
+printf("\n dynamic viscosity meu=%f lb/ft.s",meu);
+//check on the laminar flow
+rho=70//density,lb/ft^3
+R_e=D*v*rho/meu//reynlods number
+printf("\n reynolds no R_e=%f ",R_e);
+f=16/R_e//fanning friction factor
+printf("\n friction factor f=%f ",f);
+//the pipe must be longer than the entrance length to have fully developed flow
+L_e=0.05*D*R_e//entrance length
+printf("\n entance length L_e=%f ft",L_e);
diff --git a/1052/CH13/EX13.6/136.sce b/1052/CH13/EX13.6/136.sce new file mode 100755 index 000000000..bede02cc5 --- /dev/null +++ b/1052/CH13/EX13.6/136.sce @@ -0,0 +1,19 @@ + clc;
+//Example 13.6
+//page no 140
+printf(" Example 13.6 page no 140\n\n");
+//liquid glycerin flows in a tube
+//to obtain the properties of glycerine use table A.2 in the appendix
+rho=1260//density,kg/m^3
+meu=1.49//viscosity,kg/ms
+neu=meu/rho//kinematic viscosity,m^2/s
+R=0.02//by no slip condition radius of tube,m
+q=32*%pi*integrate('r-2500*r^3','r',0,R);//volumatric flow rate from the given parabolic velocity distribution
+printf("vol. flow rate q=%f m^3/s",q);
+r=0//for average velocity for laminar flow
+v_av=16*(1-2500*r^2)/2//average velocity
+q=0.010//approximation
+m_dot=q*rho//mass flow rate
+G=rho*v_av//mass flux
+M_dot=m_dot*v_av//inear momentum flux
+printf("\n av. velocity v_av=%f m/s\n mass flow rate m_dot=%f kg/s\n mass flux G=%f kg/m^2.s\n linear mometum flux M_dot=%f N ",v_av,m_dot,G,M_dot);
diff --git a/1052/CH13/EX13.7/137.sce b/1052/CH13/EX13.7/137.sce new file mode 100755 index 000000000..ca5ce5b95 --- /dev/null +++ b/1052/CH13/EX13.7/137.sce @@ -0,0 +1,15 @@ +clc;
+//Example 13.7
+//page no 142
+printf("Example 13.7 page no 142\n\n");
+//refer to example 13.6
+rho=1260//density,kg/m^3
+v=8//flow velocity,m^2/s
+D=0.02//diameter,m
+meu=1.49//viscosity
+R_e=rho*v*D/meu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+V=14000//volume in gallons of glycerine pass through a cross section of tube
+q=159.6//flow rate
+t=V/q//time
+printf("\n time t=%f min",t);
diff --git a/1052/CH14/EX14.1/141.sce b/1052/CH14/EX14.1/141.sce new file mode 100755 index 000000000..76d35fd47 --- /dev/null +++ b/1052/CH14/EX14.1/141.sce @@ -0,0 +1,11 @@ +clc;
+//Example 14.1
+//page no 148
+printf("Example 14.1 page no 148\n\n");
+//a liquid flow through a tube
+meu=0.78e-2//viscosity of liquid,g/cm*s
+rho=1.50//density,g/cm^3
+D=2.54//diameter,cm
+v=20//flow velocity
+R_e=D*v*rho/meu//reynolds no
+printf("\n Reynolds no R_e=%f ",R_e);
diff --git a/1052/CH14/EX14.10/1410.sce b/1052/CH14/EX14.10/1410.sce new file mode 100755 index 000000000..afc12be9d --- /dev/null +++ b/1052/CH14/EX14.10/1410.sce @@ -0,0 +1,26 @@ +clc;
+//Example 14.10
+//page no 163
+printf("Example 14.10 page no 163\n\n");
+//a fluid is moving in the turbulent flw through a pipe
+// a hot wire anemometer is inserted to measure the local velocity at a given point P in the system
+//following readings were recorded at equal time interval
+//instantaneous velocities at subsequent time interval
+vz=[43.4,42.1,42,40.8,38.5,37,37.5,38,39,41.7]
+vz_bar=0;
+n=10;
+i = 0;
+sums=0;
+for i = 1:10
+ sums=sums+vz(i);
+end
+vz_bar=sums/n;
+printf("\n vz_bar=%f",vz_bar);
+sigma=0;
+for i=1:10
+ sigma=sigma+(vz(i)-vz_bar)^2;
+ vz_sqr=sigma/10;
+end
+printf("\n vz_sqr=%f",vz_sqr)
+I = sqrt(vz_sqr)/vz_bar//intensity of turbulance
+printf("\n intensity of turbulance I=%f ",I);
diff --git a/1052/CH14/EX14.11/1411.sce b/1052/CH14/EX14.11/1411.sce new file mode 100755 index 000000000..0f258c4a4 --- /dev/null +++ b/1052/CH14/EX14.11/1411.sce @@ -0,0 +1,20 @@ +clc;
+//Example 14.11
+//page no 164
+printf("Example 14.11 page no 164\n\n");
+//a fluid is flowing through a pipe
+D=2//inside diameter of pipe,in
+v_max=30//maximum velocity,ft/min
+A=(%pi/4)*(D/12)^2//cross sectional area
+//(a) for laminar flow
+v_a=(1/2)*v_max//average velocity
+q_a=v_a*A//volumatric flow rate
+printf("\n flow rate q_a=%f ft^3/min",q_a);
+//(b) for plug flow
+v_b=v_max//average velocity
+q_b=v_b*A//volumatric flow rate
+printf(" \nflow rate q_b=%f ft^3/min",q_b);
+//(c)for turbulent flow
+v_c=(49/60)*v_max//average velocity
+q_c=v_c*A//volumatric flow rate
+printf("\n flow rate q_c=%f ft^3/min",q_c);
diff --git a/1052/CH14/EX14.2/142.sce b/1052/CH14/EX14.2/142.sce new file mode 100755 index 000000000..d5570500b --- /dev/null +++ b/1052/CH14/EX14.2/142.sce @@ -0,0 +1,11 @@ +clc;
+//Example 14.2
+//page no 148
+printf("Example 14.2 page no 148\n\n");
+//a fluid is moving through a cylinder in laminar flow
+meu=6.9216e-4//viscosity of fluid,lb/ft*s
+rho=62.4//density,lb/ft^3
+D=1/12//diameter,ft
+R_e=2100//reynolds no
+v=R_e*meu/(D*rho)//minimum velocity at which turbulance will appear
+printf("\n velocity v=%f ft/s",v);
diff --git a/1052/CH14/EX14.3/143.sce b/1052/CH14/EX14.3/143.sce new file mode 100755 index 000000000..504d620a3 --- /dev/null +++ b/1052/CH14/EX14.3/143.sce @@ -0,0 +1,26 @@ +clc;
+//Example 14.3
+//page no 152
+printf("Example 14.3 page no 152\n\n");
+//calculate the friction factor by using different equation's
+R_e=14080//reynolds no
+K_r=0.004//relative roughness
+//(a) by PAT proposed equation
+f_a=0.0015+[8*(R_e)^0.30]^-1
+printf("\n fanning friction factor f_a=%f ",f_a);
+//equation for 5000<R_e>50000
+f_b1=0.0786/(R_e)^0.25
+printf("\n friction factor f_b1=%f ",f_b1);
+// equation for 30000<R_e>1000000
+f_b2=0.046/(R_e)^0.20
+printf("\n friction factor f_b2=%f ",f_b2);
+// equation for the completely turbulent region
+f_c=1/[4*(1.14-2*log10(K_r))^2]
+printf("\n friction factor f_c=%f ",f_c);
+//equation given by jain
+f_d=1/[2.28-4*log10(K_r+21.25/(R_e^.9))]^2
+printf("\n friction factor f_d=%f ",f_d);
+f_e=0.0085 //from figur 14.2
+printf("\n friction factor f_e=%f",f_e);
+f_av=(f_a+f_b1+f_b2+f_c+f_d+f_e)/6
+printf("\n average friction f_av=%f ",f_av);
diff --git a/1052/CH14/EX14.4/144.sce b/1052/CH14/EX14.4/144.sce new file mode 100755 index 000000000..a542f3930 --- /dev/null +++ b/1052/CH14/EX14.4/144.sce @@ -0,0 +1,25 @@ +clc;
+//Example 14.4
+//page no 154
+printf("Example 14.4 page no 154\n\n");
+//for turbulent fluid flow in across section
+//(a) for a rectangle
+w=2//width of a rectangle,in
+h=10//height of rectangle,in
+S_a=h*w//cross sectional area
+P_a=2*h+2*w//perimeter of rectangle
+D_eq_a=4*S_a/P_a//equivalent diameter
+printf("\n equivalent diameter D_eq_a=%f in",D_eq_a);
+//(b) for an annulus
+d_o=10//outer diameter of annulus
+d_i=8//inner diameter
+S_b=%pi*(d_o^2-d_i^2)/4//cross sectional area
+P_b=%pi*(d_o-d_i)//perimeter
+D_eq_b=(4*S_b)/(P_b)//eq. diameter
+printf("\n equivalent diameter D_eq_b=%f cm",D_eq_b);
+//(c) for an half- full circle
+d_c=10//diameter of circle
+S_c=%pi*d_c^2/8// cross sectional area
+P_c=%pi*d_c/2//perimeter
+D_eq_c=4*S_c/P_c//eq. diameter
+printf("\n equivalent diameter D_eq_c=%f cm",D_eq_c);
diff --git a/1052/CH14/EX14.5/145.sce b/1052/CH14/EX14.5/145.sce new file mode 100755 index 000000000..1a87f13a3 --- /dev/null +++ b/1052/CH14/EX14.5/145.sce @@ -0,0 +1,44 @@ +clc;
+//Exampkle 14.5
+//page no 157
+printf("Example 14.5 page no 157\n\n");
+//air is transported through a circular conduit
+MW=28.9//molecular weight of air
+R=10.73//gas constant
+T=500//temperature
+P=14.75//pressure,psia
+//applying ideal gas law for density
+rho=P*MW/(R*T)//density
+rho=0.08//after round off
+meu=3.54e-7//viscosity of air at 40 degF
+//assume flow is laminar
+q=8.33//flow rate ,ft^3/s
+L=800//length of pipe,ft
+P_1=.1//pressure at starting point
+P_2=.01//pressure at delivery point
+D=[(128*meu*L*q)/(%pi*(P_1-P_2)*144)]^(1/4)//diameter
+printf("\n pipe diameter D=%f ft",D);
+//check the flow type
+meu=1.14e-5
+R_e1=4*q*rho/(%pi*D*meu)//reynolds no
+//printf("\n reynolds no R_e=%f ",R_e);
+//from R_e we can conclude that laminar flow is not valid
+P_drop=12.96//pressure drop P_1-P2 in psf
+f=0.005//fanning friction factor
+g_c=32.174
+D=(32*rho*f*L*q^2/(g_c*%pi^2*P_drop))^(0.2)//diamter from new assumption
+//strat the second iteration with the newly calculated D
+k=0.00006/12//roughness factor
+K_r=k/D//relative roughness
+C_f=1.321224
+R_e_n=4*q*rho/(%pi*D*meu)//new reynolds no
+//printf("\n new reynolds no R_e=%f ",R_e);
+f_n=0.0045//new fanning friction factor
+D=[((8*rho*f_n*L*q^2)/(g_c*%pi^2*P_drop))^(0.2)]*C_f//final calculated diameter because last diameter is same with this
+printf("\nD=%f ",D);
+//iteration may now be terminated
+S=%pi*(D^2)/4//cross sectional area of pipe
+v=q/S//flow velocity
+printf("\n flow velocity v=%f ft/s",v);//printing mistake in book in the value of meu in the formula of D is first time that's why this deviation in answer
+
+
diff --git a/1052/CH14/EX14.6/146.sce b/1052/CH14/EX14.6/146.sce new file mode 100755 index 000000000..ad3d4ed6b --- /dev/null +++ b/1052/CH14/EX14.6/146.sce @@ -0,0 +1,25 @@ +clc;
+//Example 14.6
+//page no 159
+printf("Example 14.6 page no. 159\n\n");
+//ethyl alcohol is pumped through a horizontal tube
+rho=789//density .kg/m^3
+meu=1.1e-3//viscosity ,kg/m-s
+k=1.5e-6//roughness,m
+L=60//length of tube,m
+q=2.778e-3//flow rate
+g=9.807
+h_f=30//friction loss
+A=(L*q^2)/(g*h_f)
+A=1.574e-7
+//D=0.66*[[(k^1.25)*(A^4.75)+meu*(A^5.2)/(q*rho)]^.04]
+D=0.0377
+//calculate velocity of alcohol in the tube
+S=3.14*(D)^2/4//surface area
+v=q/S//velocity
+v=3.93//velocity
+neu=1.395e-6//dynamic viscosity
+R_e=D*v/neu//reynolds no
+printf("\n R_e=%f ",R_e);//printing mistake in book
+printf("\n since R_e is more than 4000 flow is turbulent");
+
diff --git a/1052/CH14/EX14.7/147.sce b/1052/CH14/EX14.7/147.sce new file mode 100755 index 000000000..b4e891e0a --- /dev/null +++ b/1052/CH14/EX14.7/147.sce @@ -0,0 +1,25 @@ +clc;
+//Exanmple 14.7
+//page no 160
+printf("Example 14.7 page no 160\n\n");
+//kerosene flow ina lng ,smooth ,horizontal pipe
+rho=820//density,kg/m^3
+D=0.0493//iside diameter of pipe by appendix A.5,m
+R_e=60000
+meu=0.0016//viscosity,kg/m.s
+v=(R_e*meu)/(D*rho)// flow average velocity
+printf("\n average velocity v=%f m/s",v);
+S=(%pi/4)*D^2//cross sectional area
+printf("\n S=%f ",S);
+q=v/S//flow rate
+printf("\n flow rate q=%f m^3/s",q);//printing mistake in book
+m_dot=rho*q//mass flow rate
+printf("\n mass flow rate m_dot=%f kg/s",m_dot);//printing mistake in book in the value of v
+n=7//seventh power apply
+v_max=v/(2*n^2/((n+1)*(2*n+1)))//maximum velocity
+printf("\n v_max=%f m/s",v_max);
+//check the assumptioon of fully developed flow
+R_e=60000//reynolds no
+L_c=4.4*R_e^(1/6)*D//critical length
+printf("\n length L_c=%f m",L_c);
+//since L_c <L th eassumption is valid
diff --git a/1052/CH14/EX14.8/148.sce b/1052/CH14/EX14.8/148.sce new file mode 100755 index 000000000..bf28d2ac1 --- /dev/null +++ b/1052/CH14/EX14.8/148.sce @@ -0,0 +1,19 @@ +clc;
+//Example 14.8
+//page no 161
+printf("\n Example 14.8 page no 161\n\n");
+//refer to example no 14.7
+rho=860//density
+R_e=60000//reynolds no
+f=.046/R_e^.2//fanning friction factor
+printf("\n fanning friction factor f=%f ",f);
+L=9//length of tube
+v=2.38//velocity
+D=.0493//diameter of tube
+g=9.807
+h_f=4*f*(L*v^2)/(D*2*g)//friction loss
+printf("\n h_f friction loss=%f m ",h_f);
+//applying bernoulli equation
+P_drop=rho*g*h_f//pressure drop in pa
+P_drop_a=P_drop/10^5//pressure drop in atm
+printf("\n P_drop_a =%f atm",P_drop_a);
diff --git a/1052/CH14/EX14.9/149.sce b/1052/CH14/EX14.9/149.sce new file mode 100755 index 000000000..776ba54e7 --- /dev/null +++ b/1052/CH14/EX14.9/149.sce @@ -0,0 +1,10 @@ +clc;
+//Example 14.9
+//page no 161
+printf(" Example 14.9 page no 161\n\n");
+//refer to example 14.7
+D=0.0493//diameter of tuube
+S=%pi*D^2/4//cross sectional area\
+P=8685//pressure
+F=P*S//force required to hold the pipe,direction is opposite the flow
+printf("\n Force required to hold pipe F=%f N",F);
diff --git a/1052/CH15/EX15.2/152.sce b/1052/CH15/EX15.2/152.sce new file mode 100755 index 000000000..684693fd9 --- /dev/null +++ b/1052/CH15/EX15.2/152.sce @@ -0,0 +1,14 @@ +clc;
+//Example 15.2
+//page no 169
+printf(" Example 15.2 page no 169\n\n");
+//nitrogen gas is flowing in a duct,neglect compressibility effects
+T=293//temperature,k
+R=8314.4//gas constant
+k=1.4//for nitrogen
+M=28//molecular weight of nitrogen
+c=sqrt(k*R*T/M)//speed of sound in nitrogen
+printf("\n speed of sound on nitrogen c=%f m/s",c);
+v=82//flow velocity
+M_a=v/c//mach no.
+printf("\n mach no. M_a=%f ",M_a);
diff --git a/1052/CH15/EX15.3/153.sce b/1052/CH15/EX15.3/153.sce new file mode 100755 index 000000000..0c3e3b5b0 --- /dev/null +++ b/1052/CH15/EX15.3/153.sce @@ -0,0 +1,21 @@ +clc;
+//Example 15.3
+//page no 170
+printf("Example 15.3 page no 170\n\n");
+//propane is flowing in a tube
+k=1.3//degree of freedom for propane
+T=290//temperature,k
+M=44//mol. weight
+R=8314.4//gas constant
+c=sqrt((k*R*T)/M)//speed of sound in propane
+printf("\n speed of sound in propane c=%f m/s",c);
+v=43//average velocity
+M_a=v/c//mach no.
+printf("\n M_a mach no=%f ",M_a);
+//mach no is< 0.3,that's why flow is incompressible
+rho=6.39//density,kg/m^3
+meu=8e-6//viscosity ,m^2/s
+D=0.0254//inside diameter of tube
+R_e=D*rho*v/meu//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
+//because R_e is >4000,flow is turbulent
diff --git a/1052/CH15/EX15.6/156.sce b/1052/CH15/EX15.6/156.sce new file mode 100755 index 000000000..4e242676d --- /dev/null +++ b/1052/CH15/EX15.6/156.sce @@ -0,0 +1,23 @@ +clc;
+//Example 15.6
+//page no 173
+printf("Example 15.6 page no 173\n\n");
+//methane is flowing through a horizontal steel pipe
+m_dot=10//mass flow rate, lb/s
+D=1//diameter of pipe,ft
+G=m_dot/((%pi/4)*D^2)//mass velocity flux
+P=89.7//inlet pressure
+T=530//temprature,k
+MW=16//mol. weight
+R=10.73//gas constant
+//applying eq 15.7
+rho=P*MW/(R*T)//density
+f=0.008//friction factor
+L=15840//length of pipe,ft
+g_c=32.2//gravitational constant
+P_drop=(2*f*L*(G^2))/(g_c*rho*D)//pressure drop
+P1=89.7//inlet pressure,psia
+P2=P1-(P_drop/144)
+P2=54.7//corrected value
+P_drop=P1-P2//updated value of P_drop
+printf("\n pressure drop P_drop=%f psia",P_drop);
diff --git a/1052/CH15/EX15.7/157.sce b/1052/CH15/EX15.7/157.sce new file mode 100755 index 000000000..848c97cca --- /dev/null +++ b/1052/CH15/EX15.7/157.sce @@ -0,0 +1,10 @@ +clc;
+//Example 15.7
+//page no 174
+printf("Example 15.7 page no 174\n\n");
+//refr to example 15.6
+D=1//diameter of pipe
+G=12.7//mass velocity flux
+meu=7.39e-6//viscosity,lb/ft.s
+R_e=(D*G)/(meu)//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
diff --git a/1052/CH15/EX15.8/158.sce b/1052/CH15/EX15.8/158.sce new file mode 100755 index 000000000..80c8b4a3b --- /dev/null +++ b/1052/CH15/EX15.8/158.sce @@ -0,0 +1,26 @@ +clc;
+//Example 15.8
+//page no 174
+printf("Example no page no 174\n\n");
+//air flowing through a steel pipe
+P_1=2.7//pressure,atm
+T=288//temperature,k
+v=30//velocity at the entrance of the pipe ,m/s
+Mw=29//mol. weight of air
+V=22.4//standard volume
+T_s=273//st. temp
+P_s=1//st. pressure
+rho=(Mw*P_1*T_s)/(V*T*P_s)//density
+printf("\ density rho =%f kg/m^3",rho);
+G=v*rho//mass veocity flux
+printf("\n G mass velocity flux =%f kg/m^2.s",G);
+f=0.004//friction factor
+D=0.085//diameter ,m
+L=65//length of pipe,m
+//gravitational constant
+P_2=P_1-2*f*L*G^2/(rho*D*101325)//pressure drop across the line
+//factor 101325 for atm
+printf("\n pressure drop P__2=%f atm",P_2);
+P_drop=P_1-P_2//pressure drop
+printf("\n P_drop pressure=%f atm",P_drop);
+
diff --git a/1052/CH15/EX15.9/159.sce b/1052/CH15/EX15.9/159.sce new file mode 100755 index 000000000..1f8381188 --- /dev/null +++ b/1052/CH15/EX15.9/159.sce @@ -0,0 +1,10 @@ +clc;
+//Example 15.9
+//page no 175
+printf(" Example 15.9 page no 175\n\n");
+//refer to Example 15.9
+meu=1.74e-5//viscosity,kg/m.s
+D=0.085//diameter of pipe
+G=99.3//mass velocity flux
+R_e=D*G/meu//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
diff --git a/1052/CH16/EX16.2/162.sce b/1052/CH16/EX16.2/162.sce new file mode 100755 index 000000000..8ad5a6f30 --- /dev/null +++ b/1052/CH16/EX16.2/162.sce @@ -0,0 +1,21 @@ +clc;
+//Example 16.2
+//page no 183
+printf(" Example 16.2 page no 183\n\n");
+//cal. pressure drop if the flow for both phases is turbulent
+//a. since the flow is tt and 1<X<10 ,apply equatuion 16.16b to obtain Y_g
+X=1.66
+Y_g=5.80+6.7143*X+6.9643*X^2-0.75*X^3
+printf("\n Y_g=%f ",Y_g);
+//the value of Y_g is an excellent agreement with the values provided by lockhart and Martinelli
+//then pressure drop is
+P_drop_g=2.71
+P_drop_t=Y_g*P_drop_g
+printf("\n P_drop_t=%f psf/100 ft",P_drop_t);
+//b. applying eq. 16.17b to generate Y_l
+Y_l=18.219*X^-.8192
+printf("\n Y_l =%f ",Y_l);
+//pressure drop from eq. 16.2
+P_drop_l=7.50
+P_drop=Y_l*P_drop_l
+printf("\n P_drop=%f psf/100ft",P_drop);
diff --git a/1052/CH16/EX16.3/163.sce b/1052/CH16/EX16.3/163.sce new file mode 100755 index 000000000..2df5e2d96 --- /dev/null +++ b/1052/CH16/EX16.3/163.sce @@ -0,0 +1,20 @@ +clc;
+//Example 16.3
+//page no 185
+printf(" Example 16.3 page no 185\n\n");
+//if the flow for the gas phase is turbulent and the liquid phase is viscous
+//cal. pressure drop total
+X=1.66//from ex. 16.1
+Y_G_tv=20-21.81*X+16.357*X^2-1.8333*X^3
+printf("\n Y_G_tv=%f ",Y_G_tv);
+//pressure drop from eq 16.1
+P_drop_g=2.71
+P_drop_a=Y_G_tv*P_drop_g
+printf("\n pressure drop P_drop_a=%f psf/100 ft",P_drop_a);
+//b. applying eq 16.20b to generate Y_l
+Y_l_tv=11.702*X^-0.7334
+printf("\n Y_l_tv=%f ",Y_l_tv);
+//pressure drop from equation 16.2
+P_drop_l=7.50
+P_drop_b=Y_l_tv*P_drop_l
+printf("\n P_drop_b=%f psf/100 f",P_drop_b);
diff --git a/1052/CH16/EX16.4/164.sce b/1052/CH16/EX16.4/164.sce new file mode 100755 index 000000000..67e214f25 --- /dev/null +++ b/1052/CH16/EX16.4/164.sce @@ -0,0 +1,21 @@ +clc;
+//Example 16.4
+//page no 187
+printf("Example 16.4 page no 187\n\n");
+//if flow for both phases is laminar then cal pressure drop total
+//a. apply eq. 16.22b to obtain Y_G
+X=1.66
+Y_G=10-10.405*X+8.6786*X^2-0.9167*X^3
+printf("\n Y_G=%f ",Y_G);
+//pressure drop from eq 16.1
+P_drop_g=2.71
+P_drop=Y_G*P_drop_g
+printf("\n pressure drop P_drop=%f psf/100 ft",P_drop);
+//b. apply eq 16.23b to generate Y_l
+Y_l=6.4699*X^-0.556
+printf("\n Y_l =%f ",Y_l);
+//pressure drop from eq. 16.2
+P_drop_l=7.50
+P_drop_b=Y_l*P_drop_l
+printf("\n pressure drop P_drop_b=%f psf/100 ft",P_drop_b);
+
diff --git a/1052/CH16/EX16.6/166.sce b/1052/CH16/EX16.6/166.sce new file mode 100755 index 000000000..ff1bf49cc --- /dev/null +++ b/1052/CH16/EX16.6/166.sce @@ -0,0 +1,21 @@ +clc;
+//Example 16.6
+//page no 191
+printf("\n Example 16.6 page no 191\n\n");
+//a mixture of air(a) and kerosene(k) are flowing in a horizontal pipe
+rho_a=0.075//density of airlb/ft^3
+meu_a=1.24e-5//viscosity of air ,lb/ft.s
+q_a=5.3125//flow rate ft^3/s
+rho_k=52.1//density of kerosene,lb/ft^3
+meu_k=0.00168//viscosity lof kerosene,lb/ft.s
+q_k=1.790//flow rate ft^3/s
+D=.19167//diameter of pipe ,ft
+S=(%pi/4)*D^2//cross sectional area,ft^2
+printf("\n S=%f ",S);
+//superficial velocity of each phase can be obtained by applying either eq, 16.7 and 16.8
+v_a=q_a/(S*60)//for air
+v_k=q_k/(S*60)//for kerosene
+printf("\n velocity v_a =%f ft/s\n velocity v_k=%f ft/s",v_a,v_k);
+R_e_a=D*rho_a*v_a/meu_a//reynolds no. of Air
+R_e_k=D*rho_k*v_k/meu_k//reynolds no. of kerosene
+printf("\n R_e_a=%f\nR_e_k=%f ",R_e_a,R_e_k);
diff --git a/1052/CH17/EX17.1/171.sce b/1052/CH17/EX17.1/171.sce new file mode 100755 index 000000000..235b9a958 --- /dev/null +++ b/1052/CH17/EX17.1/171.sce @@ -0,0 +1,13 @@ +clc;
+//Example 17.1
+//page no 201
+printf("Example 17.1 page no 201\n\n");
+//fan are operating for transporting gas
+//two fans fan(a)and fan(b)
+D_a=46//diameter of blade of fan (a)
+rpm_a=1575//operating speed of fan(a)
+D_b=42//diameter of blade of fan(b)
+rpm_b=1625//operating speed of fan(b)
+h_p_a=47.5//power requirement of fan (a)
+h_p_b=(rpm_b^3/rpm_a^3)*(D_b/D_a)^5*h_p_a//power requirement of fan(b)
+printf("\n power requirement h_p_b=%f bhp",h_p_b);
diff --git a/1052/CH17/EX17.2/172.sce b/1052/CH17/EX17.2/172.sce new file mode 100755 index 000000000..29cfca9bc --- /dev/null +++ b/1052/CH17/EX17.2/172.sce @@ -0,0 +1,18 @@ +clc;
+//Example 17.2
+//page no 201
+printf("Example 17.2 page no 201\n\n");
+rpm=1694//speed of fan
+q=12200//flow rate of q_a
+rpm_n=2100//new speed of fan
+q_n=q*(rpm_n/rpm)//new flow rate
+printf("\nnew flow rate q_n=%f acfm",q_n);
+//applyingeq 17.5
+P=5//pressure ,in
+P_n=P*(rpm_n^2/rpm^2)//new pressure
+printf("\nnew pressureP_n=%f in H20",P_n);
+//required power is calculated using eq. 17.6
+hp=9.25//power at 1694 speed
+hp_n=hp*(rpm_n^3/rpm^3)//new power required
+printf("\n new powerhp_n=%f bhp",hp_n);
+
diff --git a/1052/CH17/EX17.3/173.sce b/1052/CH17/EX17.3/173.sce new file mode 100755 index 000000000..ca8c9b63d --- /dev/null +++ b/1052/CH17/EX17.3/173.sce @@ -0,0 +1,15 @@ +clc;
+//Example 17.3
+//page no. 201
+printf("\Example 17.3 page no 201\n\n");
+// a gas stream in a process
+P_l_m=4.4// minor pressure loss for duct work,valves etc,in
+P_l_mz=6.4//major pressure loss due to pieces of equipment,in
+P_drop=P_l_m+P_l_mz//total pressure drop
+printf("\n total pressure P_drop=%f in H20",P_drop);
+//applying eq 17.7
+q=6500//flow rate ,acfm
+neta=0.63//overall fan-motor effficiency
+bhp=1.575e-4*q*P_drop/neta//brake horse power required
+//1.575e-5 is aconversion factor for horse power
+printf("\n brake horse power bhp=%f bhp",bhp);
diff --git a/1052/CH17/EX17.4/174.sce b/1052/CH17/EX17.4/174.sce new file mode 100755 index 000000000..4a1708b39 --- /dev/null +++ b/1052/CH17/EX17.4/174.sce @@ -0,0 +1,15 @@ +clc;
+//Example 17.4
+//page no 208
+printf(" Example 17.4 page no 208\n\n");
+//a pump is in process
+//given: parabolic pump pressure flow
+//P=a-b*q^2 equation
+//a and b calculate from conditions
+a=25
+b=5
+//then equation becomes P=25-5*q^2
+//pressure at 1m^3/s flow rate
+q=1//flow rate,m^3/s
+P=a-b*q^2//pressure
+printf("\n pressure P=%f kpa",P);
diff --git a/1052/CH17/EX17.6/176.sce b/1052/CH17/EX17.6/176.sce new file mode 100755 index 000000000..cf029ea40 --- /dev/null +++ b/1052/CH17/EX17.6/176.sce @@ -0,0 +1,22 @@ +clc;
+//Example 17.6
+//page no 214
+printf("\n Example 17.6 page no. 214\n\n");
+//the total head developed by a centrifugal pump is given by a equation
+//hc=42-0.0047*q^2
+//the pump is to be used in a water flow system in which the pump head in feet of water is given by eq.
+//hp=12+0.0198*q^2
+//for cal. flow rate hc=hp
+q=35//from condition hc=hp,gpm
+ hc=42-0.0047*q^2//total head
+ printf("\n total head hc=%f ft of water",hc);
+rho=62.40//density
+q_c=0.078//flow rate in cfs unit
+m_dot=rho*q_c//mass flow rate
+printf("\n m_dot mass flow rate =%f lb/s",m_dot);
+W_dot=m_dot*hc//fluid power requirement can be calculated
+printf("\n fluid power requirement W_dot=%f lbf.ft/s",W_dot);
+neta=.6//efficiency
+W_dot_hp=.32//fluid power requirement in hp
+bhp=W_dot_hp/neta//brake horse power
+printf("\n brake horse power bhp=%f bhp",bhp);
diff --git a/1052/CH17/EX17.8/178.sce b/1052/CH17/EX17.8/178.sce new file mode 100755 index 000000000..f69e480c0 --- /dev/null +++ b/1052/CH17/EX17.8/178.sce @@ -0,0 +1,14 @@ +clc;
+//Example 17.8
+//page no 216
+printf(" Example 17.8 page no 216\n\n");
+//compressed air is to be employed in the nozzle
+T1=520//temperature
+P2=40//pressure
+P1=14.7//atmosphric pressure
+gamma=1.3//degree of freedom
+R=1.987//gas constant
+W_s=-(gamma*R*T1/(gamma-1))*[(P2/P1)^((gamma-1)/gamma)-1]//compreesd energy requirement
+printf("\n energy requirement W_s=%f btu/lbmol of air",W_s);
+hp=W_s*(7.5/29)*778//power
+printf("\n power hp=%f ft .lbf/min",hp);
diff --git a/1052/CH18/EX18.1/181.sce b/1052/CH18/EX18.1/181.sce new file mode 100755 index 000000000..a6bd74c8b --- /dev/null +++ b/1052/CH18/EX18.1/181.sce @@ -0,0 +1,11 @@ +clc;
+//Example 18.1
+//page no 225
+printf("\n Example 18.1 page no 225\n\n");
+//there is a sudden expansion in which the diameter D1 doubls to D2,D2=2D1
+//if D1=1 then D2=2
+D1=1//diameter D1
+D2=2//diameter D2
+K_se=[1-(D1/D2)^2]^2// coefficent of sudden expansion
+printf("\n K_se coeff. of sudden expansion=%f ",K_se);
+
diff --git a/1052/CH18/EX18.2/182.sce b/1052/CH18/EX18.2/182.sce new file mode 100755 index 000000000..7887e5baa --- /dev/null +++ b/1052/CH18/EX18.2/182.sce @@ -0,0 +1,12 @@ +clc;
+//Example 18.2
+//page no 227
+printf("\n Example 18.2 page no 227\n\n");
+//cal. equivalent length of pipe that would cause the same head los for gate and globe valve located in piping
+D=3//diameter of pipe,in
+L_gate=7//L/D ratio for fully open gate valve
+L_globe=300//L/D ratio for globe valve
+L_eq_gate=L_gate*D//equivalent length for gate valve
+printf("\n L_eq_gate=%f in",L_eq_gate);
+L_eq_globe=L_globe*D//equivalent length for globe valve
+printf("\n L_eq_globe=%f in ",L_eq_globe);
diff --git a/1052/CH18/EX18.3/183.sce b/1052/CH18/EX18.3/183.sce new file mode 100755 index 000000000..7807864c4 --- /dev/null +++ b/1052/CH18/EX18.3/183.sce @@ -0,0 +1,17 @@ +clc;
+//Example 18.3
+//page no 227
+printf("\n Example 18.3 page no 227\n\n");
+// water is flowing at room temperature
+rho=62.4//density of water,lb/ft^3
+meu=6.72e-4//viscosity of water,lb/ft.s
+D=0.03125//diameter of pipe
+v=10//velocity
+R_e=D*v*rho/meu//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
+f=0.0015+0.125/R_e^.30//equation for friction factor
+printf("\n friction factor f=%f ",f);
+L=30//length of pipe
+gc=32.2//gravitational constant
+P_drop=2*f*rho*v^2*L/(D*gc)//pressure drop
+printf("\n pressure drop P_drop=%f lbf/ft^2 ",P_drop);
diff --git a/1052/CH18/EX18.4/184.sce b/1052/CH18/EX18.4/184.sce new file mode 100755 index 000000000..43b8500b2 --- /dev/null +++ b/1052/CH18/EX18.4/184.sce @@ -0,0 +1,11 @@ +clc;
+//Example 18.4
+//page no 229
+printf("\n Example 18.4 pageno 229\n\n");
+//refer to example 18.3
+//applying eq 18.4 for friction loss by globe valve
+K_f=22//coeff of expansion loss
+v=10//velocity
+gc=32.2//ravitational constant
+h_f=K_f*v^2/(2*gc)//friction loss due to globe valve
+printf("\n friction loss due to globe valve h_f=%f ft.lbf/lb",h_f);
diff --git a/1052/CH18/EX18.5/185.sce b/1052/CH18/EX18.5/185.sce new file mode 100755 index 000000000..c23f74d98 --- /dev/null +++ b/1052/CH18/EX18.5/185.sce @@ -0,0 +1,10 @@ +clc;
+//Example 18.5
+//page no 230
+printf(" Example 18.5 page no. 230\n\n");
+//refer to example no. 18.3 and 18.4
+P_drop=34.16//pressure drop ,ft
+h_f=43//friction loss due to fitting
+rho=62.4//density,lb/ft^3
+P_d_t=(P_drop+h_f)*rho//total pressure drop
+printf("\n total pressure drop P_d_t=%f lbf/ft^2",P_d_t);
diff --git a/1052/CH18/EX18.6/186.sce b/1052/CH18/EX18.6/186.sce new file mode 100755 index 000000000..b202ce236 --- /dev/null +++ b/1052/CH18/EX18.6/186.sce @@ -0,0 +1,26 @@ +clc;
+//Example 18.6
+//page no 230
+printf("Example 18.6 page no 230\n\n");
+k=0.00085//relative roughness of pipe ,ft
+D=0.833//diameter of pipe,ft
+f=0.005//we assume fanning friction factor ,0.004-0.005,select upper limit
+K=0.45//entrance loss coefficient is estimated from eq. 18.10 and 18.11
+L=5000//length of pipe,ft
+h_f=4*f*(L/D)//the friction head loss in terms of the line velocity
+printf("\n h_f=%f ",h_f);//printing mistake in book 12 instead of 120
+//applying bernoulli equation between points 1 and 2 to calculate v2
+h_s=0//no shaft head
+v1=0//large tank
+//because both locations open to the atmosphere,P1=P2=0 psig
+h=260//height from point 1 to 2
+V2_h=sqrt(h/(1+h_f+K))//total velocity head at point 2
+g=32.174
+V2=V2_h*2*g
+V2=11.75
+neu=1.0825e-5//viscosity
+R_e=D*(V2)/neu//reynolds number
+printf("\n reynolds number R_e=%f ",R_e);//printing mistake in book due to value of h_f
+q=V2*(%pi*(D^2)/4)//volumatric flow rate
+printf("\n vol. flow rate q=%f ft^3/s",q);//printing mistake in book due to value of h_f
+
diff --git a/1052/CH18/EX18.7/187.sce b/1052/CH18/EX18.7/187.sce new file mode 100755 index 000000000..da6200a87 --- /dev/null +++ b/1052/CH18/EX18.7/187.sce @@ -0,0 +1,27 @@ +clc;
+//Example 18.7
+//page no 232
+printf("Example 18.7 page no 232\n\n")
+//two large water reservoirs are connected by a pipe
+D=0.0779//diameter of pipe (m), by appendix A.5 for 3 inch schdule 40 pipe
+k=0.046*1e-3//roughness of pipe
+K_r=k/D//relative roughness
+printf("\n relative roughness K_r=%f ",K_r);
+q=0.0126//flow rate of water m^3/s,
+S=(%pi/4)*D^2//cross sectional area of pipe
+v=q/S//flow velocity of water
+printf("\n flow velocity v=%f m/s",v);
+neu=1e-6//viscosity of water
+R_e=v*D/neu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+//from R_e and relative roughness K_r ,obtain friction factor
+f=0.00345
+L=2000*.3048//length of pipe,m
+h_f=4*f*(L/D)*(v^2/2)
+printf("\n head loss h_f=%f J/kg",h_f);
+//apply bernoulli equation between station 1 and 2. Note that P1=P2=1 atm,v1=v2,z1=z2
+//P_drop/rho + V^2/2g + z = h_s - h_f
+//whera h_s is the major friction loss
+//above equation reduces to h_s=h_f
+h_s=h_f//h_s is major friction loss
+printf("\n major friction losses h_s=%f J/kg",h_s);
diff --git a/1052/CH18/EX18.8/188.sce b/1052/CH18/EX18.8/188.sce new file mode 100755 index 000000000..eb94df2c2 --- /dev/null +++ b/1052/CH18/EX18.8/188.sce @@ -0,0 +1,13 @@ +clc;
+//Example 18.8
+//page no 233
+printf("\n Example 18.8 page no 233\n\n");
+//refer to example no 18.7
+rho=1000//density
+g=9.807//gravitational acc.
+h_f=38.39//head loss
+P_rise=rho*g*h_f//pressure rise across the pump
+P_rise=475000//in book by mistake this value instead original value
+q=0.0126//flow rate from example 18.7
+W_dot=q*P_rise//ideal pumping requirement(the fluid power)
+printf("\n W_dot fluid power=%f kw",W_dot);//printing mistake in book in putting value of P_rise
diff --git a/1052/CH19/EX19.1/191.sce b/1052/CH19/EX19.1/191.sce new file mode 100755 index 000000000..c6d260c9d --- /dev/null +++ b/1052/CH19/EX19.1/191.sce @@ -0,0 +1,26 @@ +clc;
+//Example 19.1
+//page no. 246
+printf("Example 19.1 page no 246\n\n");
+//we have to find pressure at different point in a oil tank
+//apply manometer equation between point 1 and 2
+//since rho1=rho2,z1=z2
+//it gives P1=P2
+//applying manometer equation between points 2 and 3
+rho_oil=0.8*1000//density of oil
+//since rho3=rho_oil=rho2
+rho3=rho_oil
+z_32=.4//height difference between point 2 and 3
+g=9.807//grav. acc.
+P7=0//pressure at point 7,on gauge basis
+z_76=0.8//height difference between point 6 and 7
+rho_hg=13600//density of mercury
+P6=P7 + rho_hg*g*z_76//pressure at point 6
+P5=P6//pressure at point 5
+rho_air=1.2//density of air
+z_54=1//height difference between point 5 and 4
+P4=P5 + rho_air*g*z_54//pressure at point 4
+P3=P4//pressure at point 3
+P2=P3 + rho_oil*g*z_32//pressure at point 2
+P1=P2//air pressure in the oil tank
+printf("\n pressure P1=%f Pag",P1);
diff --git a/1052/CH19/EX19.2/192.sce b/1052/CH19/EX19.2/192.sce new file mode 100755 index 000000000..72818b8da --- /dev/null +++ b/1052/CH19/EX19.2/192.sce @@ -0,0 +1,17 @@ +clc;
+//Example 19.2
+//page no 250
+printf("Example 19.2 page no 250\n\n");
+//pitot tube is located at the center line of a horizontal pipe transporting air
+rho=0.075//density of gas ,lb/ft^2
+h=0.0166667//height difference,ft
+g=32.2//gravitational acc. lb/ft^2
+rho_m=62.4//density of medium which is air
+v=sqrt(2*g*h*(rho_m-rho)/rho)//velocity
+printf("\n velocity v=%f ft/s",v);
+v_max=v//because at that point where the reading was taken is the centerline
+printf("\n maximum veocity v_max=%f ft/s",v_max);
+//since the flowing fluid is air at a high velocity the flow has a high probability of being turbilent .from chapter 14,assume
+//v_av/v_max=0.815
+v_av=v_max*0.815
+printf("\n average velocity v_av=%f ft/s",v_av);
diff --git a/1052/CH19/EX19.3/193.sce b/1052/CH19/EX19.3/193.sce new file mode 100755 index 000000000..1ce97930c --- /dev/null +++ b/1052/CH19/EX19.3/193.sce @@ -0,0 +1,12 @@ +clc;
+//Example 19.3
+//page no 251
+printf("Example 19.3 page no 251\n\n");
+//refer to example 19.3
+S=0.785//cross sectional area,ft^2
+v_av=24.4//average velocity,ft/s
+q=v_av*S*60//flow rate,factor 60 for minute
+printf("\n flow rate q=%f ft^3 min",q);
+rho=0.075//density
+m_dot=q*rho*60//mass flow rate
+printf("\n m_dot mass flow rate=%f lb/hr",m_dot);
diff --git a/1052/CH19/EX19.4/194.sce b/1052/CH19/EX19.4/194.sce new file mode 100755 index 000000000..c5b9ed0a5 --- /dev/null +++ b/1052/CH19/EX19.4/194.sce @@ -0,0 +1,19 @@ +clc;
+//Example 19.4
+//page no 251
+printf("Example 19.4 page no\n\n")
+//water flow ina circular pipe,a pitot tube is used to measure the water velocity
+h=0.07//manometer height,m
+rho=1000//density of water,kg/m^3
+rho_m=13600//density of mercury,kg/m^3
+g=9.807
+v=sqrt(2*g*h*(rho_m-rho)/rho)
+printf("\n water velocity v=%f m/s ",v);
+D=0.0779//pipe inside diameter,by using table A.5 in the appendix for a 3 inch schedule 40 pipe
+S=(%pi/4)*D^2
+printf("/n cross sectional area S=%f m^2",S);
+q=v*S//flow rate
+printf("\n flow rate q=%f m^3/s",q);
+meu=0.001//viscosity of water,kg/m.s
+R_e=rho*v*D/meu//reynolds number
+printf("\n reynolds no R_e=%f ",R_e);
diff --git a/1052/CH19/EX19.5/195.sce b/1052/CH19/EX19.5/195.sce new file mode 100755 index 000000000..360836ac7 --- /dev/null +++ b/1052/CH19/EX19.5/195.sce @@ -0,0 +1,23 @@ +clc;
+//Example 19.5
+//page no 254
+printf("Example 19.5 page no 254\n\n");
+//a venturi meter has gasoline flowing through it.
+h=0.035//height of venturi meter
+D1=0.06//upsteeam diameter,m
+D2=0.02//throat diameter,m
+rho_m=13600//density of mercury
+rho=680//density of gasoline
+g=9.807
+v2=sqrt((2*g*h*(rho_m-rho)/rho)/1-D2^4/D1^4)//velocity of gasoline at the the throat
+printf("\n velocity at throat v2=%f m/s",v2);
+q=(%pi/4)*D2^2*v2//flow rate
+printf("\n flow rate q =%f m^3/s",q);
+P1=101325//upstream pressure,Pa
+P2=P1-g*h*(rho_m-rho)//pressure at throat P2
+printf("\n pressure P2=%f Pa",P2);
+P_d=P1-P2//pressure difference
+P_l=.1*P_d//pressure loss is 10 %
+printf("\n pressure loss P_l=%f Pa",P_l);
+W_l=q*P_l//power loss
+printf("\n power loss W_l=%f W",W_l);
diff --git a/1052/CH19/EX19.6/196.sce b/1052/CH19/EX19.6/196.sce new file mode 100755 index 000000000..f5a22b9e0 --- /dev/null +++ b/1052/CH19/EX19.6/196.sce @@ -0,0 +1,16 @@ +clc;
+//Example 19.6
+//page no. 255
+printf("\n Example 19.6 page no. 255\n\n");
+//refer to example 19.5
+//if gasoline has vapor pressure of 50000Pa ,we have to calculate flow rate at whhich cavitation to occur
+P1=101325//upstream pressure,Pa
+P2=50000//given vapor pressure,Pa
+D1=0.06//upstream diameter,m
+D2=0.02//throat diameter,m
+rho=680//density of gasoline
+v2=sqrt((2*(P1-P2))/rho*(1-D2^4/D1^4))//velocity
+printf("\n velocity v2=%f m/s",v2);
+q=(%pi/4)*D2^2*v2//flow rate
+printf("\n flow rate q=%f m^3/s",q);
+
diff --git a/1052/CH19/EX19.7/197.sce b/1052/CH19/EX19.7/197.sce new file mode 100755 index 000000000..186d2730b --- /dev/null +++ b/1052/CH19/EX19.7/197.sce @@ -0,0 +1,23 @@ +clc;
+//Example 19.7
+//page no 258
+printf("Example 19.7 page no 258\n\n");
+//an orifice meter is equipped with flange top is installed to measure the flow rate of air in a circular duct
+D1=0.25//diameter of circular duct,m
+D2=0.19//orifice diamter,m
+v2=4/(%pi*D2^2)//velocity through orifice
+printf("\n velocity through orifice v2=%f m/s",v2);
+C_o=1// assuming orifice discharge coefficient
+rho=1.23//density of air,kg/m^3
+P=rho*v2^2*[1-(D2^4/D1^4)]/2//pressure
+printf("\n pressure P=%f Pa",P);
+meu=1.8e-5// absolute viscosity
+R_e=rho*v2*D2/(meu)//reynolds no.
+printf("\n Reynolds no. R_e=%f ",R_e);
+C_ac=0.62//actual discharge cefficient,from fig.19.8
+P_ac=P/(C_ac)^2//actual pressure drop
+P_rec=14*(D2/D1) + 80*((D2/D1)^2)//equation for percentage pressure recovery
+P_loss=100-P_rec//precentage pressure loss
+P_l=round((P_loss/100)*P_ac)//actual pressure drop after recovery
+printf("\n actual pressure drop P_l=%f Pa",P_l);
+
diff --git a/1052/CH19/EX19.9/199.sce b/1052/CH19/EX19.9/199.sce new file mode 100755 index 000000000..5af570f48 --- /dev/null +++ b/1052/CH19/EX19.9/199.sce @@ -0,0 +1,9 @@ +clc;
+//Example 19.9
+//page no 259
+printf("\n Example 19.9 page no 259\n\n");
+//air at ambient condition is flowing in a pipe
+rho=0.075//density of air ,lb/ft^3
+m_dot=0.5//mass flow rate ,lb/s
+q=m_dot/rho//volumatric flow rate
+printf("\n volumatric flow rate q=%f ft^3/s",q);
diff --git a/1052/CH2/EX2.1/2.sce b/1052/CH2/EX2.1/2.sce new file mode 100755 index 000000000..e645342f5 --- /dev/null +++ b/1052/CH2/EX2.1/2.sce @@ -0,0 +1,39 @@ +//Example 2.1(1)
+//Page no.10
+printf("Example 2.1(1) Page no. 10\n\n")
+//convert 8.03 yr to seconds
+printf("8.03 yr =a\n\n")
+yr=365//day
+day=24//h
+h=60//min
+min=60//second
+a=8.03*365*24*60*60
+printf("8.03 yr is %f seconds \n\n",a)
+//Example 2.1(2)
+//Page no. 10
+printf("Example 2.1(2) Page no.10\n\n")
+//convert 150 mile/h to yard/h
+printf("150 mile/h =x\n\n")
+mile=5280//ft
+ft=(1/3)//yd
+x=150*5280*(1/3)
+printf("150 mile/h is %f yd/h\n",x)
+//Example 2.1(3)
+//Page no. 10
+printf("Example 2.1(3) Page no. 10\n\n")
+//convert 100 m/s^2 to ft/min^2
+printf("100 m/s^2 =a\n\n")
+m =100//cm
+cm=(1/30.48)//ft
+min=60//sec
+a=100*100*(1/30.48)*(60)^2
+printf("100 m/s^2 is %f ft/min^2\n",a)
+//Example 2.1(4)
+//Page no. 10
+printf("Example 2.1(4) Page no.10\n\n ")
+//convert 0.03g/cm^3 to lb/ft^3
+printf("0.03g/cm^3 =x\n")
+g=(1/454)//lb
+ft=(30.48)^3//cm^3
+x=0.03*(1/454)*(30.48)^3
+printf("0.03g/cm^3 is %f lb/ft^3\n",x)
diff --git a/1052/CH20/EX20.2/202.sce b/1052/CH20/EX20.2/202.sce new file mode 100755 index 000000000..e478eae1a --- /dev/null +++ b/1052/CH20/EX20.2/202.sce @@ -0,0 +1,32 @@ +clc;
+//Example 20.2
+//page no 269
+printf("\n Example 20.2 page no 269\n\n");
+//ventilation required in an indoor work area where a toluene containing adhesive in a nanotechnology process is used.
+//equation for estimate the dilution air requirement
+C_a=80e-6//concentration of toluene
+q=3/8//volumatric flow rate, gal/h
+v=0.4//adhesive contains 4 volume % toluene
+S_g=0.87//specific gravity
+printf("\n C_a concentration of toluene=%f \n q volumatric flow rate q=%f gal/h \n S_g specific gravity=%f ",C_a,q,S_g);
+//mass flow rate of toluene
+m_dot_tol=q*v*S_g*(8.34)//factor 8.34 for lb
+printf("\n mass flow rate m_dot-tol=%f lb/h",m_dot_tol);
+m_dot_g=m_dot_tol*(454/60)//unit conversion of mass flow rate in g/min
+printf("\n mass flow rate in g/min m_dot_g=%f g/min",m_dot_g);
+M_w=92//molecular weight of toluene
+n_dot_tol=m_dot_g/M_w//no. of gm moles of toluene/min
+printf("\n no. of moles n_dot_tol=%f gmol/min",n_dot_tol);
+//resultant toluene vapor volumatric flow rate q_tol is directly calculated from th eidal gas law
+//applying ideal gas law
+R=0.08206//gas constant
+P=1//standard pressure
+T=293//standard temperature
+printf("\n R gas constant=%f atm.L/(gmol.K)\n T temperature=%f K\n P pressure =%f atm",R,T,P);
+q_tol=n_dot_tol*R*T/P//toluene vapor volumatric flow rate
+printf("\n toluene vapor vol. flow rate q_tol=%f L/min",q_tol);
+q_tol=2.15//round off value
+//the required diluent volumatric flow rtae
+K=5//dimensionless mixing factor
+q_dil=K*q_tol/(C_a)//diluent vol. flow rate
+printf("\n diluent vol. flow rate q_dil=%f L/min",q_dil);
diff --git a/1052/CH20/EX20.3/203.sce b/1052/CH20/EX20.3/203.sce new file mode 100755 index 000000000..5d2845415 --- /dev/null +++ b/1052/CH20/EX20.3/203.sce @@ -0,0 +1,33 @@ +clc;
+//Example 20.3
+//page no 270
+printf("Example 20.3 page no 270 \n\n");
+// a certain poorly ventilated room chemical stroage room has a ceiling fan
+//inside this room bottle of iron(3) sulfide sits next to a bottle sulfuric acid containg 1 lb H2SO4 in water
+// an earthquake sends the botlles on the shelf crashing to the floor where bottles break and their contant mix and react to form iron(3) sulfate and hydrogen sulfide
+//we have to calculate maximum H2S concentration that could be reached in the room
+Mw_Fe2S3=208//mol. weight of Fe2S3
+Mw_H2SO4=98//mol. weight of H2SO4
+Mw_H2S=34//mol. weight of H2S
+Mw_air=29//mol. weight of air
+//balancing chemical reaction
+// from the stiochiometric of the reaction ,sulfuric acid is the limiting reagent
+// 0.030 lbmol of Fe2S3 is required to react with 0.010 lbmol of H2SO4\
+v_r=1600//volume of room,ft^3
+n_H2SO4=0.010// lbmol of H2SO4
+Stoi_c_H2SO4=3//stoichiometric coeff. of H2SO4
+Stoi_c_H2S=3//stoichiometric coeff. of H2S
+n_H2S=n_H2SO4*(Stoi_c_H2S/Stoi_c_H2SO4)//lbmol of H2S
+printf("\n lbmol of H2S n_H2S=%f lbmol",n_H2S);
+m_H2S=n_H2S*Mw_H2S//conversion of moles into mass of H2S
+printf("\n mass of H2S m_H2S=%f lb",m_H2S);
+//at 32 degF and i atm pressure an ideal gas occupies 359 ft^3 volume then,at 51 deg F occupies
+T_r=51//temperature of air in the room
+T_st=32//standard temperature
+v_st=359//standard volume
+printf("\n stand. temperature T_st=%f F\n temperature of air in room T_r=%f F\n stand. volume v_st=%f ft^3",T_st,T_r,v_st);
+V_a=v_st*(460+T_r)/(460+T_st)//volume of air
+printf("\n volume of air at 51deg F V_a=%f ft^3",V_a);
+//the final concentration of H2S in the room in ppm C_H2S
+C_H2S=m_H2S*(V_a/Mw_air)*1e+6/(v_r)
+printf("\n conc. of H2S in ppm C_H2S=%f ppm",C_H2S);
diff --git a/1052/CH20/EX20.4/204.sce b/1052/CH20/EX20.4/204.sce new file mode 100755 index 000000000..91de443a7 --- /dev/null +++ b/1052/CH20/EX20.4/204.sce @@ -0,0 +1,33 @@ +clc;
+//Example 20.4
+//Page no 271
+printf("Example 20.4 page no 271\n\n");
+//vinyl chloride application
+//calculation of density by using ideal gas law
+Mw=78//molecular weight of vinyl chloride
+R=82.06//gas constant,cm^3.atm/mol.K
+T=298//temperature,K
+P=1//pressure ,atm
+rho=P*Mw/(R*T)//density of vinyl chloride
+printf("\n rho density of vinyl chloride=%f g/cm^3",rho);
+//given
+m_dot=10//mass flow rate,g/min
+q=m_dot/rho//volumatric flow rate
+printf("\n vol. flow rate q=%f cm^3/min",q);
+q_acfm=0.1107//vol flow rate in acfm
+//cal. the air flow rate in acfm q_air required to meet the 1.0 ppm constraint with the equation
+q_air=q_acfm/1e-6
+printf("\n vol.flow rate q_air=%f acfm",q_air);
+S_factor=10//correct for mixing by employing a saftey factor
+//apply saftey factor to calculate the actual air flow rate for dilution ventilation
+q_dil=S_factor*q_air
+printf("\n air flow rate for dilution q_dil=%f acfm",q_dil);
+//now consider the local exhaust ventilation by first calculating the face area
+H=30//height of hood,in
+W=25//width of hood,in
+S=H*W/144//surface area of hood ,ft^2
+//the air flow rate in acfm q_air,exh required for a face velocity of 100 ft/min is then
+v=100//face velocity,ft/min
+q_exh=round(S*v)
+printf("\n air flow rate q_exh=%f acfm",q_exh);
+
diff --git a/1052/CH20/EX20.7/207.sce b/1052/CH20/EX20.7/207.sce new file mode 100755 index 000000000..355a45fa0 --- /dev/null +++ b/1052/CH20/EX20.7/207.sce @@ -0,0 +1,18 @@ +clc;
+//Example 20.7
+//page no 276
+printf("\n Example 20.7 page no 276\n\n");
+//refer to illustrative Example 20.5
+//(1)
+//we have to calculate minimum air ventilation flow rate into the room containing 10 ng/m^3 of a toxic chemical
+//ng means nanograms
+rV=250//chemical generated in the laboratory,ng/min
+c_o=10//room containg toxic chemical of 10ng/m^3
+c=35//limit of chemical concentration,ng/m^3
+//applicable modal in this case
+//q_o(c_o-c) + rV =V*dc/dt
+//substituting gives
+q_o=(-rV)/(c_o-c)//minimum air ventilation flow rate
+printf("\n q_o min. air ventilation flow rate=%f m^3/min",q_o);
+
+
diff --git a/1052/CH20/EX20.8/208.sce b/1052/CH20/EX20.8/208.sce new file mode 100755 index 000000000..c433c59f9 --- /dev/null +++ b/1052/CH20/EX20.8/208.sce @@ -0,0 +1,20 @@ +clc;
+//Example 20.8 page no 277
+printf(" Example 20.8 page no 277\n\n");
+//refer to example no 20.5 and 20.7
+V=142//volume of room,m^3
+q=12.1// flow rate of air,m^3/min
+tou=V/q//time ,min
+r=30//rate of generation of chemical,ng/min
+k=r/V//ng/(m^3.min)
+c_i=85//intial concentration in laboratory,ng/m^3
+c_o=10//given concentration in room
+c=20.7//final concentration in room
+//by using trial and error mthod we get
+function y=f(t)
+ y=c_i*(exp(-t/tou))+ (c_o+k*tou)*(1-exp(-t/tou)) - c
+endfunction
+t=fsolve(30,f);
+//by using trail and error method we get
+t=29
+printf("\n t=%f min ",t);
diff --git a/1052/CH21/EX21.10/2110.sce b/1052/CH21/EX21.10/2110.sce new file mode 100755 index 000000000..38c4ee6c4 --- /dev/null +++ b/1052/CH21/EX21.10/2110.sce @@ -0,0 +1,22 @@ +clc;
+//Example 21.10
+//page no 286
+printf("Example 21.10 page no 286\n\n");
+//a centrifugal pump is needed to transport water from sea level to 10000 feet above sea level
+//using bernoulli equation
+//neglectiing kinetic energy effects and frictional losses
+P1=14.7//atmospheric pressure at sea level,psi
+P2=10.2//atmospheric pressure at 10000 feet,psi
+z1=0//at sea level,ft
+z2=10000//height above sea level,ft
+rho=62.4//density of water
+g=32.2//gravitational acc.
+g_c=32.2//gravitational constant
+h_s=((P2-P1)*144/(rho) + (z2-z1)*(g/g_c))//work deliverd by the pump to the water,in ft.lbf/lb
+h_s=9990//ft.lbf/lb
+h_sf=h_s*50//in ft.lbf
+printf("\n work h_sf=%f ft.lbf/s",h_sf);
+//actual pump work is calculated by dividing the above terms by the frictional afficiency
+neta=0.65//frictional efficiency
+W_p=round((h_sf/550)/neta)//actual work
+printf("\n actual work W_p=%f hp",W_p);
diff --git a/1052/CH21/EX21.12/2112.sce b/1052/CH21/EX21.12/2112.sce new file mode 100755 index 000000000..f103401c9 --- /dev/null +++ b/1052/CH21/EX21.12/2112.sce @@ -0,0 +1,16 @@ +clc;
+//Example 21.12
+//page no 288
+printf("Example 21.12 page no 288\n\n");
+//refer to illustrative Example 21.4
+// if the pipe contains two globe valves and one straight through tee,what is the friction loss
+K_f_globe=6
+K_f_tee=0.4
+v=2.53// flow velocity
+g_c=32.2
+f=5/4//friction factor
+L=144//lenth of pipe
+D=62.4//diameter
+h_f=4*f*(L/D) + (2*K_f_globe + K_f_tee)*(v^2/(2*g_c))
+printf("\n frictional loss h_f=%f ft.lbf/lb",h_f);
+
diff --git a/1052/CH21/EX21.13/2113.sce b/1052/CH21/EX21.13/2113.sce new file mode 100755 index 000000000..cf5eda5e5 --- /dev/null +++ b/1052/CH21/EX21.13/2113.sce @@ -0,0 +1,23 @@ +clc;
+//Example 21.13
+//page no 289 figure 21.1
+printf("Example 21.13 page no 289 fig 21.1 \n\n\n");
+//a pitot tube is inserted in acircular pipe to measure the flow velocity
+// the tube is inserted so that it points upstream into the flow and the pressure sensed by thre probeis the stagnation pressure
+//the change in elevation between the tip of the pitot and the wall pressure tap is negligible
+//the flowing fluid is soyabean oil at 20 deg C and the fluid in manometer tube is mercury
+//point 2 is a stagnation point ,P2>P1 and the manometer fluid should be higher on th eleft side(h<0)
+rho_m=13600//density of mercury,kg/m^3
+h=0.04//height of mercury,
+rho=919//density of oil kg/m^3
+g=9.804
+D=0.055//diameter of pipe,m
+meu=0.04//viscosity of oil,kg.m.s
+v=sqrt(2*g*h*((rho_m/rho)-1))//flow velocity
+printf("\n flow velocity v=%f m/s",v);
+//assuming uniform velocity
+S=(%pi/4)*D^2
+m_dot=rho*v*S//mass flow rate
+R_e=(D*v*rho)/meu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+printf("\n mass flow rate m_dot=%f kg/s",m_dot);
diff --git a/1052/CH21/EX21.14/2114.sce b/1052/CH21/EX21.14/2114.sce new file mode 100755 index 000000000..023040daa --- /dev/null +++ b/1052/CH21/EX21.14/2114.sce @@ -0,0 +1,17 @@ +clc;
+//Example 21.14
+//page no 290
+printf("Example 21.14 page no 290\n\n");
+//given: a 50 ft pipe with flowing water ,we have to determine the flow rate if there is an expansion from 3/8 inch to 1/8 inch and immediatly back to 3/8n inch with an overall pressure loss no greater than 2lbf/ft^2
+//from table A.5 in the appendix
+S1=0.00133//cross sectional area of 3/8 inch pipe,ft^2
+S2=0.00211//cross sectional area of 1/2 inch pipe,ft^2
+K_e=(1-S1/S2)^2//expansion constant
+K_c=0.4*(1-S2/S1)^2//contraction constant
+L=50//length of pipe
+D=0.03125//diameter of pipe
+v=1.93//velocity ,ft/s
+f=0.01124//friction factor from table 21.3,for velocity estimated to be 1.93 ft/s
+g_c=32.2
+h_f=(4*f*L/D + K_e + K_c)*(v^2*g_c)//frictional loss
+printf("\n frictional loss h_f=%f ft.lbf/lb ",h_f);
diff --git a/1052/CH21/EX21.16/2116.sce b/1052/CH21/EX21.16/2116.sce new file mode 100755 index 000000000..d71bff687 --- /dev/null +++ b/1052/CH21/EX21.16/2116.sce @@ -0,0 +1,25 @@ +clc;
+//Example 21.16
+//page no 291
+printf("Example 21.16 page no 291\n\n");
+//water flows in a concrete pipe
+v_p=0.02// flow velocity,m/s
+D_p=1.5//diameter of pipe
+L_p=20//length of pipe,m
+rho_p=1000//density of water,kg/m^3
+meu_p=0.001//viscosity of water,kg/m.s
+K_p=0.003//roughnes factor,m
+//this prototype is to be modeled in a lab using a 1/3o th scale pipe
+D_m=D_p/30//D_m is diameter of modeled pipe
+L_m=L_p*(D_m/D_p)//length of modeled pipe
+K_m=K_p*(D_m/D_p)//roughness factor for modeled pipe
+//the fluid in the model is caster oil
+rho_m=961.3//densiy of oil, kg/m^3
+meu_m=0.0721//viscosity of oil,kg/m.s
+//since R_e = (rho_m*v_m*D_m)/meu_m = (rho_p*v_p*D_p)/meu_p
+v_m = (rho_p*v_p*D_p*meu_m)/(rho_m*D_m*meu_p)// flow velcity in molded pipe
+printf("\n flow velocity v_m=%f m/s",v_m);
+//pressure drop in prototype
+P_drop_m=1e+5//pressure drop in model
+P_drop_p=(P_drop_m*rho_p*(v_p)^2)/(rho_m*(v_m)^2)//pressure drop in prototype
+printf("\n pressure drop in prototype P_drop_p=%f Pa",P_drop_p);
diff --git a/1052/CH21/EX21.7/217.sce b/1052/CH21/EX21.7/217.sce new file mode 100755 index 000000000..d61bf3973 --- /dev/null +++ b/1052/CH21/EX21.7/217.sce @@ -0,0 +1,15 @@ +clc;
+//Example 21.7
+//Page no 284
+printf("Example 21.7 page no 284\n\n");
+// water is flowing through a 3/8 in schedule 40 brass pipe
+D=0.0411//diameter of pipe,ft
+S=0.00133//cross section area of pipe,ft^2
+meu=6.598e-4//viscosity of water from table A.4 in the appendix,lb/ft.s
+rho=62.4//density,lb/ft^3
+q_gpm=2//vol.flow rate
+q=q_gpm*0.00228//volumatric flow rate in ft^3s
+v=q/S//velocity of fluid
+printf("\n veloctiy of fluid v=%f ft/s",v);
+R_e=D*v*rho/meu//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
diff --git a/1052/CH21/EX21.8/218.sce b/1052/CH21/EX21.8/218.sce new file mode 100755 index 000000000..8d73af785 --- /dev/null +++ b/1052/CH21/EX21.8/218.sce @@ -0,0 +1,22 @@ +clc;
+//Example 21.8
+//page no 285
+printf("Example 21.8 page no 285\n\n");
+//water flowing through a pipe
+rho=62.4//density of water,lb/ft^3
+meu=6.72e-4//viscosity of water,lb/ft.s
+q_1gpm=1.5//vol. flow rate in gpm
+q_2gpm=6//vol. flow rate in gpm
+D_1=0.493//internal diameter of 3/8 in schdule pipe
+v11=(0.409*q_1gpm)/(D_1^2)//flow velocity for an 3/8 in pipe with 1.5 gpm flow rate
+v12=(0.409*q_2gpm)/(D_1^2)//flow velocity for an 3/8 pipe with 6 gpm flow
+R_e11=D_1*v11*rho/meu//reynolds no for case 11
+R_e12=D_1*v12*rho/meu//reynolds no for case 12
+printf("\n reynolds no R_e11=%f\n reynolds no R_e12=%f ",R_e11,R_e12);//printing mistake in book
+D_2=0.622//internal diameter of 1/2 in schdule pipe
+v21=(0.409*q_1gpm)/D_2^2//flow velocity for 1/2 pipe with 1.5 gpm
+v22=(0.409*q_2gpm)/D_2^2//flow velocity for 1/2 pipe with 6 gpm
+R_e21=D_2*v21*rho/meu//reynolds no for case 21
+R_e22=D_2*v22*rho/meu//reynolds no foe case 22
+printf("\n reynolds no R_e21=%f\n reynolds no R_e22=%f",R_e21,R_e22);
+//printing mistake in value of R_e
diff --git a/1052/CH21/EX21.9/219.sce b/1052/CH21/EX21.9/219.sce new file mode 100755 index 000000000..c9e7e7fb6 --- /dev/null +++ b/1052/CH21/EX21.9/219.sce @@ -0,0 +1,12 @@ +clc;
+//Example 21.9 page no 286
+printf("Example no 21.9 page no 286\n\n");
+//water is flowing in a vertical pipe
+//assume constant velocity
+P_drop=-4.5//pressure drop from bottom to top
+rho=62.4 //density of water
+z2=15//height of pipe
+z1=0//bottom level
+//applying bernoulli equation
+h_f=(P_drop/rho)+(z2-z1)//frictional loss
+printf("\n frictional loss h_f=%f ft.lbf/lb ",h_f)
diff --git a/1052/CH22/EX22.10/2210.sce b/1052/CH22/EX22.10/2210.sce new file mode 100755 index 000000000..9e61199d9 --- /dev/null +++ b/1052/CH22/EX22.10/2210.sce @@ -0,0 +1,32 @@ +clc;
+//Example 22.10
+//page no 306
+printf("\n Example 22.10 page no 306\n\n");
+//benzene is pumped from a large tank to a delivery station
+//refer fig 22.3
+q=0.003//vol. flow rate,m^3/s
+//tank is at atmosphric pressure
+D=0.03//diameter of suction and discharge line,m
+v_2=q/((%pi/4)*D^2)//discharge velocity,m/s
+//since all diameters are same likewise velocities are same
+v_3=v_2
+g=9.807//grav. acc.
+D_h=(v_3^2)/(2*g)//dynamic head
+printf("\n dynamic head D_h=%f m",D_h);
+z1=0//height at point 1,tank level
+z2=1.8//height at point 3
+//applying bernoulli's eq. between the top of the tank(open to theatomsphere)and the inlet to the pump(station3)
+rho=865//density of benzene,kg/m^3
+P3=101325-(z2+D_h)*(rho*g)//ptressure at point 3
+printf("\n pressure at point 3 P3=%f Pa",P3);
+P_v=26200//vapor pressure of benzene,Pa
+NPSH = (P3 - P_v)/(rho*g) + D_h
+printf("\n NPSH=%f m",NPSH)
+//the manufacturer NPSH is 8 m, which is greater than the calculated NPSH of 7.06m,therfore, the suction point of pump must be lowered
+//calculation of new pressure
+NPSH_m=8//NPSH by manufacturer
+P3_n_ab=8*(rho*g)-D_h*(rho*g) + P_v
+printf("\n new pressure at point 3 P3_n_ab=%f Pa absolute",P3_n_ab);
+P3_n_bz=-1.77//pressure in terms of benzene height,m
+z3=-P3_n_bz -D_h//desired height of point 3
+printf("\n height z3=%f m",z3);
diff --git a/1052/CH22/EX22.11/2211.sce b/1052/CH22/EX22.11/2211.sce new file mode 100755 index 000000000..b7b3cd228 --- /dev/null +++ b/1052/CH22/EX22.11/2211.sce @@ -0,0 +1,41 @@ +clc;
+//Example 22.11
+//page no 308
+printf("Example 22.11 page no 308\n\n");
+//a storage tank on top of a building pumps 60 deg F water through an open pipe to it from a reservoir
+q=1.36//vol. flow rate ,ft^3/s
+D=0.333//diameter of pipe,ft
+S=%pi/4*D^2//cross sectional area,ft^2
+v2=q/S//flow velocity,ft/s
+rho=62.37//density of water,lb/ft^3
+meu=1.129*6.72e-4//viscosity of water
+R_e=D*v2*rho/meu//reynolds no.
+printf("\n reynolds no. R_e=%f",R_e );
+//from R_e we can conclude that flow is turbulent
+k=0.0018//roughness factor
+K_r=k/D//relative roughness
+f=0.0046//friction factor
+L=525//length of pipe,ft
+g_c=32.174//grav. acc
+h_fp=(4*f*L*v2^2)/(D*2*g_c)//frictional loss due to the length of pipe
+printf("\n frictional loss h_fp=%f ft.lbf/lb",h_fp);
+//friction due to the fitings from table 18.1
+K_ff_gate=2*0.11//loss coeff. due to gates
+K_ff_elbows=5*0.64//loss coeff. due to elbows
+//friction due to the sudden contraction is obtained from eq. 18.10 .
+//note that D1/D2=0,since the upstream diameter is singnificantly larger than the downward diameter
+K_c=0.42//coeff. of sudden contraction
+K_e=1//coeff. of sudden expansion
+K_s=K_ff_gate +K_ff_elbows +K_e +K_c//sum of loss coeff.
+h_f=K_s*v2^2/(2*g_c)//friction losses due to fitting,expansion,contraction
+h_f_total=h_fp + h_f//total frictional losses
+printf("\n total frictional loss h_f_total=%f ft.lbf/lb",h_f_total);
+v1=0
+P_drop=0//pressure drop
+z1=0//reservoir water level
+z2=200//height of reservoir
+W_s=(v2^2-v1^2)/(2*g_c) + (z2-z1) + h_f_total//power requirement
+m_dot=q*rho//mass flow rate,lb/s
+neta=0.6//efficiency of pump
+W_dot_s=m_dot*W_s/(550*neta)//actual horsepower requirement
+printf("\n W_dot_s=%f hp",W_dot_s);
diff --git a/1052/CH22/EX22.12/2212.sce b/1052/CH22/EX22.12/2212.sce new file mode 100755 index 000000000..cf2e4cc60 --- /dev/null +++ b/1052/CH22/EX22.12/2212.sce @@ -0,0 +1,36 @@ +clc;
+//Example 22.12
+//Page no 311
+printf("Example 22.12 page no 311\n\n")
+//turpentine is being moved from a large storage tank to a blender through a 700 ft pipeline
+rho=62.4//density
+SG=0.872//specific gravity of terpentine
+rho_t=SG*rho//density of turpentine
+v=12.67//av. velocity of the turpentine in the line,ft/s
+z1=20//height of top surface in the storage tank above floor level,ft
+z2=90//height of discharge end of pipe,ft
+neta=0.74//efficiency of pump
+W_s=401.9//average energy delivered by pump,ft/lbf/lb
+g_c=32.174//grav.acc
+L=700//length of pipeline
+//from bernoulli eq.
+h_f= neta*W_s - v^2/(2*g_c) - (z2-z1)//frictional loss if there is no pressure drop
+printf("\n frictional loss h_f =%f ft.lbf/lb",h_f);
+k_c=0.4//coeff. of contraction
+k_e=0.9//coeff. of expansion
+k_f=0.2//coeff. of bends and valve
+//making equation(1) from the friction coeff. due to fittings between f and D,f=0.0293*D
+//making another equation(2) from Reynolds number in terms D ,R_e=582250*D
+//from trial and error method we get D
+D=0.184//diameter
+S=%pi*D^2/4//cross sectional area
+S=0.0266
+q=v*S//volumetric flow rate
+printf("\n q=%f ft^3/s ",q);
+m_dot=rho_t*q//mass flow rate
+bhp =m_dot*W_s/(550*neta)//brake horse power
+printf("\n brake horse power bhp=%f hp",bhp);
+
+
+
+
diff --git a/1052/CH22/EX22.13/2213.sce b/1052/CH22/EX22.13/2213.sce new file mode 100755 index 000000000..afbd77822 --- /dev/null +++ b/1052/CH22/EX22.13/2213.sce @@ -0,0 +1,39 @@ +clc;
+//Example 22.13
+//page no 313
+printf("Example 22.13 page no 313\n\n");
+//hydrogen flows through a horizontal pipe
+//properties of hydrogen at 20 deg C from table A.3 in the appendix
+rho=0.0838//density of hydrogen,kg/m^3
+meu=9.05e-6//viscosity,kg/m.s
+D=0.08//diameter of pipe,m
+L=1//unit length of pipe,m
+q=0.0004//vol. flow rate ,m^3/s
+S=.000503//cross sectional area
+v=q/S//flow velocity,m/s
+m_dot=rho*q//mass flow rate,kg/s
+R_e=(D*v*rho/meu)//reynolds no.
+printf("\n R_e reynolds no=%f ",R_e);
+//since R_e is 593<2100, flow is laminar
+//since the tube is horizontal z1=z2,calculation of pressure gradient(P/L)
+P_grad= 128*meu*q/(%pi*D^4)//pressure gradient
+printf("\n Pressure gradient P_grad=%f Pa/m",P_grad)
+v_max=2*v//m/s
+//calculation of fanning friction factor
+//since the flow is laminar
+f=16/R_e//fanning friction factor
+printf("\n fanning friction factor f=%f ",f);
+f_d=4*f//darcy friction factor
+printf("\n darcy friction factor f_d=%f ",f_d);
+g=9.807//grav. acc.
+h_f=f_d*(L/D)*(v^2/(2*g))//friction loss
+printf("\n friction loss h_f=%f m",h_f);
+W_f = m_dot*g*h_f//friction power loss
+printf("\n friction power loss W_f=%f W",W_f);
+
+
+
+
+
+
+
diff --git a/1052/CH22/EX22.14/2214.sce b/1052/CH22/EX22.14/2214.sce new file mode 100755 index 000000000..b52d046fa --- /dev/null +++ b/1052/CH22/EX22.14/2214.sce @@ -0,0 +1,43 @@ +clc;
+//Example 22.14
+//page no 315
+printf("\Example 22.14 page no 315\n\n");
+//gasoline is pump through a horizontal cast iron pipe
+L=30//length of pipe
+D=0.2//diameter of pipe,m
+S=(%pi/4)*D^2//cross sectional area
+q=0.3//vol. flow rate ,m^3/s
+v=q/S//flow velocity,m/s
+rho=680//density of gasoline,kg/m^3
+meu=2.92e-4//viscosity of gasoline,kg/m.s
+R_e=D*v*rho/meu//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
+//since R_e is >4000 flow is turbulent
+k=0.00026//roughness factor from table 14.1 for cast iron,m
+K_r=k/D//relative roughness
+f=0.00525//fanning friction factor from fig 14.2
+//Note that the flow corresponds to complete turbulence in the rough pipe
+g=9.807//gravitational acceleration
+//h_f=4*f*(L/D)*(v^2/(2*g))//head loss
+h_f=14.647
+//applying bernoulli equation to the fluid in the pipe
+//in this case the pipe is horizontal (z1=z2) with constant diameter (v1=v2) and no shaft head (h_s=0)
+//first convert the friction head to a pressure difference
+P_diff=rho*g*h_f//pressure difference
+P_diff= 97.68*10^3//after round off
+W_s_id=q*P_diff//ideal shaft work
+printf("\n ideal shaft work W_s_id=%f W ",W_s_id);
+neta=0.8//efficiency of pump
+W_s_ac=W_s_id/neta//actual shaft work
+printf("\n actual shaft work W_s_ac=%f W",W_s_ac);
+f_s=0.009//friction factor smooth
+f_r=0.021//friction factor roughnes
+k=f_r/f_s
+f_inc=100*(k-1)//percentage increment in f due to roughness
+printf("\n f_inc=%f ",f_inc);
+
+
+
+
+
+
diff --git a/1052/CH22/EX22.15/2215.sce b/1052/CH22/EX22.15/2215.sce new file mode 100755 index 000000000..063cbd53b --- /dev/null +++ b/1052/CH22/EX22.15/2215.sce @@ -0,0 +1,24 @@ +clc;
+//Example 22.15
+//page no 316
+printf("\n Example 22.15 page no 316\n\n")
+//liquid benzene flows through a smooth horizontal iron pipe
+D=2.3//diameter of pipe,m
+L=146.304//length of pipe,m
+S=(%pi/4)*D^2//cross sectional area,m^2
+q=4000//vol. flow rate,gal/min
+v=q/(S*264.17*60)//flow velocity
+printf("\n flow velocity v=%f m/s",v);
+rho=899//density of benzene
+meu=0.0008//viscosity of benzene,kg/m.s
+R_e = D*v*rho/meu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+//since the reynolds number falls in the turbulent regime,determine the fanning friction factor from fig. 14.2
+f=0.0032//fanning friction factor
+// calculation of pressure drop with the assumption of no height and velocity change , and no pump work
+//since only frictional losses are to be considered
+//applying eq. 14.3
+P_drop = 4*f*(L/D)*(v^2/2)*rho//pressure drop
+printf("\n pressure drop P_drop=%f Pa",P_drop);
+W_dot_f=q*P_drop/(264.17*60)//friction power loss
+printf("\n friction power loss W_dot_f=%f W",W_dot_f);
diff --git a/1052/CH22/EX22.16/2216.sce b/1052/CH22/EX22.16/2216.sce new file mode 100755 index 000000000..4ee19b488 --- /dev/null +++ b/1052/CH22/EX22.16/2216.sce @@ -0,0 +1,22 @@ +clc;
+//Example 22.16
+//page no 317
+printf("\n Example 22.16 page no 317\n\n");
+//a power plant employs steam to generate power
+//adiabatic conditions
+z1=0//steam vertical position at inlet,ft
+z2=-20//steam vertical position at outlet,ft
+v1=120//steam velocity at inlet,ft/s
+v2=330//steam velocity at outlet,ft/s
+H1=1505.4//steam enthalpy at inlet
+H2=940//steam enthalpy at outlet
+Q=0//for adiabatic conditions
+g_c=32.174//grav .acc
+//applying energy equation
+W_s=-(z2/778) - v2^2/(2*g_c*778) - H2 +z1 + v1^2/(2*g_c*778) + H1//work extracted from system
+printf("\n work extracted from the system W_s=%f Btu/lb ",W_s);
+m_dot=450000//mass flow rate ,lb/h
+W_dot_s=m_dot*W_s//total power generated by the turbine
+printf("\n W_dot_s =%f Btu/h",W_dot_s);//approx calculation in book
+W_hp=W_dot_s*3.927e-4//power generated in horsepower hp
+printf("\n power generated W_hp=%f hp",W_hp);//approx calculation in book
diff --git a/1052/CH22/EX22.4/224.sce b/1052/CH22/EX22.4/224.sce new file mode 100755 index 000000000..027a6e4d4 --- /dev/null +++ b/1052/CH22/EX22.4/224.sce @@ -0,0 +1,15 @@ +clc;
+//Example 22.4
+//page no 298
+printf("Example 22.4 page no 298\n\n");
+//a centrifugal pump operating at 1800 rpm ,we have to find the impeller diameter needed to develop a head of 200 ft
+h=200//height,ft
+g=32.2//gravitational acc. ft/s^2
+v=sqrt(2*g*h)//velocity needed to develop a head of 200 ft
+printf("\n velocity v=%f ft/s",v);
+N=1800//pump operating at this rotational speed,in rpm
+c=v*60/N//the number of feet that the impeller travels in one rotations
+//this c represents the circumference of the impeller since it is equal to one rotation
+printf("\n circumference c=%f ft/rotation",c);
+D=c/%pi//diameter of the impeller
+printf("\n diameter D=%f ft",D);
diff --git a/1052/CH22/EX22.5/225.sce b/1052/CH22/EX22.5/225.sce new file mode 100755 index 000000000..a628e68ae --- /dev/null +++ b/1052/CH22/EX22.5/225.sce @@ -0,0 +1,47 @@ +clc;
+//Example 22.5
+//page no 299
+printf("Example 22.5 page no 299\n\n");
+//water for a processing plant is required to be stored in a reservoir
+//assume the properties of water at 20 deg C are
+rho=998//density,kg/m^3
+meu=0.001//viscosity,N.s/m^2
+L=120//length of pipe,m
+D=0.15//diameter of pipe,m
+S=(%pi/4)*D^2//cross sectional area of pipe
+//given:
+q=1.2/60//volumetric flow rate,m^3/s
+v=q/S//flow velocity,m/s
+R_e=D*v*rho/meu//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+//from value of R_e ,flow is clearly turbulent
+k=0.0005//roughness factor for galvanized iron
+K_r=k/D//relative roughness
+f=0.0053//fricion factor from fig. 14.2
+h_f=4*f*(L/D)*(v^2/2)//friction loss of energy
+printf("\n h_f frictional loss=%f J ",h_f);
+//for right elbows (from table 18.1),the estimated value of resistance coff. K for one regular 90 deg elbows is 0.5
+K=4//resstance coeff.
+V_h=v^2/2//velociy head
+e_l=K*V_h//the total loss from the elbows
+printf("\n e_l total elbow loss=%f J/kg",e_l);
+//the energy to move 1 kg of water against a head of 22m of water is
+z=22//height,m
+g=9.81//grav. acc,m/s^2
+PE=z*g
+printf("\n potential energy PE=%f J/kg",PE);
+TE = h_f + e_l + PE//total requirement per kg
+printf("\n total energy TE=%f J/kg",TE);
+W_dot_s= TE*q*rho//theoretical power requirement
+printf("\n theoritical power W_dot_s=%f J/s",W_dot_s);
+h=TE/g//head equivalent to the energy requirement
+printf("\n equivalent head h=%f m ",h);
+
+
+
+
+
+
+
+
+
diff --git a/1052/CH22/EX22.6/226.sce b/1052/CH22/EX22.6/226.sce new file mode 100755 index 000000000..6f995b617 --- /dev/null +++ b/1052/CH22/EX22.6/226.sce @@ -0,0 +1,17 @@ +clc;
+//Example 22.6
+//page no 301
+printf("Example 22.6 page no 301\n\n");
+//oil is flowing through a standard 3/2 inch steel pipe containing a 1 inch square edged orifice
+v_gal=400//orifice velocity of oil in gal/hr
+v_o=400*144/(0.785*3600*7.48)//orifice velocity in ft/hr
+D_o=1/12//diameter of orifice
+rho=0.87*62.4//density of oil
+meu=20.6*0.000672//viscosity of oil
+R_e=D_o*v_o*rho/meu
+printf("\n reynolds no =%f ",R_e);
+D_r=0.62//ratio of orifice plate to pipe diametersD_o/D1 = 1/1.61
+C_d=0.76//discharge coeff. fro fig 19.8
+g=32.2//grav. acc. ft/s^2
+h=(v_o^2/(2*g*(C_d)^2))*(1-D_r^4)//height of oil in gauge reading
+printf("\n gauge reading h=%f ft ",h);
diff --git a/1052/CH22/EX22.7/227.sce b/1052/CH22/EX22.7/227.sce new file mode 100755 index 000000000..f94cadbaf --- /dev/null +++ b/1052/CH22/EX22.7/227.sce @@ -0,0 +1,23 @@ +clc;
+//Example 22.7
+//page no 302
+printf("Example 22.7 page no 302\n\n ");
+//natural gas consisting of essentially pure methane flows through a long straight standard 10 inch steel pipe into which is inserted a square edged orifice 2.50 inches in diameter ,with pressure taps ,each 5 inch from the orifice plate
+//manometer is attached across the orifice reads 1.60 in H20
+D_o=2.50//diameter of orifice
+D_1=10.15//diameter of plate
+D_r=D_o/D_1//ratio of diameters
+//assuming the reynolds no R_e in the orifice to be over 30,000
+C_o=0.61//coeff. of discharge from R_e value
+g=32.2//garv. acc ft/s^2
+rho_m=62.4//density of medium (water)
+rho=0.054//density of methane gas,lb/ft^3
+h=1.60//manometer reading height,in
+meu=12*0.011*0.000672//viscosity
+v_o= C_o*sqrt((2*g*h*rho_m)/(12*rho))// orifice velocity
+printf("\n orifice veloctiy v_o=%f ft/s",v_o);
+R_e_o=D_o*v_o*rho/meu//reynolds no in the orifice
+printf("\n R_e_o reynolds no =%f ",R_e_o);
+//from R_e_o value C_o=0.61 is permissible
+m_dot=round(v_o*(%pi/4)*(D_o^2)*rho*(3600/144))//mass flow rate
+printf("\n mass flow rate m_dot=%f lb/hr",m_dot);
diff --git a/1052/CH22/EX22.8/228.sce b/1052/CH22/EX22.8/228.sce new file mode 100755 index 000000000..3983a3e13 --- /dev/null +++ b/1052/CH22/EX22.8/228.sce @@ -0,0 +1,27 @@ +clc;
+//Example 22.8
+//page no 303
+printf("Example 22.8 page no 303\n\n");
+//refer to fig 22.1
+D1=.1//upstream diameter(at station 1),m
+D2=.06//downstream diameter(station 2),m
+S2=(%pi/4)*D2^2//cross sectional area at point 2
+rho=1.22//density of air from ideal gas law
+rho_m=827//density of medium,kg.m^3
+g=9.8//gravitational acc.
+h=0.08//manometer head,m
+//from bernoulli equation
+v2=sqrt(2*g*h*((rho_m/rho)-1))//velocity at point 2
+v1=v2*(D2/D1)^2//velocity at point 1
+q=v2*S2//volumatric flow rate
+printf("\n vol.flow rate q=%f m^3/s",q);
+//calculation of mach number from equation 15.1
+T=293//temperature in k
+c=20*sqrt(T)//speed of light at this temperature,m/s
+M_a=v2/c//mach no.
+printf("\n mach no. M_a =%f ",M_a);
+//noting that M_a=0.095 < 0.3 , we can conclude that flow is incompressible//given
+P1=130000 //absolute pressure at point 1,pa
+//by using bernoulli eq for P2
+P2=P1-rho*v2^2*(1-(D2/D1)^4)/2//pressure at point 2
+printf("\n pressure at point 2=%f Pa",P2);
diff --git a/1052/CH22/EX22.9/229.sce b/1052/CH22/EX22.9/229.sce new file mode 100755 index 000000000..3d5747b7d --- /dev/null +++ b/1052/CH22/EX22.9/229.sce @@ -0,0 +1,21 @@ +clc;
+//Example 22.9
+//page no 305
+printf("\n Example 22.9 page no 305\n\n");
+//water is flowing from an elevated reservoir through a conduit to a turbine at a lower level and out of the turbine through a similar conduit
+//refer to fig 22.2
+//since the diameter of the conduit is the same at location 1 and 2 ,kinetic energy effects can be neglected and bernoulli eq. takes the form
+//P/rho + z(g/g_c) -h_s + h_f = 0
+P1=30///pressure at point 1,psia
+z1=300//height of point 1,ft
+P2=18//pressure at point 2,psia
+z2=-10//height of point 2,ft
+rho=62.4//density
+m_dot=3600//mass flow rate,tons/hr
+W_dot =1000//output at the shaft of turbine,hp
+neta=0.9//efficiency of turbine
+h_s=W_dot*550*3600/(neta*m_dot*2000)//
+printf("\n h_s =%f ft.lbf/lb",h_s);
+//put this value in bernoulli eq.
+h_f=(P2-P1)*144/rho + (z2-z1) -h_s//frictional loss
+printf("\n frictional loss h_f=%f ft.lbf/lb",h_f)
diff --git a/1052/CH23/EX23.1/231.sce b/1052/CH23/EX23.1/231.sce new file mode 100755 index 000000000..d2170661e --- /dev/null +++ b/1052/CH23/EX23.1/231.sce @@ -0,0 +1,11 @@ +clc;
+//Example 23.1 page no 323
+printf("Example 23.1 page no 323\n\n");
+//calculation of aerodynamic diameter for the following particles
+d_es=1.4//equivalent dia of solid sphere,micrometer
+sg_s=2//specific gravity of solid sphere
+d_eh=2.8//equivalent diameter of hollow sphere, mirometer
+sg_h=0.51//specific gravity of hollow sphere
+d_pa1=d_es*sqrt(sg_s)//aerodynamic dia for solid sphere
+d_pa2=round(d_eh*sqrt(sg_h))//aerodynamic dia for hollow sphere
+printf("\n d_pa1=%f micron\nd_pa2=%f micron",d_pa1,d_pa2);
diff --git a/1052/CH23/EX23.2/232.sce b/1052/CH23/EX23.2/232.sce new file mode 100755 index 000000000..1782871f5 --- /dev/null +++ b/1052/CH23/EX23.2/232.sce @@ -0,0 +1,8 @@ +clc;
+//Example 23.2 page no 323
+printf("Example 23.2 page no 323\n\n");
+//calculation of aerodynamic diameter of irregular saped sphere
+d_e=1.3//eq. diameter,micron
+sg=2.35
+d_pa=d_e*sqrt(sg)//aerodynamic diameter
+printf("\n aerodynamic diameter d_pa=%f micron",d_pa);
diff --git a/1052/CH23/EX23.3/233.sce b/1052/CH23/EX23.3/233.sce new file mode 100755 index 000000000..b393cf7c7 --- /dev/null +++ b/1052/CH23/EX23.3/233.sce @@ -0,0 +1,9 @@ +clc;
+//Example 23.3 page no 335
+printf("Example 23.3 page no 335\n\n");
+//calculation of cunningham correction factor
+dp=0.4//particle diameter
+lemda=6.53e-2
+A=1.257 + 0.40*exp(-1.10*dp/(2*lemda))
+C= 1 + 2*A*lemda/dp//cunningham correction factor(CCF)
+printf("CCF C=%f ",C);
diff --git a/1052/CH23/EX23.4/234.sce b/1052/CH23/EX23.4/234.sce new file mode 100755 index 000000000..367df8b74 --- /dev/null +++ b/1052/CH23/EX23.4/234.sce @@ -0,0 +1,50 @@ +clc;
+//Example 23.4
+//page no 336
+printf("Example 23.4 page no 336\n\n");
+//three different diameter sized fly ash particls settle through air
+//we have to calculate the particle terminal velocity and determine how far each will fall in 30 seconds
+//assume the particles are speherical
+SG=2.31//specific gravity of fly ash
+rho_w=62.4//density of water
+rho_p=SG*rho_w//density of particles
+//properties of air
+R=0.7302//gas constant
+T=698//temperature,R
+P=1//pressure ,atm
+Mw=29//mol. wt of air
+rho_a=P*Mw/(R*T)//density of air,lb/ft^3
+meu=1.41e-5//viscosity of air,lb/ft.s
+g=32.174//grav. acc
+D1=0.4//diameter of particle 1,microns
+D2=40//diameter of particle 2,microns
+D3=400//diameter of particle 3,microns
+K1=(D1/(25400*12))*(g*rho_p*rho_a/(meu^2))^(1/3)//dimensionless constant for particle 1
+K2=(D2/(25400*12))*(g*rho_p*rho_a/(meu^2))^(1/3)//dimensionless constant for particle 2
+K3=(D3/(25400*12))*(g*rho_p*rho_a/(meu^2))^(1/3)//dimensionless constant for particle 3
+printf("\n dimensionless constant K1=%f \n K2=%f \n K3=%f ",K1,K2,K3);
+//first we determine which fluid particle dynamic law applies for the above values of K
+//for particle 1,strokes law applies
+//for particle 2,strokes law applies
+//for particle 3,intermediate law applies
+//terminal settling velocity for each particle
+v1=(D1/(25400*12))^2*g*rho_p/(18*meu)
+printf("\n terminal settling velocity for particle 1 v1=%f ft/s",v1);
+v2=(D2/(25400*12))^2*g*rho_p/(18*meu)
+printf("\n terminal settling velocity v2=%f ft/s",v2);
+v3=(D3/(25400*12))^1.14*0.153*g^0.71*rho_p^0.71/(rho_a^0.29*meu^0.43)
+printf("\n terminal settling velocity v3=%f ft/s ",v3);
+//calculation of how far x,the fly ash particles will fall in 30 seconds
+t=30//time,sec
+x2=v2*t//distance travel by 2 particle
+x3=v3*t//distance travel by 3 particle
+printf("\n distance by 2 particle x2=%f ft\n distance by 3 particle x3=%f ft",x2,x3);
+//for 1 particle K1 and v1 value are without the CCF.With the correction factor lemda=6.53e-8,gives
+lemda=6.53e-8//correction factor
+y=-1.10*(D1/(25400*12))/(2*lemda)
+A =1.257 + 0.40*exp(y)
+C=1 + 2*A*lemda/(D1/(25400*12))//cunningham correction factor(ccf)
+//now equation 23.36 can be employed
+v1_corrected=v1*C//corrected velocity of 1 particle
+x1=v1_corrected*t//distance travel by 1 particle
+printf("\n distance travel by 1 particle x1=%f ft",x1);
diff --git a/1052/CH23/EX23.5/235.sce b/1052/CH23/EX23.5/235.sce new file mode 100755 index 000000000..df2750757 --- /dev/null +++ b/1052/CH23/EX23.5/235.sce @@ -0,0 +1,24 @@ +clc;
+//Example 23.5
+//page no 338
+printf("\n Example 23.5 page no 338\n\n");
+//refer to example 23.5
+//we have to calculate size of a flyash particle that will settle with a velocity of 1.384 ft/s
+SG=2.31//specific gravity of fly ash
+rho_w=62.4//density of water
+rho_p=SG*rho_w//density of particles
+//properties of air
+R=0.7302//gas constant
+T=698//temperature,R
+P=1//pressure ,atm
+Mw=29//mol. wt of air
+rho_a=P*Mw/(R*T)//density of air,lb/ft^3
+meu=1.41e-5//viscosity of air,lb/ft.s
+g=32.174//grav. acc
+v=1.384//velocity at which particle settle down,ft/s
+W= v^3*rho_a^2/(g*rho_p*meu)//dimensionless constant
+printf("\n dimensionless constant W=%f ",W);
+//since W < 0.2222 stokes' law applies
+D_p=sqrt(18*meu*v/(g*rho_p))//diameter of particle
+printf("\n diameter of particle D_p=%f ft",D_p);
+
diff --git a/1052/CH23/EX23.7/237.sce b/1052/CH23/EX23.7/237.sce new file mode 100755 index 000000000..b7d224c84 --- /dev/null +++ b/1052/CH23/EX23.7/237.sce @@ -0,0 +1,50 @@ +clc;
+//Example 23.7
+//page no 340
+printf("\n Example 23.7 page no 340\n\n");
+// In a plant manufacturing ivory soap detergent explodes one windy day
+//we have to calculate the distance from the plant where the soap particles will start to deposit and where they will cease to deposit
+//the smallest particle wll travel the greatest distance while the largest will travel the least distance
+//for the minimumdistance ,we use largest particle
+D_l=3.28e-3//largest diameter,ft
+g=32.174//grav. acc.
+SG=0.8//specific gravity of soap particle
+rho_w=62.4
+rho_p=SG*rho_w//density of particle
+rho_a=0.0752//density of given atmosphere,lb/ft^3
+meu=1.18e-5//viscosity
+K_l = D_l*(g*(rho_p-rho_a)*rho_p/(meu^2))^(1/3)//dimensionless constant
+printf("\n dimensionless constant K_l=%f ",K_l);
+//value of K indicates the intermediate range applies
+//the settling velocity is given by
+v_l=0.153*g^0.71*D_l^1.14*rho_p^0.71/(meu^0.43*rho_a^0.29)
+printf("\n settling velocity v_l=%f ft/s",v_l);
+H=400//vertical height blowen by particle,ft
+t_l=H/v_l//descent time
+v_w=20//wind velocity in miles/h
+L=t_l*v_w*(5280/3600)//horizontal distance travelled by particles
+printf("\n descent time t_l=%f second\n horizontal distance L=%f ft",t_l,L);
+//for the minimum distance we use smallest particle
+D_s=6.89e-6//diameter of smallest particle,ft
+K_s=D_s*(g*(rho_p-rho_a)*rho_a/(meu^2))^(1/3)
+printf("\n dimensionless constant K_s=%f ",K_s);
+//velocity is in the stokes regime and is given by
+v_s=g*D_s^2*rho_p/(18*meu)
+printf("\n settling velocity v_s=%f ft/s",v_s);
+t_s=H/v_s//descent time
+L_s=t_s*v_w*(5280/3600)//horizontal distance travelled
+printf("\n descent time t_s=%f s\nhorizontal distance travelled by smallest particle L_s=%f ft",t_s,L_s);
+m=100*2000//mass of particles
+V_act=m/rho_p//actual volume of particles
+e=0.5//void fraction
+V_b=V_act/e//bulk volume
+printf("\ actual volume V_act=%f ft^3\nbulk volume V_b=%f ",V_act,V_b);
+L_d=L_s-L//length of drop area
+printf("\n L_d=%f ",L_d);
+W=100//width ,ft
+A_d=L_d*W//deposition area
+H_d=V_b/A_d//deposition height
+printf("\n deposition height H_d=%f ft",H_d);
+//deposition height can be ,at bestt, described asa sprinkling
+
+
diff --git a/1052/CH23/EX23.8/238.sce b/1052/CH23/EX23.8/238.sce new file mode 100755 index 000000000..6e9f4fec9 --- /dev/null +++ b/1052/CH23/EX23.8/238.sce @@ -0,0 +1,42 @@ +clc;
+//Example 23.8
+//page no 342
+printf("Example 23.8 page no 342\n\n");
+//a small sphere is observed to fall through caster oil
+v_t=0.042//terminal velocity of particle
+meu_f=0.9//viscosity of oil
+rho_f=970//density of oil
+g=9.807//grav. acc.
+D_p=0.006//diameter of particle
+rho_p=(18*meu_f*v_t)/(g*D_p^2) + rho_f
+printf("\n density of particle rho_p=%f kg/m^3",rho_p);
+neu_f=9.28e-4//dynamic viscosity of fluid
+R_e=D_p*v_t/neu_f//reynolds no
+printf("\n reynolds no R_e=%f ",R_e);
+//since R_e < 0.3
+//calculation of the settling criterion factor ,K
+K=D_p*(g*rho_f*(rho_p-rho_f)/(meu_f^2))^(1/3)//the settling criterion factor
+printf("\n K=%f ",K);
+//since K <3.3, stokes law applies
+//the drag coeff. C_d
+C_d=24/R_e
+printf("\n drag coeff C_d=%f ",C_d);
+F_d=3*%pi*meu_f*D_p*v_t//drag force
+printf("\n drag force F_d=%f N",F_d);
+F_b=(%pi/6)*D_p^3*rho_f*g//buoyancy force
+printf("\n buoyancy force F_b=%f N",F_b);
+//Consider the case when same sphere is dropped in water
+rho_w=1000//density of water,kg/m^3
+meu_w=0.001//viscosity of water,kg/m.s
+//the particle will move faster because of the lower viscosity of water ,stokes law will almost definietly not apply
+K_w=D_p*(g*rho_w*(rho_p-rho_w)/(meu_w^2))^(1/3)//the settling criterion factor
+printf("\n k_w settling factor =%f ",K_w);
+//since K_w = 158 > 43.6,the flow is in the Newton's law regime
+//employ eq. 23.31 but include the (buoyant) density ratio factor
+v_t_w=1.75*sqrt((rho_p-rho_w)/(rho_w)*g*D_p)//terminal velocity
+printf("\n terminal velocity in water v_t_w=%f m/s",v_t_w);
+
+
+
+
+
diff --git a/1052/CH23/EX23.9/239.sce b/1052/CH23/EX23.9/239.sce new file mode 100755 index 000000000..daf1e3f19 --- /dev/null +++ b/1052/CH23/EX23.9/239.sce @@ -0,0 +1,18 @@ +clc;
+//Example 23.9
+//page no 344
+printf("Example 23.9 page no 344\n\n");
+//the bottom of a ship,moving in water
+rho=1000//density of water
+v=12//velocity of boat,m/s
+L=20//length,m
+W=5//width ,m
+meu=1e-3//viscosity
+R_e=rho*v*L/meu//reynolds no
+printf("Reynolds no R_e=%f ",R_e);
+//from reynolds no flow is turbulent
+C_d=0.031/(R_e^(1/7))//coeff. discharge\
+printf("\ncoeff. discharge C_d=%f ",C_d);
+//calculation of the drag on area LW
+F_d=(1/2)*C_d*rho*v^2*L*W//drag force
+printf("\n drag force F_d=%f N",F_d);
diff --git a/1052/CH24/EX2.3/243.sce b/1052/CH24/EX2.3/243.sce new file mode 100755 index 000000000..6bb50d6f9 --- /dev/null +++ b/1052/CH24/EX2.3/243.sce @@ -0,0 +1,25 @@ +clc;
+//Example 24.3
+//page no 352
+printf("Example 24.3 page no 352\n\n");
+//classification of small speherical particles of charcoal with a specific gravity of 2.2
+//the particles are falling in a vertical tower against a rising current of air
+//we have to calculate the minimum size of charcoal that will settle down to the bottom of the tower
+rho =0.075//density of air,lb/ft^3
+meu=1.23e-5//viscosity of air,lb/ft.s
+//assume stokes law to apply
+SG=2.2//specific gravity of charcoal
+rho_w=62.4//density of water
+rho_p=SG*rho_w//density of charcoal
+v=15//velocity of air
+g=32.2//grav. acc
+D_p1=(18*meu*v/(g*rho_p))^0.5
+K1 = D_p1*(g*rho*rho_p/meu^2)^(1/3)//settling factor
+printf("\n settling factor K1=%f ",K1);
+//from value of K,stokes law does not apply
+//therefore,assume Intermediate range law applies
+D_p =((v*rho^0.29*meu^0.43)/(0.153*(g*rho_p)^0.71))^(1/1.14)
+printf("\n particle diameter= D_p=%f ft ",D_p);
+K_n=(D_p/D_p1)*K1
+printf("\n final settling factor K_n=%f",K_n)
+//since the result is correct for the intermediate range
diff --git a/1052/CH24/EX24.1/241.sce b/1052/CH24/EX24.1/241.sce new file mode 100755 index 000000000..172c0e4d5 --- /dev/null +++ b/1052/CH24/EX24.1/241.sce @@ -0,0 +1,28 @@ +clc;
+//Example 24.1
+//page no 350
+printf("Example 24.1 page no 350\n\n");
+//glass sphere are settling in water at 20 deg C
+//the slurry contains 60 wt% solids
+// start by assuming a basis of 100 kg of slurry
+m_f=40//mass of fluid,kg
+rho_f=998//density of water,kg/m^3
+V_f=m_f/rho_f//volume of the fluid,m^3
+m_s=60//mass of solid,kg
+rho_p=2467//density of glass,kg/m^3
+V_s=m_s/rho_p//volume of glass,m^3
+V = V_f + V_s//total volume,m^3
+v_frac_f = V_f/V//volume fraction for the fluid particles
+printf("\n volume fraction fluid particles v_frac_f =%f ",v_frac_f);
+v_frac_p=1-v_frac_f//volume fraction for the glass particles
+printf("\n volume fraction for the glass particles v_frac_p=%f ",v_frac_p);
+rho_m=round(v_frac_f*rho_f + v_frac_p*rho_p)//bulk density of slurry
+printf("\n bulk density of slurry rho_m=%f kg/m^3 ",rho_m);
+b=10^(1.82*(1-v_frac_f))//dimensionless correction factor
+g=9.807//gravitational acc.,m/s^2
+D_p=0.0001554//diameter of particle,m
+meu_f=0.001//viscosity of fluid
+v_t = g*D_p^2*(rho_p-rho_f)*v_frac_f^2/(18*meu_f*b)//terminal velocity
+printf("\n terminal velocity v_t=%f m/s",v_t);
+meu_m = meu_f*b//effective mixture viscosity
+printf("\n effective mixture viscosity meu_m=%f kg/m.s",meu_m);
diff --git a/1052/CH24/EX24.10/2410.sce b/1052/CH24/EX24.10/2410.sce new file mode 100755 index 000000000..4654c4b2b --- /dev/null +++ b/1052/CH24/EX24.10/2410.sce @@ -0,0 +1,21 @@ +clc;
+//Example 24.10
+//page no 362
+printf("Example 24.10 page no 362\n\n");
+//air is being dried by bubbling through concentrated NaOH
+q=4/60//flow rate of air,ft^3/min
+D=2.5/12//diameter of tube
+S=(%pi/4)*D^2//cross sectional area
+v=q/S//velocity of air,ft/s
+meu=1.23e-5//viscosity of NaOH
+rho=0.0775//density of air
+g=32.2//grav. acc.
+SG=1.34//specific gravity of NaOH
+rho_w=62.4//density of water
+rho_p=SG*rho_w//density of NaOH
+D_p_max = [v*(rho^0.29)*(meu^0.43)/(0.153*(g*rho_p)^0.71)]^(1/1.14)//assuming that the intermediate range applies ,maximum diamter of particle
+printf("\nD_p_max=%f ",D_p_max);
+//settling factor
+K=D_p_max*(g*rho*rho_p/(meu^2))^(1/3)
+printf("\n settling factor K=%f ",K);
+//tus result for D_p_max is correct
diff --git a/1052/CH24/EX24.2/242.sce b/1052/CH24/EX24.2/242.sce new file mode 100755 index 000000000..9baf908a4 --- /dev/null +++ b/1052/CH24/EX24.2/242.sce @@ -0,0 +1,28 @@ +clc;
+//Example 24.2
+//page no 352
+printf("Example 24.2 page no 352\n\n");
+//refer to example 24.1
+m_f=40//mass of fluid,kg
+rho_f=998//density of water,kg/m^3
+V_f=m_f/rho_f//volume of the fluid,m^3
+m_s=60//mass of solid,kg
+rho_p=2467//density of glass,kg/m^3
+V_s=m_s/rho_p//volume of glass,m^3
+V = V_f + V_s//total volume,m^3
+v_frac_f = V_f/V//volume fraction for the fluid particles
+printf("\n volume fraction fluid particles v_frac_f =%f ",v_frac_f);
+v_frac_p=1-v_frac_f//volume fraction for the glass particles
+printf("\n volume fraction for the glass particles v_frac_p=%f ",v_frac_p);
+rho_m=round(v_frac_f*rho_f + v_frac_p*rho_p)//bulk density of slurry
+printf("\n bulk density of slurry rho_m=%f kg/m^3 ",rho_m);
+b=10^(1.82*(1-v_frac_f))//dimensionless correction factor
+g=9.807//gravitational acc.,m/s^2
+D_p=0.0001554//diameter of particle,m
+meu_f=0.001//viscosity of fluid
+v_t = g*D_p^2*(rho_p-rho_f)*v_frac_f^2/(18*meu_f*b)//terminal velocity
+printf("\n terminal velocity v_t=%f m/s",v_t);
+meu_m = meu_f*b//effective mixture viscosity
+printf("\n effective mixture viscosity meu_m=%f kg/m.s",meu_m);
+R_e=rho_m*v_t*D_p/(meu_m*v_frac_f)//reynolds no.
+printf("\n reynolds no R_e=%f ",R_e);
diff --git a/1052/CH24/EX24.4/244.sce b/1052/CH24/EX24.4/244.sce new file mode 100755 index 000000000..0525d89d9 --- /dev/null +++ b/1052/CH24/EX24.4/244.sce @@ -0,0 +1,10 @@ +clc;
+//Exmple 24.4
+//page no 354
+printf("Example 24.4 page no 354\n\n");
+//a particle is spining in a 3 inch ID centrifuge
+r=3/12//radius of centrifuge,ft
+omega=30//rotational speed,rad/s
+g=32.2
+G=round(r*omega^2/g)
+printf("\n G=%f ",G);
diff --git a/1052/CH24/EX24.5/245.sce b/1052/CH24/EX24.5/245.sce new file mode 100755 index 000000000..ac55ac080 --- /dev/null +++ b/1052/CH24/EX24.5/245.sce @@ -0,0 +1,13 @@ +clc;
+//Example 24.5
+//page no 357
+printf("Example 24.5 page no 357\n\n");
+//a circular cylinder filled with water is rotated a uniform ,steady angular speed about it's central axis in rigid body motion
+//since the cylinder is full the water will spill the moment the cylinder starts to spin ,spilling occur when omega > 0 rpm
+// to determine the angular speed for 1/3 of the water to spill , consider the cylinder at rest when 1/3 of the water has already beem spilled
+g=32.174//grav. acc
+R = 0.25 //radius of cylinder
+z_st=2/3//the stationary height, ft
+h = 2*(1-z_st)//increase in height is h/2,ft
+omega=sqrt(4*g*(h/2)/R^2)
+printf("\n omega =%f rad/s",omega);
diff --git a/1052/CH24/EX24.6/266.sce b/1052/CH24/EX24.6/266.sce new file mode 100755 index 000000000..12d03b345 --- /dev/null +++ b/1052/CH24/EX24.6/266.sce @@ -0,0 +1,13 @@ +clc;
+//Example 26.6
+//page no 392
+printf("Example 26.6 page no 392\n\n");
+//a bed of pulverized is to be fluidized with liquid oil
+D=4//diameter of bed ,ft
+d_p=0.00137//particle diameter ,ft
+rho_s=84//coal particle density ,lb/ft^3
+rho_f=55//oil density,lb/ft^3
+e_mf=0.38//void fraction
+L_mf=8//bed height at minimum fluidization,ft
+P_drop=(rho_s-rho_f)*(1-e_mf)*L_mf +rho_f*L_mf
+printf("\npressure drop P_drop=%f psf",P_drop);
diff --git a/1052/CH24/EX24.7/247.sce b/1052/CH24/EX24.7/247.sce new file mode 100755 index 000000000..30e5495f1 --- /dev/null +++ b/1052/CH24/EX24.7/247.sce @@ -0,0 +1,34 @@ +clc;
+//Example 24.7
+//page no 358
+printf("Example 24.7 page no 358\n\n");
+//a cylindrical cup open to the atmosphere is filled with liquid to a height of 7 cm
+//rotated around it's axis
+//calculation of an angular velocity that will cause the liquid to start spilling
+h=0.03//height,m
+R=0.03//radius,cm
+//applying eq. 24.22
+g=9.807//grav. acc
+omega=sqrt(2*h*g/(R^2))
+omega=36.2//printing mistake in book
+//calculation of pressure at point A and B that is P_a and P_b
+z=.1//liquid height above point A and B,m
+rho=1010//density of liquid,kg/m^3
+P_a = rho*g*z
+P_b=P_a//from symmetry P_a = P_b
+printf("\n pressure P_a=%f Pa_gauge\n pressure P_b=%f Pa_gauge",P_a,P_b);
+z_c=0.04//liquid height above point c,m
+P_c=rho*g*z_c//pressure at point c
+printf("\n pressure P_c=%f Pa_gauge",P_c);
+//to obtain the film thicknes,we have to find the original height
+z_l=0.07//liquid height ,m
+h_o=z_l-z_c//original height
+r = 100*sqrt(2*h_o*g/(omega^2))//100 for centimeter
+printf("\n r=%fcm ",r);
+R=3
+t_f=R-r//thikness of film
+printf("\n thickness film t_f=%f m",t_f);//printing mistake in book
+
+
+
+
diff --git a/1052/CH24/EX24.8/248.sce b/1052/CH24/EX24.8/248.sce new file mode 100755 index 000000000..4509fb284 --- /dev/null +++ b/1052/CH24/EX24.8/248.sce @@ -0,0 +1,29 @@ +clc;
+//Example 24.8
+//page no 360
+printf("Example 24.7 page no 358\n\n");
+//It is desired to separate quartz particles from galena particles
+SG_q = 2.65//specific gravity of quartz particle
+SG_g=7.5//specific gravity of galena particles
+rho_f=1000//density of water
+rho_q=SG_q*rho_f//density of quartz paticles
+rho_g=SG_g*rho_f//density of galena particle
+//calculation of the settling veloctiy of the largest quartz particle with a diameter
+D_q=9e-5//diameter of largest particle of quartz
+g=9.807//grav. acc
+meu_f=0.001//viscosity of water
+K_q = D_q*(g*(rho_q-rho_f)*rho_f/(meu_f^2))^(1/3)//settling factor
+printf("\n settling factor K_q=%f ",K_q);
+//since K =2.27<3.3,stokes flow regime applies ,from the equation 23.36
+v_q=g*D_q^2*(rho_q-rho_f)/(18*meu_f)//settling velocity of thelargest quartz particle
+printf("\n settling velocity (quartz) v_q=%f m/s",v_q);
+//calculation of the settling velocity of the smallest galena partilce
+d_g=4e-5//diameter of smallest galena particle
+K_g = d_g*(g*(rho_g-rho_f)*rho_f/(meu_f^2))^(1/3)//settling factor
+printf("\n settling factor K_g=%f ",K_g);
+//since K = 1.6<3.3,stokes flow regime again applies
+v_g=g*d_g^2*(rho_g-rho_f)/(18*meu_f)//settling velocity for galena particles
+printf("\n setling velocity v_g=%f m/s",v_g);
+//to obtain pure galena the upward velociy of the water must be equal to or greater than the settling veloctiy of the quartz particle
+v_w=v_q//velocity of water
+printf("\n water velocity v_w=%f m/s",v_w);
diff --git a/1052/CH24/EX24.9/249.sce b/1052/CH24/EX24.9/249.sce new file mode 100755 index 000000000..50ae02f82 --- /dev/null +++ b/1052/CH24/EX24.9/249.sce @@ -0,0 +1,23 @@ +clc;
+//Example 24.9
+//page no 361
+printf("\n Example 24.9 page no 361\n\n");
+//refer to illustrative example 24.8
+//we have to determine the size range of the galena in the top product
+//to determine the size range of the galena product ,calculate the galena particle size that has a settling velocity equal to water velocity
+//assume stokes law applies
+v_w=0.0073//velocity of water
+v_q=v_w//velocity of quartz particles
+SG_q = 2.65//specific gravity of quartz particle
+SG_g=7.5//specific gravity of galena particles
+rho_f=1000//density of water
+rho_q=SG_q*rho_f//density of quartz paticles
+rho_g=SG_g*rho_f//density of galena particle
+g=9.807//grav. acc
+meu_f=0.001//viscosity of water
+D = sqrt(18*meu_f*v_q/(g*(rho_g-rho_f)))
+printf("\n diameter D =%f m",D);
+//check on the validity of stokes law by calculating the K factor
+K = D*(g*(rho_g-rho_f)*rho_f/(meu_f^2))^(1/3)//settling factor
+printf("\n settling factor K=%f ",K);
+//since K =1.82<3.3 , the flow is in the stokes law range
diff --git a/1052/CH25/EX25.1/251.sce b/1052/CH25/EX25.1/251.sce new file mode 100755 index 000000000..23b3ef094 --- /dev/null +++ b/1052/CH25/EX25.1/251.sce @@ -0,0 +1,12 @@ +clc;
+//Example 25.1
+//page no 370
+printf("Example 25.1 page no 370\n\n");
+//calculation of efffective particle diameter for a set of packing
+V=0.2//packing volume
+n=100//no. of particle assume
+V_p=V*1000/n//the volume of single particle,mm^2//
+S_p=2.18//average surface area of particle,mm^2
+a_p=S_p/V_p//specific surface area of particle ,(mm)^-1
+D_p = 6/a_p//effective diameter of particle,mm
+printf("\n effective partcle diameter D_p=%f mm ",D_p);
diff --git a/1052/CH25/EX25.2/252.sce b/1052/CH25/EX25.2/252.sce new file mode 100755 index 000000000..9cf094fa2 --- /dev/null +++ b/1052/CH25/EX25.2/252.sce @@ -0,0 +1,18 @@ +clc;
+//Example 25.2
+//page no 371
+printf("Example 25.2 page no 371\n\n");
+//refer to example 25.1
+V=0.2//packing volume
+n=100//no. of particle assume
+V_p=V*1000/n//the volume of single particle,mm^2//
+S_p=2.18//average surface area of particle,mm^2
+a_p=S_p/V_p//specific surface area of particle ,(mm)^-1
+D_p = 6/a_p//effective diameter of particle,mm
+D_p=5.50//round off value for accurate answer
+rho=0.235//density of fluid,g/cm^3
+meu=2e-4//viscosity,g/cm.s
+v=10//interstitial velocity ,cm
+R_e=round((D_p/v)*rho*v/meu)//reynolds no
+printf("\n Reynolds no R_e=%f ",R_e);
+//from R_e value we can conclude that the flow of fluid would be in the turbulent region
diff --git a/1052/CH25/EX25.3/253.sce b/1052/CH25/EX25.3/253.sce new file mode 100755 index 000000000..f20c331a2 --- /dev/null +++ b/1052/CH25/EX25.3/253.sce @@ -0,0 +1,14 @@ +clc;
+//Example 25.3
+//page no 372
+printf("Example 25.3 page no 372\n\n");
+//air flows across a packed bed
+d_p=1.5//diamter of cylinderical particles,cm
+h=2.5//height ,cm
+V_p=%pi*d_p^2*h/(4)//volume of the cylinderical particles
+S_p=%pi*d_p*h + 2*(%pi*d_p^2/4)//cylinderical particle surface area,cm^2
+a_p=S_p/V_p//particle specific surface
+printf("\n particle specific surface a_p =%f cm^-1 ",a_p);
+d_p_e=6/a_p//effective particle diameter
+printf("\n effective particle diameter d_p_e=%f cm",d_p_e);
+
diff --git a/1052/CH25/EX25.4/254.sce b/1052/CH25/EX25.4/254.sce new file mode 100755 index 000000000..185de41bd --- /dev/null +++ b/1052/CH25/EX25.4/254.sce @@ -0,0 +1,12 @@ +clc;
+//Example 25.4
+//page no 373
+printf("\nExample 25.4 page no 373\n\n");
+//a absorber bed consists of cube particles
+L=3/4//edge length of particle
+V_p=L^3//volume of particle
+S_p=6*L^2//surface area of particle
+a_p=6*L^2/L^3//specific particle surface area
+printf("\n specific particle surface area a_p=%f in^-1",a_p);
+d_p_e = L//effective particle diameter = edge length
+printf("\n effective particle diameter d_p_e=%f in",d_p_e)
diff --git a/1052/CH25/EX25.5/255.sce b/1052/CH25/EX25.5/255.sce new file mode 100755 index 000000000..779e6d0ed --- /dev/null +++ b/1052/CH25/EX25.5/255.sce @@ -0,0 +1,28 @@ +clc;
+//Example 25.5
+//page no 373
+printf("Example 25.5 page no 373\n\n");
+//gas(propane) flows through a catalyst tower
+Mw=44.1//molecular weight
+P=4320//pressre at the bottom of the catalyst bed,psf
+R=10.73//gas constant
+T=960//temperature,Rankine
+rho=P*Mw/(R*T*144)//density of propane
+L=50//height of bed,ft
+D=20//diameter of bed,ft
+V=%pi*D^2*L/4//bed volume
+theta=10//contact time,s
+e=0.4//bed porosity
+q=V*e/theta//volumetric flow rate
+v_s=4*q/(%pi*D^2)//superficial velocity
+printf("\n superficial velocity v_s=%f ft/s",v_s);
+v_i=v_s/e//interstitial velocity
+printf("\n interstitial velocity v_i=%f ft/s",v_i);
+rho_s=77.28//ultimate density(spheres )
+rho_b=(1-e)*rho_s//bulk density
+printf("\n bulk density rho_b=%f lb/ft^3",rho_b);
+d_p=0.0833//diameter of particles
+a_p=6/d_p//specific surface area
+printf("\n specific surface area a_p=%f ft^-1",a_p);
+a_b=a_p*(1-e)//bed specific surface
+printf("\n bed specific surface a_b=%f ft^-1",a_b)
diff --git a/1052/CH25/EX25.6/256.sce b/1052/CH25/EX25.6/256.sce new file mode 100755 index 000000000..a49edcb87 --- /dev/null +++ b/1052/CH25/EX25.6/256.sce @@ -0,0 +1,10 @@ +clc;
+//Example 25.6
+//page no 375
+printf("Example 25.6 page no 375\n\n");
+//refer to example 25.5
+d_p=0.0833//diameter of particles,ft
+e=0.4//bed porosity
+D_h=2/3*(e/(1-e))*d_p//hydraulic diameter
+r_h=D_h/4//hydrulic radius
+printf("\n hydraulic diameter D_h=%f ft\n hydrulic radius r_h=%f ft",D_h,r_h);
diff --git a/1052/CH26/EX26.10/2610.sce b/1052/CH26/EX26.10/2610.sce new file mode 100755 index 000000000..15c512dca --- /dev/null +++ b/1052/CH26/EX26.10/2610.sce @@ -0,0 +1,23 @@ +clc;
+//Example 26.10
+//page no 395
+printf("Example 26.10 page no 395\n\n");
+//a bed of 200 mesh particles is fluidized with air
+d_b=0.2//diameter of bed,m
+d_p=7.4e-5//particle diameter
+L_mf=0.3//bed height at minimum fludization
+e_mf=0.45//bed porosity at min. fluidization
+L_o=L_mf*(1-e_mf)//the zero porosity bed height
+printf("\n zero porosity bed height L_o=%f m",L_o);
+rho_s=2200//density of particles
+rho_f=1.2//density of fluid
+g=9.807//grav. acc
+meu_f=1.89e-5//viscosity of fluid
+//assuming laminar flow ,use equation 26.9
+v_mf =(e_mf^3)*(g*(rho_s-rho_f)*(d_p^2))/(150*(1-e_mf)*meu_f)//velocity at minimum fluidization
+printf("\n velocity at min. fluidization v_mf=%f m/s",v_mf);
+v_t=0.35//terminal velocity from example 26.3
+e=0.91//value of e porosity from eq26.9
+L_f=L_o/(1-e)//expanded bed height L_f
+m=rho_s*%pi*d_b^2*L_o//bed inventory
+printf("\n expanded bed height L_f=%f m\n bed inventory m=%f kg",L_f,m);
diff --git a/1052/CH26/EX26.11/2611.sce b/1052/CH26/EX26.11/2611.sce new file mode 100755 index 000000000..be8f33712 --- /dev/null +++ b/1052/CH26/EX26.11/2611.sce @@ -0,0 +1,20 @@ +clc;
+//Example 26.11
+//page no 396
+printf("\n Example 26.11 page no 396\n\n");
+//refer to illustrative example 26.9
+d_p=7.4e-5//particle diameter
+L_mf=0.3//bed height at minimum fludization
+e_mf=0.45//bed porosity at min. fluidization
+L_o=L_mf*(1-e_mf)//the zero porosity bed height
+printf("\n zero porosity bed height L_o=%f m",L_o);
+rho_s=2200//density of particles
+rho_f=1.2//density of fluid
+g=9.807//grav. acc
+meu_f=1.89e-5//viscosity of fluid
+//assuming laminar flow ,use equation 26.9
+v_mf =(e_mf^3)*(g*(rho_s-rho_f)*(d_p^2))/(150*(1-e_mf)*meu_f)//velocity at minimum fluidization
+printf("\n velocity at min. fluidization v_mf=%f m/s",v_mf);
+F_mf=v_mf^2/(g*d_p)//fluidization mode
+printf("\n fluidization mode F_mf=%f ",F_mf);
+//from value of F_mf ,fluidization is smoth,F_mf =0.66<0.13
diff --git a/1052/CH26/EX26.2/262.sce b/1052/CH26/EX26.2/262.sce new file mode 100755 index 000000000..0b0e47d26 --- /dev/null +++ b/1052/CH26/EX26.2/262.sce @@ -0,0 +1,31 @@ +clc;
+//Example 26.2
+//page no 382
+printf("Example 26.2 page no 384\n\n");
+//a water softner unit consists of a large diameter tank ,the bottom of tank is connected to a vertical ion exchange pipe
+h_f=1.25//total fluid height
+h_l=h_f
+g=32.174//grav. acc
+e=0.25// bed porosity
+d_p=0.00417//ion exchange resin particle diameter,ft
+L=1//pipe length ,ft
+//assume turbulent flow ,apply burke purmer equation
+v_s=sqrt(g*h_f*e^3*d_p/(1.75*(1-e)*L))//superficial velocity
+printf("\n superficial velocity v_s=%f ft/s",v_s);
+meu=6.76e-4//absolute viscosity of water
+rho=62.4//density of water
+//check for turbulent flow
+R_e=d_p*v_s*rho/((1-e)*meu)
+printf("\n R_e=%f",R_e);
+//since reynold no is low the calculation is not valid
+//assume laminar flow and use Blake-Kozeny equation 26.9
+v_s_t=rho*g*h_f*e^3*d_p^2/(150*meu*((1-e)^2)*L)//superficial velocity
+printf("\n superficial velocity v_s_t=%f ft/s",v_s_t);
+ //check the porous medium reynolds no
+ R_e_t=v_s_t*d_p*rho/((1-e)*meu)
+ printf("\n reynolds no R_e_t=%f ",R_e_t);
+ //since reynolds no R_e < 10,the flow is therfor laminar
+ D=0.167//diameter of pipe
+ S=(%pi/4)*D^2//empty cross sectional area
+ q=v_s_t*S//volumetric flow rate
+ printf("\n vol. flow rate q=%f ft^3/s",q);
diff --git a/1052/CH26/EX26.3/263.sce b/1052/CH26/EX26.3/263.sce new file mode 100755 index 000000000..b2abdb6d9 --- /dev/null +++ b/1052/CH26/EX26.3/263.sce @@ -0,0 +1,37 @@ +clc;
+//Example 26.3
+//page no 384
+printf("Example 26.3 page no 384\n\n");
+//refer to Example 26.2
+//a water softner unit consists of a large diameter tank ,the bottom of tank is connected to a vertical ion exchange pipe
+h_f=1.25//total fluid height
+h_l=h_f
+g=32.174//grav. acc
+e=0.25// bed porosity
+d_p=0.00417//ion exchange resin particle diameter,ft
+L=1//pipe length ,ft
+//assume turbulent flow ,apply burke purmer equation
+v_s=sqrt(g*h_f*e^3*d_p/(1.75*(1-e)*L))//superficial velocity
+printf("\n superficial velocity v_s=%f ft/s",v_s);
+meu=6.76e-4//absolute viscosity of water
+rho=62.4//density of water
+//check for turbulent flow
+R_e=d_p*v_s*rho/((1-e)*meu)
+printf("\n R_e=%f",R_e);
+//since reynold no is low the calculation is not valid
+//assume laminar flow and use Blake-Kozeny equation 26.9
+v_s_t=rho*g*h_f*e^3*d_p^2/(150*meu*((1-e)^2)*L)//superficial velocity
+printf("\n superficial velocity v_s_t=%f ft/s",v_s_t);
+ //check the porous medium reynolds no
+ R_e_t=v_s_t*d_p*rho/((1-e)*meu)
+ printf("\n reynolds no R_e_t=%f ",R_e_t);
+ //since reynolds no R_e < 10,the flow is therfor laminar
+//calculation of the pressure drop due to friction and the pressure drop across the resin bed
+k=e^3*d_p^2/(150*(1-e)^2)//packed bed permeability
+P_drop_fr=rho*h_f//friction pressure drop across resin bed,psf
+printf("\n fricion pressure drop P_drop_fr=%f psf",P_drop_fr);
+z_d=-1//length from point 2 to 3,ft
+P_drop_r=rho*(z_d+h_f)//pressure drop across the resi bed
+printf("\n pressure drop across across the resin bed P_drop_r=%f psf",P_drop_r);
+
+
diff --git a/1052/CH26/EX26.4/264.sce b/1052/CH26/EX26.4/264.sce new file mode 100755 index 000000000..a04024cd2 --- /dev/null +++ b/1052/CH26/EX26.4/264.sce @@ -0,0 +1,25 @@ +clc;
+//Example 26.4
+//page no 387
+printf("\nExample 26.4 page no 387\n\n");
+//air is used to fluidize a bed of speherical particles
+D=0.2//bed diameter,m
+d_p=7.4e-5//diameter of 200 mesh particles from table 23.2,m
+rho_s=2200//ultimate solid density
+rho_f=1.2//density of air
+meu=1.89e-5//viscosity of air
+g=9.807//grav. constant
+e=0.45//bed porosity
+L_mf=0.3//length at minimum fluidization
+//assume laminar flow
+//applying equation 26.29
+v_mf=(1-e)*g*rho_s*d_p^2/(150*e^3*meu)//minimum fluidizaton veloctiy
+printf("\n min. fluidization velocity v_mf=%f m/s",v_mf);
+//check the flow regime
+R_e=v_mf*d_p/(meu*(1-e))
+printf("\n Reynolds no R_e=%f ",R_e);
+//since R_e= 1.79 <10,flow is laminar
+m_dot=%pi*v_mf*D^2*rho_f/4//mass flow rate
+printf("\n mass flow rate m_dot =%f kg/s",m_dot);
+P_fr=round((1-e)*rho_s*g*L_mf)//gas pressure drop across the bed
+printf("\n gas pressure drop P_fr=%f Pa",P_fr);
diff --git a/1052/CH26/EX26.5/265.sce b/1052/CH26/EX26.5/265.sce new file mode 100755 index 000000000..88e916814 --- /dev/null +++ b/1052/CH26/EX26.5/265.sce @@ -0,0 +1,15 @@ +clc;
+//Example 26.5
+//page no 389
+printf("Example 26.5 page no 389\n\n");
+//air flowing through a 10 ft packed bed
+V_o=4.65//superficial velocity,ft/s
+meu_g=1.3e-5//viscosity of air
+rho_g=0.67//density of air,lb/ft^3
+e=0.89//void volume
+g_c=32.2//grav. constant
+L=10//length of packed bed
+d_p=0.007815//effective particle diameter
+P_drop = [(150*V_o*meu_g/(g_c*d_p^2))*((1-e)^2/e^3) + (1.75*rho_g*V_o^2/(g_c*d_p))*((1-e)^2/e^3)]*L//pressure drop
+printf("\n pressure drop P_rop=%f lb/ft^2",P_drop);//calculation error in book
+
diff --git a/1052/CH26/EX26.6/266.sce b/1052/CH26/EX26.6/266.sce new file mode 100755 index 000000000..12d03b345 --- /dev/null +++ b/1052/CH26/EX26.6/266.sce @@ -0,0 +1,13 @@ +clc;
+//Example 26.6
+//page no 392
+printf("Example 26.6 page no 392\n\n");
+//a bed of pulverized is to be fluidized with liquid oil
+D=4//diameter of bed ,ft
+d_p=0.00137//particle diameter ,ft
+rho_s=84//coal particle density ,lb/ft^3
+rho_f=55//oil density,lb/ft^3
+e_mf=0.38//void fraction
+L_mf=8//bed height at minimum fluidization,ft
+P_drop=(rho_s-rho_f)*(1-e_mf)*L_mf +rho_f*L_mf
+printf("\npressure drop P_drop=%f psf",P_drop);
diff --git a/1052/CH26/EX26.7/267.sce b/1052/CH26/EX26.7/267.sce new file mode 100755 index 000000000..07161ed47 --- /dev/null +++ b/1052/CH26/EX26.7/267.sce @@ -0,0 +1,24 @@ +clc;
+//Example 26.7
+//page no 393
+printf("Example 26.7 page no 393\n\n");
+//refer to example 26.6
+D=4//diameter of bed ,ft
+d_p=0.00137//particle diameter ,ft
+rho_s=84//coal particle density ,lb/ft^3
+rho_f=55//oil density,lb/ft^3
+meu_f=3.13e-4//viscosity of oil
+e_mf=0.38//void fraction
+L_mf=8//bed height at minimum fluidization,ft
+L_f=10//bed height,ft
+e=1-L_mf*(1-e_mf)/L_f//bed voidage
+g=32.174//grav acc
+v_s=(d_p^2)*g*(e^3)*(rho_s-rho_f)/(150*meu_f*(1-e)) //superficial velocity
+printf("\n superficial velocity v_s=%f ft/s",v_s);
+q=(%pi/4)*D^2*v_s//volumetric flow rate
+printf("\n vol. floe rate q=%f ft^3/s",q);
+//check on the laminar flow assumption
+meu_f=0.01
+R_e=d_p*v_s*rho_f/(meu_f*(1-e))
+printf("\n reynolds no R_e=%f",R_e);
+printf("\n since R_e is less than 10 ,flow is laminar");
diff --git a/1052/CH26/EX26.8/268.sce b/1052/CH26/EX26.8/268.sce new file mode 100755 index 000000000..9374e0fc1 --- /dev/null +++ b/1052/CH26/EX26.8/268.sce @@ -0,0 +1,23 @@ +clc;
+//Example 26.8
+//page no 393
+printf(" Example 26.8 page no 393\n\n");
+//refer to example 25.6
+//obtain the porous medium friction factor usingthe burke -plummer equation
+///since the flow is turbulent ,eq.26.6 applies
+f_pm=1.75//porous medium friction facot
+v_s=2//superficial velocity
+e=.4//porosity
+L=50//length of bed
+d_p=0.0833//particle diameter
+g=32.174//grav. acc
+h_f=(f_pm)*(v_s^2)*(1-e)*L/(g*(e^3)*d_p)//head loss
+printf("\n head loss h_f=%f ft of propane ",h_f);
+//applying bernoulli eq. between the entrance and gas exit
+//neglect the dynamic head
+P2=4320//pressure at the bottom of the catalyst bed
+rho_f=0.0128//density of fluid
+z_d=-50//length from point 2 to 3,z2-z1
+P1 = P2 + rho_f*(z_d-h_f)// absolute pressure of the inlet gas
+printf("\n pressure P1=%f psf",P1);
+//since flow is turbulent , permeablity of the medium k can not be calculated
diff --git a/1052/CH26/EX26.9/269.sce b/1052/CH26/EX26.9/269.sce new file mode 100755 index 000000000..d0f4d0764 --- /dev/null +++ b/1052/CH26/EX26.9/269.sce @@ -0,0 +1,16 @@ +clc;
+//Example 26.9
+//page no 394
+printf("Example 26.9 page no 394\n\n");
+//turbulent flow of water through a carbon bed
+d_p=0.001//particle diameter
+meu=0.001//viscosity of water
+e=0.25//porosity
+R_e=1000//R_e is >1000 for turbulent flow,for minimum pressure drop
+rho=1000//density of water,kg/m^3
+v_s=R_e*meu*(1-e)/(d_p*rho)//superficial velocity
+printf("\n superficial velocity v_s=%f m/s",v_s);
+phi_s=1//spehercity
+L=0.5//length of bed,m
+P_drop = 1.75*rho*L*v_s^2*(1-e)/(phi_s*d_p*(e^3))//presssure drop
+printf("\npressure drop P_drop=%f Pa",P_drop);
diff --git a/1052/CH27/EX27.2/272.sce b/1052/CH27/EX27.2/272.sce new file mode 100755 index 000000000..6cd755106 --- /dev/null +++ b/1052/CH27/EX27.2/272.sce @@ -0,0 +1,11 @@ +clc;
+//Example 27.2
+//page no 413
+printf("Example 27.2 page no 413\n\n");
+//plate and frame filter press is to be employed to filter a slurry
+m_dot_slurry=600*60//mass flow rate ,lb/h
+m=0.1//sluury contain 10% by mass solid
+m_dot_solids = m*m_dot_slurry//the solid flow rate in the slurry
+a=(1/5)//filter colth area required for 1 lb/h of solid
+A=m_dot_solids*(a)//filter colth area for 3600 lb/h of solids
+printf("\n filter colth area A=%f ft^2",A);
diff --git a/1052/CH27/EX27.4/274.sce b/1052/CH27/EX27.4/274.sce new file mode 100755 index 000000000..db6722a9a --- /dev/null +++ b/1052/CH27/EX27.4/274.sce @@ -0,0 +1,9 @@ +clc;
+//Example 27.4
+//page no 414
+printf("Example 27.4 page no. 414\n\n");
+m=1947//slope of curve b/w t/V vs V,s/ft^6
+K_c=2*m
+c=217//intercept on graph
+q_r=c//reciprocal of q
+printf("\n coeff. K_c=%f s/ft^6\n coeff. q_r=%f s/ft^3",K_c,q_r)
diff --git a/1052/CH27/EX27.5/275.sce b/1052/CH27/EX27.5/275.sce new file mode 100755 index 000000000..c63a3934c --- /dev/null +++ b/1052/CH27/EX27.5/275.sce @@ -0,0 +1,17 @@ +clc;
+//Example 27.5
+//page no 415
+printf("Example 27.5 page no 415\n\n");
+//refer to example 27.4
+meu=5.95e-4//viscosity
+g_c=32.174//grav. acc
+P_drop=20*144//pressure drop
+q_o=(1/217)//flow rate
+S=0.35//filteration area per unit
+K_c=3894//coefficentc
+c=4.142//slurry conentration
+R_m=S*g_c*P_drop/(q_o*meu)//filteration coeff.
+printf("R_m=%f ft",R_m);
+alpha=K_c*S^2*g_c*P_drop/(c*meu)//filteration coeff.
+printf("\n alpha=%f ft/lb",alpha);
+
diff --git a/1052/CH27/EX27.7/277.sce b/1052/CH27/EX27.7/277.sce new file mode 100755 index 000000000..979057b0b --- /dev/null +++ b/1052/CH27/EX27.7/277.sce @@ -0,0 +1,9 @@ +clc;
+//Example 27.7
+//page no 418
+printf("Example 27.7 page no 418\n\n");
+//the following result were obtained during the running of a filteration experiment
+alpha=4.57e+11//cake resistance,ft/lb
+P_drop=1554//pressure drop ,lbf/ft^2
+alpha_o=alpha/(P_drop^0.21)//specific cake resistance
+printf("\n specific cake resistance alpha_o=%f ft/lb",alpha_o);
diff --git a/1052/CH27/EX27.9/279.sce b/1052/CH27/EX27.9/279.sce new file mode 100755 index 000000000..4bbf505be --- /dev/null +++ b/1052/CH27/EX27.9/279.sce @@ -0,0 +1,25 @@ +clc;
+//Example 27.9
+//page no 418
+printf("Example 27.9 page no 418\n\n");
+//a filter press operates at a constant pressure
+P=50//pressure,psig
+q=10//flow rate,ft^3/min
+//applying eq.27.12
+//q = P/(B*V_s + C)
+//in this case,V_s=0
+C=P/q//constant
+//for constant pressure applying equation 27.13
+//t = B*V_s^2/(2P) + C*V_s/P
+t=60//time ,min
+V_s=100//volume,ft^3
+B= 2*P*t/(V_s^2) - 2*C/V_s//constant
+//during the washing cycle t_w = V_w/q_w
+//B and C remain same
+V_w=15//volume of water for washing per hr
+t_w= V_w*(B*V_s + C)/P//time in washing
+printf("\n washing time t_w=%f min",t_w);
+t_d=30//time for dumping and cleanig
+t_c=(t + t_w +t_d)/60//collecting time,in hr
+q_c =V_s/t_c//flow rate for 100 ft^3
+printf("\n flow rate q_c=%f gal/hr ",q_c);
diff --git a/1052/CH28/EX28.10/2810.sce b/1052/CH28/EX28.10/2810.sce new file mode 100755 index 000000000..d2c4e0a03 --- /dev/null +++ b/1052/CH28/EX28.10/2810.sce @@ -0,0 +1,41 @@ +clc;
+//Example 28.10
+//page no 438
+printf("Example 28.10 page no 438\n\n");
+// a compliance stack test on a facility yields the results ,we have to determine whether the incineratormeets the state particulate standard of 0.05 gr/dscf
+g=9.807//grav. acc
+rho_l=1000//density of manometer fluid,kg/m^3
+rho=1.084//density of flue gas,kg/m^3
+C=0.85//pitot tube constant
+h=0.3772//mean pitot tube reading ,in H2O
+m=0.16//mass of particulate collected ,g
+V=35//volume sampled,dscf
+C_p=m*15.43/V//partculate concentration,gr/dscf
+printf("\n particulate con. C_p=%f gr/dscf",C_p);
+//since this does not exceed the particulate standard of 0.05 gr/dscf,the facility is not in compliance
+//the stack flow rate is calculated from the velocity measurement
+v=C*sqrt(2*g*(rho_l/rho)* 0.0254*h)/.3048//velocity
+printf("\n velocity v=%f fps",v);
+D=2//diameter of stack,ft
+v_s=(v*%pi*D^2/4)*60//stack flow rate
+printf("\n stack flow rate v_s=%f acfm",v_s);
+w_mo=0.07//% moisture in stack gas
+v_dry=(1-w_mo)*v_s//dry volumetric flow rate
+//correct to standard conditions of 70 deg F and 1 atm
+T_s=530// standard temprature deg R
+P_s=29.9//standard pressure,psi
+P_g=29.6//pressure of stack gas,psi
+T_g=600//temprature of standard gas,deg R
+q_s=v_dry*(T_s/T_g)*(P_g/P_s)//standard volumetric flow rate
+printf("\n standard volumetric flow rate q_s=%f dscfm",q_s)
+R_e=C_p*q_s*(1440/7000)//particulate emission rate
+printf("\n particulate emmision rate R_e=%f lb/day",R_e);
+w_co2=0.14//percentage of co2 by volume
+w_N2=0.79//percentage of N2 by volume
+mw_o=32//molecular weight of oxygen
+mw_co2=44//molecular weight of co2
+mw_N2=28//molecular weight of N2
+MW_d=w_mo*mw_o + w_co2*mw_co2 +w_N2*mw_N2//molecular weight of flue gas on dry basis
+printf("\n mol. weight of flue gas on dry basis MW_d=%f lb/lbmol",MW_d);
+
+
diff --git a/1052/CH28/EX28.3/283.sce b/1052/CH28/EX28.3/283.sce new file mode 100755 index 000000000..e88bb7557 --- /dev/null +++ b/1052/CH28/EX28.3/283.sce @@ -0,0 +1,30 @@ +clc;
+//Example 28.3
+//page no 430
+printf("Example 28.3 page no 430\n\n");
+//we have to determine the minimum distance downstream from a cement dust emitting source that will be free of cement deposit
+//the souce is equipped with a cyclone located 150 ft above ground level
+//neglect meteorological aspects
+h=150//cyclone height from ground level,ft
+v_w=3/3600//wind velocity,miles/second
+SG=1.96//specific gravity of cement dust
+rho_w=62.4//density of water,lb/ft^3
+rho_p=SG*rho_w///density cement particles
+//applying ideal gas law for density of air
+P=1//pressure,atm
+M= 29//mol. weight of air
+R=0.73//gas constant
+T=520//temperature,Rankine
+rho_a=P*M/(R*T)//density of air
+meu=1.22e-5//viscosity of air,lb/ft.s
+g=32.174//grav. acc.
+d_p=2.5/(25400*12)//particle diameter,ft
+K = d_p*(g*rho_p*rho_a/(meu^2))^(1/3)//settling factor
+printf("\n settling factor K=%f ",K);
+//since K=0.103<3.3,sokes law rane applies
+v= g*d_p^2*rho_p/(18*meu)//terminal settling velocity)
+printf("\nsettling velocity v=%f ft/s",v);
+t=h/v//time for desent
+printf("\n desent time t=%f sec",t);
+x=v_w*t//horizontal distance travelled in miles
+printf("\n minimum horizontal distance x=%f miles",x);//printing mistake in book
diff --git a/1052/CH28/EX28.4/284.sce b/1052/CH28/EX28.4/284.sce new file mode 100755 index 000000000..540d4fc22 --- /dev/null +++ b/1052/CH28/EX28.4/284.sce @@ -0,0 +1,35 @@ +clc;
+//Example 28.4
+//page no 432
+printf("Example 28.4 page no 432\n\n");
+//it is proposed to install a pulse jet fabric filter system to clean an air stream containing particulate pollutants
+//we have to select the most apporpriate filter beg fabric
+q_scfm=10000//volumetric flow rate of polluted air stream at 60 deg F ,1 atm
+T=520//temperature,R
+T_o=710//operating temparature ,R
+q_acfm=q_scfm*(T_o/T)//flow rate in acfm
+v_f=2.5//filteration velocity,ft/min
+S_c=q_acfm/v_f//filtering beg area
+printf("\n filtering beg area S_c=%f ft^2",S_c);
+//(1) for bag A ,the area and N number of bags are
+D_a=8/12//diamter,ft
+H_a=16//height,ft
+S_a =%pi*D_a*H_a//area
+N_a= round(S_c/S_a)//no. of bags
+printf("\n area S_a=%f ft^2\n number og bags N_a=%f ",S_a,N_a);
+//(2) for bag B
+D_b=10/12//diameter,ft
+H_b=16//height,ft
+S_b=%pi*D_b*H_b//area
+N_b=round(S_c/S_b)//no. of bags
+printf("\n area S_b=%f ft^2\n no. of bags N_b=%f ",S_b,N_b);
+//total cost for each bag
+//for bag A
+c_a=26//cost per bag
+TC_a=round(N_a*c_a)//total cost for A bag
+printf("\n total cost TC_a=%f $",TC_a);
+//for bag B
+c_b=38//cost per bag
+TC_b=N_b*c_b//total cost for bag B
+printf("\n total cost TC_b=%f $",TC_b);
+//since the total cost for bag A is less than bag B,select bag A
diff --git a/1052/CH28/EX28.5/285.sce b/1052/CH28/EX28.5/285.sce new file mode 100755 index 000000000..c019094e4 --- /dev/null +++ b/1052/CH28/EX28.5/285.sce @@ -0,0 +1,17 @@ +clc;
+//Example 28.5
+//page no 433
+printf("\n Example 28.5 page no 433\n\n");
+//we have to determine the number if filtering bags required and cleaning frequency for a plant equipped with a fabric system
+q=50000//volumetric flow rate of gas stream,acfm
+v_f=10//filteration velocity,ft/min
+D=1//diameter of filtering bag,ft
+L=15//length of filtering bag,ft
+S_c=q/v_f//filtering area,ft^2
+S=%pi*D*L//area per bag,ft^2
+N=S_c/S//no. of bags
+printf("\n no. of bags N=%f ",N);
+c=0.0007143//dust concentration ,lb/ft^2
+P_drop=8//pressure drop ,in H20
+t=(P_drop-(0.2*v_f))/(5*c*v_f^2)//time sic ethe bags were cleaned
+printf("\n time t=%f min",t);
diff --git a/1052/CH28/EX28.6/286.sce b/1052/CH28/EX28.6/286.sce new file mode 100755 index 000000000..441debe07 --- /dev/null +++ b/1052/CH28/EX28.6/286.sce @@ -0,0 +1,16 @@ +clc;
+//Example 28.6
+//page no 434
+printf("Example 28.6 page no 434\n\n");
+//comparison between flow in pipes and open channel flow
+//water is passing through a trapezodial channel
+l_b=20//length of bottom base,ft
+l_t=50//length of top base,ft
+h=7.5//height of channel,ft
+A = (l_b+ l_t)*(h/2)//cross sectional area
+P = l_b +sqrt(h^2+ (2*h)^2)//perimeter of trapezoid
+r_h=A/P//hydrulic radius
+S=0.0008//coeff. in manning equation
+n=0.02//coeff. in manning eq.
+q = 1.486*A*r_h^(2/3)*S^(1/2)/n//manning equation to determine flow rate
+printf("\n volumetric flow rate q=%f ft^3/s",q);
diff --git a/1052/CH28/EX28.7/287.sce b/1052/CH28/EX28.7/287.sce new file mode 100755 index 000000000..9f75b41a1 --- /dev/null +++ b/1052/CH28/EX28.7/287.sce @@ -0,0 +1,19 @@ +clc;
+//Example 28.7
+//page no 435
+printf("\n Example 28.7 page no 435\n\n")
+//waste water treatment plant
+//we have to compare the total nitrogen discharge from the watershed with that of the city 's sewage treatment plant
+q_w=10//flow rate from waste water treatment plant
+c=35//nitoren concentration,mg/l
+m_dot_w=c*q_w*8.34//discharge from the treatment plant
+printf("\n fdischarge from the treatment plant m_dot_w=%f lb/day",m_dot_w);
+S=8//area of watershed,mi^2
+r=0.06//rate of rainfall,ml/day
+n=.5//50% rain reaches the sewers
+q=n*r*S*(5280^2/(3600*12))//volumetric flow rate of the runoff
+c_r=9//tota; nitrogen conentration in runoff,mg/l
+rho=62.4///density of water
+m_r=q*c_r*1e-6*(3600*24)*rho//total nitrogen discharge from runoff
+printf("\n total nitrogen discharge m_r=%f lb/day ",m_r);
+ //since the durinf rain ,the runoff is over 2.5 times that for the tratment plant
diff --git a/1052/CH28/EX28.8/288.sce b/1052/CH28/EX28.8/288.sce new file mode 100755 index 000000000..e5eea98ef --- /dev/null +++ b/1052/CH28/EX28.8/288.sce @@ -0,0 +1,15 @@ +clc;
+//Example 28.8
+//page no 436
+printf("Example 28.8 page no 436\n\n");
+//we have to determine the siaze an aerobic digester to treat the solids
+m=1000//mass of solid that is generate by municipality,lb
+OL=0.2//organic loading,lbcs/ft^3.day
+VS=.78//volatile solids
+V_ol=m*VS/OL//volume based on organic loading
+printf("\n volume based on organic loading V_ol=%f ft^3",V_ol);
+t_h=20//detention time hydraulic, days
+TS=0.044//percentage solids enterning digester
+V_hl=m*t_h/(TS*8.33*7.48)//volume based on hydrulic load
+printf("\n volume based on hyraulic load V_hl=%f ft^3",V_hl);
+//since V_hl >V_ol,the hdraulic time controls and the design volume is V_hl
diff --git a/1052/CH28/EX28.9/289.sce b/1052/CH28/EX28.9/289.sce new file mode 100755 index 000000000..eb6365938 --- /dev/null +++ b/1052/CH28/EX28.9/289.sce @@ -0,0 +1,16 @@ +clc;
+//Example 28.9
+//page no 437
+printf("Example 28.9 page no 437\n\n");
+//a large deep cavern has been proposed as an ultimate disposal site for both solid hazardous and municipal wastes
+V_c=0.78//approximate total volume of cavern,mi^2
+V_s=.75//% volume availiable for solid waste depositry
+V=V_c*V_s*(5280)^3//volume of the cavern availible for the solid waste ,factor 5280 to convert mi^3 into ft^3
+printf("\n volume of cavern availible for solid waste V=%f ft^3",V)
+r=20000//proposed maximum waste feed rate to cavern ,lb/day
+rho=30//average bulk density,lb/ft^3
+q=(r/rho)*(6*52)//volume rate of solid deposited within the cavern in ft^3/year
+printf("\n q=%f ",q);
+t=V/q//time to fill the cavern
+printf("\n time to fill the cavern t=%f year",t);
+
diff --git a/1052/CH29/EX29.2/292.sce b/1052/CH29/EX29.2/292.sce new file mode 100755 index 000000000..306284c0c --- /dev/null +++ b/1052/CH29/EX29.2/292.sce @@ -0,0 +1,14 @@ +clc;
+//Example 29.2
+//page no 455
+printf("Example 29.2 page no 455\n\n");
+//the probability distribution of the number of defectives in a sample of five pump drawn with replacement from lot of 1000 pump
+//the probability distribution of x, thenumber of sucess in n performances of th erandom experiment is the probability distribution function
+//P(x) = (factorial(n)/factorial(x)*(factorial n -factorial x))*(p^x*q^n-x)
+n=5//no. of performances
+x=3//no. of successes
+p=0.05//probability of sucesses when the sample of pump is drawn with replacement
+q=1-p//probability of faliure
+P=factorial(n)*((p^x)*(q^(n-x)))/(factorial(x)*(factorial(n)-factorial(x)))//probability when x=3//probability when x=3/factorial(x)*(factorial(n)-factorial(x))*(p^x*q^(n-x))//probability when x=3
+printf("\n probability P=%f ",P); //calculation error in book
+
diff --git a/1052/CH29/EX29.3/293.sce b/1052/CH29/EX29.3/293.sce new file mode 100755 index 000000000..500f45ab1 --- /dev/null +++ b/1052/CH29/EX29.3/293.sce @@ -0,0 +1,28 @@ +clc;
+//Examctple 29.3
+//page no 455
+printf("Example 29.3 page no 455");
+//an iron foundry has four work stations that are connected to single duct
+v_air=4000//the minimum air velocity required for general foundry dust,ft/min
+v_air_s=v_air/60//velocity of air in ft/s
+n=4//no. of duct
+q_e=3000//each duct transport air,acfm
+q=n*q_e//total transport,acfm
+A=q/v_air//cross sectional area required ,ft^2
+D=sqrt(4*A/%pi)//duct diameter,ft
+rho=0.075//density of air
+meu=1.21e-5//viscosity of air
+R_e=D*rho*v_air_s/meu//reynolds no
+printf("\n reynolds no. R_e=%f ",R_e);
+f=0.003///fanning friction factor,since R_e >20000
+L=400//duct length
+g_c=32.2//grav. acc.
+P_drop_d=(4*f*L*v_air_s^2*rho)/(2*g_c*D)//pressure drop in the duct
+printf("\n pressure drop in duct P_drop_d=%f lbf/ft^2",P_drop_d);
+P_drop_h=0.5*5.2//pressure drop in hood
+P_drop_cyc=3.5*5.2//pressure drop in cyclone cleaner
+P_drop_t=P_drop_d + P_drop_h + P_drop_cyc//total prssure drop
+printf("\n total pressure drop P_drop_t=%f lbf/ft^2",P_drop_t);
+neta=0.4//pump efficiency
+hp=(P_drop_t*q/neta)*3.03e-5//power required in hp
+printf("\n power required hp=%f hp ",hp);
diff --git a/1052/CH29/EX29.6/296.sce b/1052/CH29/EX29.6/296.sce new file mode 100755 index 000000000..a5cfb93be --- /dev/null +++ b/1052/CH29/EX29.6/296.sce @@ -0,0 +1,21 @@ +clc;
+//Example 29.6
+//page no 458
+printf("Example 29.6 page no 458\n\n");
+//a baghouse has been used to clean a particulate gas steam
+l_i=5//inlet loading,grains/ft^3
+l_o=0.03//outlet loading,grains/ft^3
+l_o_max=0.4//maximum outlet loading,grains/ft^3
+E_b=(l_i-l_o)/l_i//efficiency before bag failure
+P_t=1-E_b//penetration before bag failure
+E=(l_i-l_o_max)/l_i//efficiency on regulatory conditions
+P_t_r=1-E//penetration regulatory conditons
+P_tc=P_t_r-P_t//penetration associated with failed bags
+printf("\n penetration associated with failed bags P_tc=%f ",P_tc);
+P_drop=6//pressure drop,in of H2O
+T=250//temperature,deg F
+q=50000//volumetric flow rate,acfm
+D=8//diamter of bags,in
+L= q*P_tc/(0.582*P_drop^0.5*D^2*(T+460)^0.5)//number of bag failure that the system can tolerate and still remain in compliance
+printf("\n no. of bags L=%f ",L);
+//thus if two bags fail,baghouse is out of complance
diff --git a/1052/CH29/EX29.7/297.sce b/1052/CH29/EX29.7/297.sce new file mode 100755 index 000000000..41ce28ad0 --- /dev/null +++ b/1052/CH29/EX29.7/297.sce @@ -0,0 +1,15 @@ +clc;
+//Example 29.7
+//page no 461
+printf("\Example 29.7 page no 461\n\n");
+//a reactor is located in a relatively large laboratory,the reactor can emit as much as of hydrocarbon into the room if a safety valves ruptures
+v=1100//volume of reactor,m^3
+T=295//temperature of reactor,K
+v_s=0.0224//volume of gas at STP,m^3
+T_s=273//standard temperature,K
+n_air=(v/v_s)*(T_s/T)//total gmoles of air in the room
+printf("\n n_air=%f gmol",n_air);
+v_r=0.75//Hydrocarbon emit by reactor,gmol
+x_hc= (v_r/(n_air + v_r))*10^9//mole fraction of hydrocarbon in the room,parts per billion
+printf("\n mole fraction of HC x_hc=%f ppb ",x_hc);
+
diff --git a/1052/CH3/EX3.2/2.sce b/1052/CH3/EX3.2/2.sce new file mode 100755 index 000000000..2cbd9ed56 --- /dev/null +++ b/1052/CH3/EX3.2/2.sce @@ -0,0 +1,14 @@ +clc;
+//Example 3.2
+//Page no. 25
+printf("Example 3.2 Page no. 25\n\n")
+//given temperature(T),pressure(P),capilLary tube diameter(D),water density(rho),contact angle(ththetaeta)
+sigma=0.0712//surface tension (sigma)of water at 30 degree C temperature in appendix A.4
+D=0.008
+R=D/2
+theta=0
+g=9.807
+rho=1000
+printf("surface tension=%fN/m\n Radius=%fm\n theta=%fdegree\n g=%fm/s^2\n rho=%fkg/m^3\n",sigma,R,theta,g,rho)
+h=(2*sigma*cos(0))/(rho*g*R)//height rise of the liquid
+printf("height of liquid rise =%fm\n",h)
diff --git a/1052/CH3/EX3.3/3.sce b/1052/CH3/EX3.3/3.sce new file mode 100755 index 000000000..f00473b3e --- /dev/null +++ b/1052/CH3/EX3.3/3.sce @@ -0,0 +1,17 @@ +clc;
+//Example 3.3
+//Page no. 26
+printf("Example 3.3 Page no. 26\n\n")
+//given at 30 degree temerature
+//properties of water from appendix A.2 density(rho),surface tension(sigma)
+rho=996
+sigma=0.071
+printf("rho=%f\kg/m^3\n surface tension (sigma)=%f N/m\n",rho,sigma)
+theta=0//negligible angle of contact
+g=9.807
+h=0.001//less than one milimeter
+printf("theta=%f degree \n g=%f m/s^2\n h=%f m\n",theta,g,h)
+R=(2*sigma*cos(0))/(rho*g*h)//by capiilary rise equation
+D=2*R
+printf("R=%f m\n D=%f m\n",R,D)
+//if the tube diameter is greater than 0.029075 mm, then the capillary rise will be less than 1mm
diff --git a/1052/CH3/EX3.4/34.sce b/1052/CH3/EX3.4/34.sce new file mode 100755 index 000000000..36c1dd172 --- /dev/null +++ b/1052/CH3/EX3.4/34.sce @@ -0,0 +1,15 @@ +clc;
+//Example 3.4
+//page no. 28
+printf("Example 3.4 page no 28\n\n");
+S=2//surface area ft^2
+F=10//magnitude of force,lbf
+theta=%pi/6//angle
+F_p=F*cos(theta)//parallel comp. of force
+printf("\n F_p=%f lbf",F_p);
+F_n=F*sin(theta)//normal comp. of force
+printf("\n F-n=%f lbf",F_n);
+tou=F_p/S//shear stress
+P=F_n/S//pressure
+printf("\n tou=%f psf\n P=%f psf",tou,P);
+
diff --git a/1052/CH3/EX3.5/5.sce b/1052/CH3/EX3.5/5.sce new file mode 100755 index 000000000..8ff064479 --- /dev/null +++ b/1052/CH3/EX3.5/5.sce @@ -0,0 +1,15 @@ +clc;
+//Example 3.5
+//Page no. 30
+printf("Example 3.5 Page no. 30\n\n")
+//determine potential energy of water
+// given height,mass of water,g
+m=1
+g=9.8
+Z1=0//at ground level
+Z2=10//at 10 m above from ground level
+printf("m=%f kg\n g=%f m/s^2\n Z1=%f m\n Z2=%f m\n",m,g,Z1,Z2)
+PE1=m*g*Z1//potential energy at ground level
+PE2=m*g*Z2//potential energy at 10m height
+PE= PE2-PE1
+printf("PE1=%fJ\n PE2=%fJ\n PE=%fJ\n",PE1,PE2,PE)
diff --git a/1052/CH31/EX31.1/311.sce b/1052/CH31/EX31.1/311.sce new file mode 100755 index 000000000..0d7bde4e4 --- /dev/null +++ b/1052/CH31/EX31.1/311.sce @@ -0,0 +1,12 @@ +clc;
+//Example 31.1 page no 486
+printf("Example 31.1 page no 486\n\n ");
+//set of linear algebric equation using gauss elimination
+A=[3,-2,1;1,4,-2;2,-3,-4]//matrix A
+B=[7;21;9]//matrix B
+X=inv(A)*B
+printf("\n X=%f",X);
+X1=X(1,1)//value of X1
+X2=X(2,1)//value of X2
+X3=X(3,1)//value of X3
+printf("\n X1=%f\nX2=%f \nX3=%f",X1,X2,X3);
diff --git a/1052/CH31/EX31.2/312.sce b/1052/CH31/EX31.2/312.sce new file mode 100755 index 000000000..52a8bd756 --- /dev/null +++ b/1052/CH31/EX31.2/312.sce @@ -0,0 +1,18 @@ +clc;
+//Example 31.2
+//page no 492
+printf("Example 31.2 page no 492\n\n");
+//the vapor pressure p' for a new synthetic chemical at a given temperature
+t1=1100//assume intial actual temperature,k
+T1=t1*1e-3//temperature,k
+printf("\n T1=%f k",T1);
+f1=T1^3 -2*T1^2 + 2*T1 -1//function of T,f(T)
+f_d1=3*T1^2 -4*T1 + 2//derivative of f(T)
+//using newton rapson formula to estimate T2
+T2=T1 -(f1/f_d1)//temperature T2
+printf("\n T2=%f k",T2);
+f2=T2^3 -2*T2^2 + 2*T2 -1
+f_d2=3*T2^2 -4*T2 + 2
+T3=T2 -(f2/f_d2)//temperature T3
+printf("\n T3=%f k",T3);
+//finally the best estimate is T3,t=1.000095
diff --git a/1052/CH31/EX31.3/313.sce b/1052/CH31/EX31.3/313.sce new file mode 100755 index 000000000..a23b540b4 --- /dev/null +++ b/1052/CH31/EX31.3/313.sce @@ -0,0 +1,21 @@ +clc;
+//Example 31.3
+//page no 493
+printf("Example 31.3 page no 493\n\n");
+//friction factor for smooth tubes can be approximated by
+//f = 0.079*R_e^(-1/4),if 2000< R_e<2e-5
+// average velocity in the system ,involving the flow of water at 60 deg F is given by
+//v =sqrt(2180/(213.4R_e^(-1/4) + 10), flow of water at 60 deg F
+//R_e=12168v,putting this value and by simplifying we get
+v=poly(0,'v');
+f=213.5*v^2 +105.03*v- 22896.08*v
+//df=derivat(213.5*v^2 +105.03*v- 22896.08*v)
+df=- 22791.05 + 427*v
+v1=5
+f1=213.5*v1^2 +105.03*v1- 22896.08*v1// value of f at v=5
+df1=- 22791.05 + 427*v1//value of df at v=5
+v2=v1-(f1/df1)
+//by iteration we get values of v3,v4,v5,v6
+//at v6 result converges
+v6=10.09
+printf("\n v6=%f ft/s ",v6);
diff --git a/1052/CH31/EX31.4/314.sce b/1052/CH31/EX31.4/314.sce new file mode 100755 index 000000000..a3302e40d --- /dev/null +++ b/1052/CH31/EX31.4/314.sce @@ -0,0 +1,7 @@ +clc;
+//Example 31.4
+//page no 497
+printf("Example 31.4 page no 497\n\n")
+//integration
+I=integrate('(1-0.4*x^2)/((1-x)*(1-0.4*x)-1.19*x^2)','x',0,0.468)
+printf("\n I=%f ",I);
diff --git a/1052/CH32/EX32.5/325.sce b/1052/CH32/EX32.5/325.sce new file mode 100755 index 000000000..c16825bf7 --- /dev/null +++ b/1052/CH32/EX32.5/325.sce @@ -0,0 +1,19 @@ +clc;
+//Example 32.5
+//page no 512
+printf("Example 32.5 page no 512\n\n");
+// a fluid is transported 4 miles under turbulent flow conditions
+//we have two choices in designing the system
+OC_a=20000//per year pressure drop costs for the 2 inch ID pipe,$
+CRF=0.1//capital recovery factor for both pipe
+OC_b=OC_a/16//operating cost associated with the pressure drop cost per year for 4 inch pipe
+d=4*5280//distance,feet
+c_a=1// 2 inch ID pipe cost per feet,$
+c_b=6// 4 inch ID pipe cost per feet,$
+CC_a=d*c_a*CRF//capital cost for 2 inch ID pipe,$
+CC_b=d*c_b*CRF//capital cost for 4 inch ID pipe,$
+TC_a= OC_a +CC_a//total cost associated with 2 inch pipe
+printf("\n total cost with 2 inch pipe TC_a=%f $",TC_a);
+TC_b=OC_b + CC_b//total cost associated with 4 inch pipe
+printf("\n total cost with 4 inch pipe TC_b=%f $",TC_b);
+//from result we can conclude that 4 inch pipe is more economical
diff --git a/1052/CH32/EX32.6/326.sce b/1052/CH32/EX32.6/326.sce new file mode 100755 index 000000000..3eb2b8b90 --- /dev/null +++ b/1052/CH32/EX32.6/326.sce @@ -0,0 +1,23 @@ +clc; +//Example 32.6 +//page no 512 +printf(" Example 32.6 page no 512\n\n") +//a process emits gas of containg dust,a particulate device is employed for particle capture +q=50000//vol. flow rate of dust,ft^3/min +c=2/7000//inlet loading of dust +DV=0.03//value of dust +//recovered value RV can be expressed in terms of pressure drop +//RV=q*c*DV*P1/(P1+15) +C_e=0.18//cost of electricity +E_f=0.55//fractional efficiency +function x=f(P1) + + E=P1/(P1+15)//collection efficiency + RV=q*c*DV*E//recovered value in terms of E$/min + C_p=q*(C_e/44200)*P1/(E_f*60) +// x=q*c*DV*P1/(P1+15)-q*C_e*P1/E_f + x=RV-C_p +endfunction +P1=fsolve(100,f) +printf("\n P1=%f",P1); +//calculation mistake in book diff --git a/1052/CH32/EX32.8/328.sce b/1052/CH32/EX32.8/328.sce new file mode 100755 index 000000000..418971ff5 --- /dev/null +++ b/1052/CH32/EX32.8/328.sce @@ -0,0 +1,19 @@ +clc;
+//Example 32.8
+//page no 514
+printf("Example 32.8 page no 514\n\n");
+//a filter press is in operation
+//we have to determine the appraisal value of the press
+i=0.03375//intrest on fund
+n=9//time,year
+SFDF=i/((1+i)^n -1)//sinking fund depreciation factor
+P=60000//cost of filter press,$
+L=500//salvage value,$
+UAP= (P-L)*SFDF//uniform annual payment,$
+printf("\n uniform annual payment UAP=%f $",UAP);
+//in determing the appraisel value where the straight line method of depreciation is used
+// B = P -(P-L/n)x
+//where x refers to any time the present before the end of usable
+x=5//let for 5 year
+B5=P-((P-L)/n)*x//appraissl value for 5 year
+printf("\n apprasial value B=%f $",B5);
diff --git a/1052/CH32/EX32.9/329.sce b/1052/CH32/EX32.9/329.sce new file mode 100755 index 000000000..20fd6ef45 --- /dev/null +++ b/1052/CH32/EX32.9/329.sce @@ -0,0 +1,15 @@ +clc;
+//Example 32.9
+//page no 516
+printf("Example 32.9 page no 516\n\n");
+//we have to determine the annulized cost of a new processing plant of enviromental control
+//input data
+CC=150000//capital cost,$
+I=.07//interst
+n=5//time,year
+CRF=(I*(1+I)^n)/((1+I)^5-1)//capital recovery factor CRF
+IC=CRF*CC//installation cost,$
+OC=15000//operation cost,$
+AC=IC + OC//annulized cost
+printf("\n annulized cost AC=%f $",AC);
+
diff --git a/1052/CH33/EX33.1/331.sce b/1052/CH33/EX33.1/331.sce new file mode 100755 index 000000000..20bcad120 --- /dev/null +++ b/1052/CH33/EX33.1/331.sce @@ -0,0 +1,7 @@ +clc;
+//Example 33.1 page no 524
+printf("Example 33.1 page no 524\n\n")
+//unit conversion of viscosity of blood
+meu_cp=1.25//vicosity of blood in cp
+meu_e=meu_cp*6.72e-4//viscosity in english unit,lb/ft.s
+printf("\n viscosity meu_e=%f lb/ft.s",meu_e)
diff --git a/1052/CH33/EX33.10/3310.sce b/1052/CH33/EX33.10/3310.sce new file mode 100755 index 000000000..e5f0a86d9 --- /dev/null +++ b/1052/CH33/EX33.10/3310.sce @@ -0,0 +1,14 @@ +clc;
+//Example 33.10
+//page no 532
+printf("Example 33.10 page no 532\n\n");
+//the flow of blood from the arota to the atrium is reprsented by a vessel
+meu=1.1*6.72e-4//viscosity of blood
+L=0.3//length of vessel,mile
+g_c=32.2//grav. acc
+rho=62.4//density of blood
+D=2.53/30.48//diameter of vessel,ft
+P_drop=32*meu*(19/30.48)*5280*L/(rho*D^2*g_c)
+printf("\n pressure drop P_drop=%f ft*lbf/lb",P_drop)
+//snice the model is resonable from the fluid dynamics perspective
+
diff --git a/1052/CH33/EX33.12/3312.sce b/1052/CH33/EX33.12/3312.sce new file mode 100755 index 000000000..2fc600efc --- /dev/null +++ b/1052/CH33/EX33.12/3312.sce @@ -0,0 +1,9 @@ +clc;
+//Example 33.12
+//page no 534
+printf("\n Example 33.12 page no 534\n\n")
+//estimation of power generated by human heart
+P_drop=60//pressure drop in the circulatory system,mmHg
+q=0.0033//volumetric flow rate,ft^3/s
+hp=(q*P_drop*14.7*(144/760))//power generated
+printf("\npower generated hp=%f hp",hp);//calculation error in book
diff --git a/1052/CH33/EX33.2/332.sce b/1052/CH33/EX33.2/332.sce new file mode 100755 index 000000000..0c01ff632 --- /dev/null +++ b/1052/CH33/EX33.2/332.sce @@ -0,0 +1,12 @@ +clc;
+//Example 33.2 page no 525
+printf("Example 33.2 page no 525\n\n");
+//unit conversion of poressure given in mmHg into various units
+P=80//pressure given in mmHg
+P1=P*(29.92/760)//pressure , in Hg
+P2=P*(33.91/760)//pressure ,ft H2O
+P3=P2*12//pressure ,in H2O
+P4=P*(14.7/760)//pressure ,psia
+P5=P*(2116/760)//pressure ,psfa
+P6=P*(1.013e+5/760)//pressure ,N/m^2
+printf("\n P1=%f inHg\n P2=%f ft H2O\nP3=%f in H2O\n P4=%f psia\nP5=%f psfa\nP6=%f N/m^2",P1,P2,P3,P4,P5,P6);//in book answers are round off after decimal but there are exact answers
diff --git a/1052/CH33/EX33.5/335.sce b/1052/CH33/EX33.5/335.sce new file mode 100755 index 000000000..a5a415f63 --- /dev/null +++ b/1052/CH33/EX33.5/335.sce @@ -0,0 +1,17 @@ +clc;
+//Example 33.5 page no 527
+printf("Example 33.5 page no 527\n\n");
+//an artery branches into two smaller equal area arteries so that velocity is same
+//because q1=q2,volumetric flow rate
+//q1=q2=q/2
+//because s1=s2,cross sectional area
+//s1=s2=s/2
+//let the values
+q=1//flow rate at inlet artery
+q1=q/2//flow rate at outlet artery
+s=1//area of inlet artery
+s1=s/2//area of outlet artery
+//v=q/s
+D_r=sqrt(q/q1)//ratio of diameters
+printf("\n ratio of diameters D_r=%f ",D_r);
+
diff --git a/1052/CH33/EX33.6/336.sce b/1052/CH33/EX33.6/336.sce new file mode 100755 index 000000000..e0308141c --- /dev/null +++ b/1052/CH33/EX33.6/336.sce @@ -0,0 +1,20 @@ +clc;
+//Example 33.6
+//page no 528
+printf("Example 33.6 page no 528\n\n");
+//a blood vessel branches into three openings
+//we have to find the velocity in 3 rd opening
+a=0.2//cross sectional area of inlet 1,m^2
+v=5//velocity inlet 1,mm/s
+a1=0.08//area of branch1,m^2
+v1=7//velocity in branch2,mm/s
+a2=0.025//area of branch,m^2
+v2=12//velocity in branch,mm/s
+a3=0.031//area of branch,m^2
+q=a*v//flow rate at inlet
+q1=a1*v1//flow rate at branch 1
+q2=a2*v2//flow rate at branch 2
+q3=q-q1-q2//flow rate in branch 3
+v3=q3/a3//velocity in branch 3
+printf("\n velocity v3=%f mm/s",v3);
+
diff --git a/1052/CH33/EX33.7/337.sce b/1052/CH33/EX33.7/337.sce new file mode 100755 index 000000000..cf4c1e150 --- /dev/null +++ b/1052/CH33/EX33.7/337.sce @@ -0,0 +1,10 @@ +clc;
+//Example 33.7
+//page no 531
+printf("Example 33.7 page no 531\n\n");
+//blood flowing through the arota
+D=2.5//diameter of arota
+S=%pi*D^2/4//cross sectional area,cm^2
+q=93.3//volumeric flow rate,cm^3/s
+v=q/S//flow velocity
+printf("\n flow velocity v=%f cm/s",v);
diff --git a/1052/CH33/EX33.8/338.sce b/1052/CH33/EX33.8/338.sce new file mode 100755 index 000000000..da228dba0 --- /dev/null +++ b/1052/CH33/EX33.8/338.sce @@ -0,0 +1,12 @@ +clc;
+//Example 33.8
+//page no 531
+printf("Example 33.8 page no 531\n\n");
+//one of the auther of this book is 74 year old ,we have to determine the no. of times that the the auther's heart has to beat to date
+Y=74//age in year
+d=365//days
+h=24//hours
+m=60//minutes
+b=80//heart beats per minutes
+T=Y*d*h*m*b// no. of times heart beats
+printf("\n no.of times heart beats T=%f ",T);
diff --git a/1052/CH33/EX33.9/339.sce b/1052/CH33/EX33.9/339.sce new file mode 100755 index 000000000..6892920a9 --- /dev/null +++ b/1052/CH33/EX33.9/339.sce @@ -0,0 +1,14 @@ +clc;
+//Example 33.9
+//page no 531
+printf("\n Example 33.9 page no 531\n\n");
+//refer to example no 33.8
+Y=74//age in year
+d=365//days
+h=24//hours
+m=60//minutes
+b=80//heart beats per minutes
+T=Y*d*h*m*b// no. of times heart beats
+v=70//volume of blood discharge with each blood,ml
+V=T*v//volume of blood that has circulated through the auther's system over his lifetime
+printf("\n Volume of blood V=%f ml",V);
diff --git a/1052/CH34/EX34.4/344.sce b/1052/CH34/EX34.4/344.sce new file mode 100755 index 000000000..7cf037020 --- /dev/null +++ b/1052/CH34/EX34.4/344.sce @@ -0,0 +1,8 @@ +clc;
+//Example 34.4 page no 548
+printf("Example 34.4 page no 548\n\n");
+//a gas stream is discharged through a stack
+m_dot =10000//mass flow ratein acfm
+v=50//velcoity in ft/s
+KE=m_dot*v^2*(29/(379*32.2*60))//others are conversion factor for unit
+printf("\n KE=%f ft.lbf/s",KE);//printing mistake in book
diff --git a/1052/CH5/EX5.2/52.sce b/1052/CH5/EX5.2/52.sce new file mode 100755 index 000000000..42a152736 --- /dev/null +++ b/1052/CH5/EX5.2/52.sce @@ -0,0 +1,15 @@ +clc;
+//Example 5.2
+//page no. 42
+printf("Example 5.2 page no 42\n\n");
+//To calculate the force to maintain movement of left plate
+//velocity of moving plate is equal to the velocity of the plate and velocity of the gas at the surface of the stationary plate is zero
+k=1.66//kinamatic viscosity of gas
+rho=0.08//density of gas
+d=0.0833//distance between plate
+v1=300//velocity of left plate
+v2=0//velocity of stationary plate
+g_c=4.17*10^(8)//gravitational constant
+printf("given \n kinamatic viscosity =%2f ft^2/hr\n rho=%2f lb/ft^3\n d=%4f ft\n v1=%f ft/hr\n v2=%f ft/hr\n gc=%f (ft*lb/hr)/lbf*hr",k,rho,d,v1,v2,g_c);
+tou_xy=-k*rho*((v2-v1)/(g_c*d))//the frce necessary to mantain the movement of the left plate
+printf("\n force tou_xy=%f lbf/ft^2",tou_xy);
diff --git a/1052/CH5/EX5.3/53.sce b/1052/CH5/EX5.3/53.sce new file mode 100755 index 000000000..f0e79b74c --- /dev/null +++ b/1052/CH5/EX5.3/53.sce @@ -0,0 +1,13 @@ +clc;
+//Example 5.3
+//Page no. 45
+printf("Example 5.3 page no. 45\n\n");
+D=0.25//diameter of fixed inner cylinder of viscometer
+L=0.5//height of fixed inner cylinder of viscometer
+T=15.3//measured torque
+printf("Given :\n diameter =%.2f ft\n height =%f ft\n Torque=%f ft.lbf",D,L,T);
+F=(2*T)/D
+printf("\n force =%f lbf",F);
+//the shear stress(force parallel to the surface) using equation 5.11
+tou=F/(%pi*D*L)
+printf("\n shear stress tou=%f psf", tou);
diff --git a/1052/CH5/EX5.4/54.sce b/1052/CH5/EX5.4/54.sce new file mode 100755 index 000000000..a93526e39 --- /dev/null +++ b/1052/CH5/EX5.4/54.sce @@ -0,0 +1,22 @@ +clc;
+//Example 5.4
+//page no. 45
+printf("Example 5.4 page no. 45\n\n");
+//refer to example no 5.3
+//determine dynamic viscosity and kinematic viscosity
+omega=26.2//angular rotation speed
+D=0.25//diameter of fixed inner cylinder of viscometer
+v=omega*D/2
+printf("\n omega=%f rad/s\n diameter D =%f ft\n linear velocity =%2f ft/s",omega,D,v);
+d=0.001//clearance betwween two cylinder of visometer
+vel. gradient =v/(d/12)//velocity gradient
+gc=32.14//gravitational constant
+printf("\n clearance d=%5f ft\n vel. gradient=%f 1/s\n gravitational constant gc=%3f ft/s*S",d,vel. gradient,gc);
+tou=311.7//shear stress tou
+meu=gc*tou/vel. gradient
+printf("\n tou=%f psf\n meu=%f lb/ft*s",tou,meu);
+rho=60.528//density of oil
+neu=meu/rho//kinamatic viscosity
+printf("\n kinematic viscosity=%5f (ft*ft)/s",neu);
+
+
diff --git a/1052/CH7/EX7.1/1.sce b/1052/CH7/EX7.1/1.sce new file mode 100755 index 000000000..303982743 --- /dev/null +++ b/1052/CH7/EX7.1/1.sce @@ -0,0 +1,14 @@ +clc;
+//Example 7.1
+//page no. 64
+printf("example no. 7.1 page no. 64\n\n");
+//applying coservation of mass
+// rate of mass in-rate of mass out+rate of mass generated=rate of mass accumlated
+//according to conditions in this example
+//rate of mass in = rate of mass out
+Rf=4000//rate of feed of gaseous waste into an incinerator
+Ra=8000//rate of air feed
+Rm=550//rate of methane added for combustion
+Rin=Rf+Ra+Rm//total rate of mass in
+Rout=Rin//Rout is rate of mass out
+printf("\n Rf=%f kg/hr\n Ra=%f kg/hr\n Rm=%f kg/hr\n Rin=%f kg/hr\n Rout=%f kg/hr",Rf,Ra,Rm,Rin,Rout);
diff --git a/1052/CH7/EX7.2/72.sce b/1052/CH7/EX7.2/72.sce new file mode 100755 index 000000000..989a9daf4 --- /dev/null +++ b/1052/CH7/EX7.2/72.sce @@ -0,0 +1,22 @@ +clc;
+//Example 7.2
+//page no. 65
+printf("Example 7.2 page no. 65\n\n");
+//water flowing through a converging circular pipe fig 7.3
+//we have to determine mass and volumatric flow rates, mass flux of water
+D1=.14// diameter of pipe at section 1
+D2=.07//diameter of pipe at section2
+v1=2//velocity at section
+S1=%pi*(D1^2)/4//surface area at section 1
+rho=1000//density of water
+printf("\n diameter D1=%f m\n diameter D2=%f m\n v1=%f m/s\n Surface area S1=%f m^2\n density of water rho=%f kg/m^3 ",D1,D2,v1,S1,rho);
+q1= S1*v1//volumatric flow rate at section 1
+m1=rho*q1//mass flow rate at section 1
+G=m1/S1//mass flux at section 1
+printf("\n volumatric flow rate q1=%f m^3/s\n mass flow ratem1=%f kg/s\n mass flux G=%f kg/m^2*s",q1,m1,G);
+S2=(%pi*D2^2)/4
+q2=q1//q2 volumatric flow rate at section 2,due to steady flow q1=q2
+printf("\n surface areaS1=%f m^2\n volumatric flow rate q2=%f m^3/s",S1,q1)
+v2=(v1*S1)/S2//v2 velocity at section 2
+printf("\n velocity v2=%f m/s",v2)
+//conclusion :decrease cross section area results in an increase in flow velocity for an incompressible fluid.
diff --git a/1052/CH7/EX7.3/3.sce b/1052/CH7/EX7.3/3.sce new file mode 100755 index 000000000..aef6012d2 --- /dev/null +++ b/1052/CH7/EX7.3/3.sce @@ -0,0 +1,26 @@ +clc;
+//Example 7.3
+//page no 66, fig. 7.4
+printf("Example 7.3 page no 66,fig 7.4\n\n\n");
+//fluid device has four openings as shoen in figure
+//we have to calculate magnitude and direction of velocity,mass flow rate at section 4
+rho=800//density of fluid
+v1=5//velocity at section 1
+S1=0.2//surface area at section 1
+v2=7//velocity at section 2
+S2=0.3//surface area at section 2
+v3=12//velocity at section 3
+S3=0.25//surface area at section 3
+S4=0.15//surface area at section 4
+printf("\n velocity v1=%f m/s \n surface area S1=%f m^2/s\n velocity v2=%f m/s\n surface area S2=%f m^2/s\n velocity v3=%f m/s\n surface area S3=%f m^2/s\n surface area S4=%f m^2/s",v1,S1,v2,S2,v3,S3,S4);
+q1=v1*S1//volumatric flow rate at section 1
+q2=v2*S2//volumatric flow rate at section 2
+q3=v3*S3//volumatric flow rate at section 3
+printf("\n volumatric flow rate q1=%f m^3/s\n volumatric flow rate q2=%f m^3/s\n volumatrisc flow rate q3=%f m^3/s",q1,q2,q3);
+//applying continuity equation
+q4=q1+q2-q3//volumatric flow rate at section 4
+v4=q4/S4//velocity at section 4
+printf("\n volumatric flow rate q4=%f m^3/s\n velocity v4=%f m/s ",q4,v4);
+m=rho*q4//mass flow rate at section 4
+printf("\n mass flow rate m=%f kg/s",m);
+
diff --git a/1052/CH7/EX7.4/4.sce b/1052/CH7/EX7.4/4.sce new file mode 100755 index 000000000..8bb57db2a --- /dev/null +++ b/1052/CH7/EX7.4/4.sce @@ -0,0 +1,13 @@ +clc;
+//Example 7.4
+//page no 67, fig 7.5
+printf("Example 7.4 page no,fig 7.5\n\n")
+//Given pollutant in ppm in liquid stream ,some pollutant in discharge volume
+//calculate what fraction of liquid bypass
+//liquid stream having 600 ppm pollutant
+//pollutant in the discharge stream is 50 ppm
+//if B =factio of liquid bypassed,then 1-B= fraction of liquid treated
+//performing a pollutant mass balance around point2 in fig. 7.5
+B=poly([0],'x');
+N=roots((1-B)*0+600*B-50*1)
+printf("\n\n calculation:\n calculation of liquid bypassed B=%.4f ",N(1));
diff --git a/1052/CH7/EX7.5/75.sce b/1052/CH7/EX7.5/75.sce new file mode 100755 index 000000000..f159d58b3 --- /dev/null +++ b/1052/CH7/EX7.5/75.sce @@ -0,0 +1,24 @@ +clc;
+//Example 7.5
+//page no 67
+printf("Example 7.5 page no 67\n\n")
+//water flow in tank inletand outlet pipes
+//applying continuity principle to the control volume
+//since generation rate =0
+d1=0.09//diameter of inlet pipe
+v_in=4//velocity,m/s
+v_out=3//velocity,m/s
+q_in=(%pi*d1^2)*v_in/4//volumatric flow rate at inlet
+d2=0.04//diameter of outlet pipe
+q_out=(%pi*d2^2)*v_out/4
+printf("\n diameter at inlet d1=%f m\n volumatric flow rate at inlet q_in=%f m^3/s\n diameter d2=%f m\n volumatric flow rate at outlet q_out=%f m^3/s",d1,q_in,d2,q_out);
+q=q_in-q_out//for an incmpressible fluid of volume v, q=(dv/dt)=q_in-q_out
+D=1.4//diameter of tank
+S=(%pi*D^2)/4
+printf("\n volumatric flow in tank=%f m^3/s\n diameter of tank D=%f m\n surface area of tank S=%f m^2", q,D,S);
+//z=fluid height
+R_z=(q_in-q_out)/S//R_z rate of water level rise
+printf("\n rate of water level rise R_z=%f m/s",R_z);
+//R_z is positive ,the water level is rising in the tank from it's initial height of 1.5 m
+
+
diff --git a/1052/CH8/EX8.1/81.sce b/1052/CH8/EX8.1/81.sce new file mode 100755 index 000000000..a3984bead --- /dev/null +++ b/1052/CH8/EX8.1/81.sce @@ -0,0 +1,14 @@ +clc;
+//Example 8.1
+//page no 75
+printf("Example 8.1 page no 75\n\n");
+// heat is transferred from a gas
+Cp=1090//average heat capacity of gas
+M_dot=9//mass flow rate
+T1=650//gas inlet temperature
+//kinetic and potential enargy effects are neglected,there is no shaft work
+Q=5.5e+6//heat transferred
+delta_H=Q//since there are no kinetic,potential,and shaft work effects
+printf("\n heat capacity Cp=%f J/kg.deg c\n mass flow rate M_dot=%f kg/s\n gas inlet temperature T1=%f deg c\n heat transferred Q=%f W",Cp,M_dot,T1,Q);
+T2=round(-Q/(M_dot*Cp)) + T1
+printf("\n temperature T2=%f deg c ",T2);
diff --git a/1052/CH8/EX8.2/82.sce b/1052/CH8/EX8.2/82.sce new file mode 100755 index 000000000..3804685ee --- /dev/null +++ b/1052/CH8/EX8.2/82.sce @@ -0,0 +1,24 @@ +clc;
+//Example 8.2
+//page no 77 fig 8.2
+printf("Example 8.2 page no 77 fig 8.2 \n\n\n");
+//fluid flow in a device
+//fluid flow with in the control volume is steady
+q1=8//flow rate at section 1,direction in
+q2=6//flow rate at section 2, direction in
+q3=14//flow rate at section 3,direction out
+h1=250//enthalpy at section 1
+h2=150//enthalpy at section 2
+h3=200//enthalpy at section 3
+rho=800//density of fluid
+printf("\n flow rate q1=%f m^3/s\n flow rate q2=%f m^3/s\n flow rate q3=%f m^3/s\n enthalpy h1=%f j/kg\n enthalpy h2=%f j/kg\n enthalpy h3=%f j/kg\n density of fluid rho=%f kg/m^3",q1,q2,q3,h1,h2,h3,rho);
+//applying total energy balance
+hp=746//1 hp=746 kw
+H=rho*(q1*h1+q2*h2-q3*h3)/hp
+printf("\n enthalpy H=%f hp",H);
+//for adiabatic steady operation, Q_dot=0
+W_dot=H//W_dot is work
+printf("\n work W_dot=%f hp",W_dot);
+//since work is positive ,the surroundings must be doing work on the system through some device
+
+
diff --git a/1052/CH8/EX8.5/85.sce b/1052/CH8/EX8.5/85.sce new file mode 100755 index 000000000..9ec0fd71c --- /dev/null +++ b/1052/CH8/EX8.5/85.sce @@ -0,0 +1,21 @@ +clc;
+//Example 8.5
+//page no 81 fig 8.3
+printf(" Example 8.5 page no 81 fig 8.3\n\n\n");
+//a cylindrical tank filled with water
+//applying bernoulli equation
+z1=9//elevation head at section 1
+h2=1//height at section 2
+D1=3//diameter of cylindrical tank
+D2=.3//diameter of outlet hole of tank
+g=9.807//gravitational acceleration
+printf("\n elevation head at section 1 z1=%f m\n height at section h2=%f m\n diameter of cylindrical tank D1=%f m\n diameter of outlet hole of tank D2=%f m\n gravitational acc. g=%f m/s^2",z1,h2,D1,D2,g);
+t=2*[(sqrt(z1)-sqrt(h2))/((sqrt(2*g))*(D2/D1)^2)]
+printf("\n time t=%f sec",t);
+x=-(D2/D1)^2//ratio of a/g
+printf("\n x=%f",x);
+//for this example the maximum acceleration is 1% of g,therefore saftey use Bernoulli equation
+
+
+
+
diff --git a/1052/CH9/EX9.1/1.sce b/1052/CH9/EX9.1/1.sce new file mode 100755 index 000000000..b8faee21e --- /dev/null +++ b/1052/CH9/EX9.1/1.sce @@ -0,0 +1,16 @@ +clc;
+//Example 9.1
+//page no 87
+printf("Example 9.1 page no 87\n\n");
+//a horizontal water jet impinges on avertical plate
+rho=62.4//density of water
+v=100//horizontal velocity of water
+q=0.5//flow rate
+g=32.2//gravitational constant
+printf("\n density rho=%f lb/ft^3\n horizontal velocity of water v=%f ft/s\n flow rate q=%f ft^3/s",rho,v,q);
+M_in=(rho*q*v)/g//momentum rate of inlet water in the horizontal direction
+printf("\n momentum rate M_in=%f lbf",M_in);
+M_out=0//momentum rate of water out
+F=M_out-M_in
+printf("\n net horizontal force F=%f lbf",F);
+//negative sign indicate that to hold the plate in place, a force must be exerted in a direction opposite to that of the water flow
diff --git a/1052/CH9/EX9.2/2.sce b/1052/CH9/EX9.2/2.sce new file mode 100755 index 000000000..2559000dc --- /dev/null +++ b/1052/CH9/EX9.2/2.sce @@ -0,0 +1,25 @@ +clc;
+//Example 9.2
+//page no 87
+printf("Example 9.2 page no 87\n\n");
+//a horizontal line carries saturated steam
+//water is entrained by the steam,and line is bend
+//select the control volume as the fluid in the bend and apply amass balance
+//since m1_dot=m2_dot,v1=v2
+m_dot=0.15//mass flow rate
+V_in_x=420//velocity in horizontal x direction
+V_out_x=0//velocity out ,horizontal direction
+printf("mass flow rate m_dot=%f kg/s\n velocity in x direction V_in=%f m/s\n velocity out in the x direction=%f=m/s",m_dot,V_in_x,V_out_x);
+//applying linear horizontal balance in x direction
+F_x=m_dot*V_out_x-m_dot*V_in_x//force in x-dir
+printf("\n force F_x=%f N",F_x);
+//the x-dir force acting on the 90 deg elbow therefore,F_x=+63 N
+V_in_y=0//velocity in vertical in y direction
+V_out_y=420//velocity out vertical in y direction
+printf("velocity in y dir V_in_y=%f m/s\n velocity out y dir V_out_y=%f m/s",V_in_y,V_out_y);
+F_y=m_dot*V_out_y-m_dot*V_in_y//force in y dir
+printf("\n force in y dir F_y=%f N",F_y);
+//y dir force is acting on the elbow is therefore F_y=-63 N
+F_res=sqrt(F_x*F_x+F_y*F_y)//resultant force F_res
+printf("\n resultant force F_res=%f N",F_res);
+//this is the force required to hold the elbow
diff --git a/1052/CH9/EX9.3/93.sce b/1052/CH9/EX9.3/93.sce new file mode 100755 index 000000000..d971e8b3a --- /dev/null +++ b/1052/CH9/EX9.3/93.sce @@ -0,0 +1,20 @@ +clc;
+//Example 9.3
+//page no 88
+printf("Example 9.3 page no 88\n\n");
+//water flow in a pipe
+rho=62.4//density of water
+D=0.167//diameter of pipe
+g=32.174//gravitational constant
+M_dot_out=0//momentum out in x dir
+F_x=5//foce in the x dir
+printf("density rho=%f lb/ft^3\n diameter D=%f ft\n momentum M_dot_out=%f lbf\n forc in x dir F_x=%f lbf",rho,D,M_dot_out,F_x);
+M_dot_in=M_dot_out+F_x//momentum in
+printf("\n momentum M_dot_in=%f lbf",M_dot_in);
+S=(%pi*D^2)/4//surface area
+printf("\n surface area S=%f ft^2",S);
+v=sqrt((M_dot_in*g)/(rho*S))
+printf("\n velocity =%f ft/s",v);
+q=S*v//volumatric flow rate
+m_dot=rho*q//mass flow rate
+printf("\n volumatric flow rate q=%f ft^3/s\n mass flow rate m_dot=%f lb/s",q,m_dot);
diff --git a/1052/CH9/EX9.4/94.sce b/1052/CH9/EX9.4/94.sce new file mode 100755 index 000000000..dd030b06a --- /dev/null +++ b/1052/CH9/EX9.4/94.sce @@ -0,0 +1,36 @@ +clc;
+//Example 9.4
+//page no 89 fig 9.2
+printf("Example 9.4 page no 89 fig. 9.2\n\n\n");
+//water is discharged through a fire hose
+rho=1000//density of water
+meu=0.001//viscosity of water
+q=0.025//flow rate at section 1
+D1=.1//diameter at section 1
+D2=.03//diameter at section 2
+printf("\n density rho=%f kg/m^3\n viscosity meu=%3f kg/m.s\n volumatric flow rate q=%f m^3/s\n diametetr at section1 D1=%f m\n diameter at section2 D2=%f m",rho,meu,q,D1,D2);
+S1=(%pi*D1^2)/4
+S2=(%pi*D2^2)/4
+printf("\n surface area at section 1 S1=%f m^2\n surface area at section 2 S2=%f m^2",S1,S2);
+v1=q/S1//velocity at section1
+v2=q/S2//velocity at section2
+printf("\n velocity at sec1 v1=%f m/s\n velocity at sec2 v2=%f m/s",v1,v2);
+//appuing bernoulli's equation between point 1 and 2
+P2=0//pressure at point 2
+P1=(rho/2)*(v2^2-v1^2)//pressure at point 1
+printf("\n pressure at point2 P2=%f Pag(pascal gauge)\n pressure atpoint1 P1=%f Pag",P2,P1);
+m_dot1=25//mass flow rate at section 1
+m_dot2=25//mass flow rate at section 2
+printf("\n mass flow rate m_dot1=%f kg/s\n mass flow rate m_dot2=%f kg/s",m_dot1,m_dot2);
+M_dot1_x=m_dot1*v1//momentum rate in x dir at section 1
+M_dot2_x=m_dot2*v2//momentum rate in x dir at section 2
+printf("\n momentum rate M_dot1_x=%f N\n momentum rate M_dot2_x=%f N",M_dot1_x,M_dot2_x);
+//applying momentum balance in the x direction
+F_x=M_dot2_x-M_dot1_x-P1*S1//force from momentum balance
+printf("\n force from momentum balance F_x=%f N",F_x);
+
+
+
+
+
+
|