From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 49/CH7/EX7.1/ex1.sce | 21 +++++++++++++++++++++ 49/CH7/EX7.2/ex2.sce | 15 +++++++++++++++ 49/CH7/EX7.3/ex3.sce | 35 ++++++++++++++++++++++++++++++++++ 49/CH7/EX7.4/ex4.sce | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 49/CH7/EX7.5/ex5.sce | 25 +++++++++++++++++++++++++ 49/CH7/EX7.6/ex6.sce | 13 +++++++++++++ 49/CH7/EX7.7/ex7.sce | 25 +++++++++++++++++++++++++ 49/CH7/EX7.8/ex8.sce | 16 ++++++++++++++++ 8 files changed, 203 insertions(+) create mode 100755 49/CH7/EX7.1/ex1.sce create mode 100755 49/CH7/EX7.2/ex2.sce create mode 100755 49/CH7/EX7.3/ex3.sce create mode 100755 49/CH7/EX7.4/ex4.sce create mode 100755 49/CH7/EX7.5/ex5.sce create mode 100755 49/CH7/EX7.6/ex6.sce create mode 100755 49/CH7/EX7.7/ex7.sce create mode 100755 49/CH7/EX7.8/ex8.sce (limited to '49/CH7') diff --git a/49/CH7/EX7.1/ex1.sce b/49/CH7/EX7.1/ex1.sce new file mode 100755 index 000000000..6dcb67569 --- /dev/null +++ b/49/CH7/EX7.1/ex1.sce @@ -0,0 +1,21 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Flow Measurement +// Example 1// Page 406 +t=293 //('Entering the temperature(in k) of pitot tube =:') +p1=0.1*10^6 //('entering the air pressure in pitot tube=:') +v=10 //('entering the velocity of air in pitot tube=:') +R=287; +disp("Density is given by:") +disp("pho1=p1/(R*t);") +pho1=p1/(R*t); +// dynamic pressure +Pd=pho1*v^2/2; +//we know that v=sqrt(2Pd/pho) +// dv/dP=1/2(2/pho*Pd)^0.5 +// Let the error or uncertainty in velocity is represented by Wv and in pressure by Wp +Wp=1 //('entering the uncertainty in the measurement of dynamic pressure=:') +disp("Uncertainty in velocity is given by ") +disp("Wv=(1/2)*(2/(pho1*Pd))^0.5*Wp;") +Wv=(1/2)*(2/(pho1*Pd))^0.5*Wp; +per_unc=Wv*100/10; +printf('So the percentage uncertainty in the measurement of velocity is %fd %% \n',per_unc) diff --git a/49/CH7/EX7.2/ex2.sce b/49/CH7/EX7.2/ex2.sce new file mode 100755 index 000000000..9053b0bee --- /dev/null +++ b/49/CH7/EX7.2/ex2.sce @@ -0,0 +1,15 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Anemometers +// Example 2// Page 426 +// To derive an expression for velocity across a hot wire anemometer in terms of the wire resistance Rw, the current through the wire Iw and the empirical constants C0 and C1 and the fluid temperature. +disp("C0+C1(v)^.5)(Tw-Tf)=Iw^2Rw") +disp("Rw= Rr[1+a(Tw-Tr)]") +disp("Rw/Rr=1+a(Tw-Tr)") +disp("Tw-Tr=1/a[Rw/Rr-1]") +disp("Tw=1/a[Rw/Rr-1]+Tr") +disp("Co+C1(v)^0.5=Iw^2Rw/Tw-Tf") +disp("so,") +disp("v=1/C1[{Iw^2Rw/(1/a[Rw/Rr-1]+Tr-Tf)]}^2-C0") + + + diff --git a/49/CH7/EX7.3/ex3.sce b/49/CH7/EX7.3/ex3.sce new file mode 100755 index 000000000..f7f3dbdeb --- /dev/null +++ b/49/CH7/EX7.3/ex3.sce @@ -0,0 +1,35 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Gross volume flow rate(venturi) +// Example 3// Page 438 +dp=0.02 //('entering the diameter of the line in which water is flowing=:') +dt=0.01 //('entering the diameter of venturi=:') +B=0.5; // given +// The discharge coefficients remains in the flat portion of the curve for reynolds numbers 10^4 to 10^6 Cd=0.95 +u=8.6*10^-4 //('entering the viscosity=:') +Cd=0.95; +Rn_min=10^4; +disp("Minimum flow rate is given by:") +disp("mdot_min=%pi*dp*u*Rn_min/4") +mdot_min=%pi*dp*u*Rn_min/4 +g=9.81; +printf('Minimum flow rate at 25 deg cent is %1.3f kg/s\n',mdot_min) +pf=1000 // density of water +At=78.53*10^-6 //('entering the throat area=:') +pm=13.6 //('entering the density of manometer fluid=:') + +//h is the height of mercury column due to flow +disp("To calculate the mercury reading corresponding to minimum flow, using-") +disp("h_min=((mdot_min*sqrt(1-B^4))/((sqrt(2*g*(pm-pf/pf))*pf*At*Cd)))^2;") +h_min=((mdot_min*sqrt(1-B^4))/((sqrt(2*g*(pm-pf/pf))*pf*At*Cd)))^2; +//in mm +H_min=h_min*1000 +printf('So the pressure reading observed for the given flow ratre is %1.1f mm of Hg\n',H_min) +h_max=.25 //('entering the value of h maximum=:') +m_max=(pf*At*Cd*sqrt(2*g*(pm-pf/pf))*sqrt(h_max))/sqrt(1-B^4); +printf('The maximum flow rate is %1.1f kg/s\n',m_max) + + + + + + diff --git a/49/CH7/EX7.4/ex4.sce b/49/CH7/EX7.4/ex4.sce new file mode 100755 index 000000000..de5b2e832 --- /dev/null +++ b/49/CH7/EX7.4/ex4.sce @@ -0,0 +1,53 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Gross volume flow rate(venturi) +// Example 4// Page 439 +dt=0.15 //('entering the throat diameter=:') +dp=0.3 //('entering the upstream diameter=:') +Cd=0.95; +B=0.5; +pm=13600 //('entering the density of manometer fluid=:') +At=%pi*dt^2/4; +g=9.81; + +pf=995.8 +h=0.2 //('entering the height of mercury column due to flow (in m)=:') +q=pf*At*Cd; +w=(1-B^4)^(1/2); +e=sqrt(2*g*((pm/pf)-1)); +mdot_25=q*e*sqrt(h)/w +disp("Mass flow is given by :") +disp("mdot=pf*At*Cd*(1/(1-B^4)^(1/2))*sqrt(2*g*((pm/pf)-1)*sqrt h)") +printf('So the mass flow at 25 deg cent is %fd kg/s\n',mdot_25) + + + +pf=999.8 //('entering density of water at 25 deg cent=:') +h=0.2 //('entering the height of mercury column due to flow (in m)=:') +q=pf*At*Cd; +w=(1-B^4)^(1/2); +e=sqrt(2*g*((pm/pf)-1)); +mdot=q*e*sqrt(h)/w +// error is mdot(25 deg cent)-mdot(t deg cent) +printf(' The mass flow at 0 deg cent is %fd kg/s\n',mdot) +error1=abs(((mdot_25-mdot)/mdot_25)*100); + + + +printf(' Change in temperature of water introduces insignificant error in mass flow measurement i.e. %1.2f%% \n',error1) +pf=988.8 //('entering density of water at 25 deg cent=:') +h=0.2 //('entering the height of mercury column due to flow (in m)=:') +q=pf*At*Cd; +w=(1-B^4)^(1/2); +e=sqrt(2*g*((pm/pf)-1)); +mdot=q*e*sqrt(h)/w +// error is mdot(25 deg cent)-mdot(t deg cent) +printf(' The mass flow at 50 deg cent is %fd kg/s\n',mdot) +error2=abs(((mdot_25-mdot)/mdot_25)*100); + + + +printf('Therefore, change in temperature of water introduces insignificant error in mass flow measurement i.e. %1.2f%% \n',error2) + + + + diff --git a/49/CH7/EX7.5/ex5.sce b/49/CH7/EX7.5/ex5.sce new file mode 100755 index 000000000..c6493ae50 --- /dev/null +++ b/49/CH7/EX7.5/ex5.sce @@ -0,0 +1,25 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Gross volume flow rate(venturi) +// Example 5// Page 440 +dt=.1 //('entering the throat diameter=:') +dp=.2 //('entering the upstream diameter=:') +Cd=0.95; +g=9.81 +B=0.5; +At=%pi*dt^2/4; +pf=780 //('entering density of oil in the pipeline =:') +pm=1000 //('entering the density of manometer fluid=:') +w=(1-B^4)^(1/2); +e=sqrt(2*g*((pm/pf)-1)); +S_ideal=At*e/w; +printf('The ideal volume flow rate sensitivity is %1.4f (m^3/s/h^0.5)\n',S_ideal) +// part b +disp("Actual volume rate sensitivity is given by :") +disp("S_actual=S_ideal/Cd") +S_actual=S_ideal/Cd; +printf('The actual volume rate sensitivity is %1.4f \n',S_actual) +h=.3 //('entering the manometer reading of water height=:') +disp("Actual volume flow rate is given by:") +disp("Q_actual=S_actual*sqrt(h)") +Q_actual=S_actual*sqrt(h); +printf('The actual volume flow rate is %1.3f m^3/s\n',Q_actual) diff --git a/49/CH7/EX7.6/ex6.sce b/49/CH7/EX7.6/ex6.sce new file mode 100755 index 000000000..714611d64 --- /dev/null +++ b/49/CH7/EX7.6/ex6.sce @@ -0,0 +1,13 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Sonic nozzle +// Example 6// Page 443 +disp("Let uncertainty in mass flow rate be represented by wm") +disp("Let uncertainty with pressure be represented by wp") +disp("Let uncertainty with temperature measurement be represented by wt") +// To calculate the uncertainty in the temperature measurement +wm_m=0.02 //('entering the uncertainty in mass flow=:') +wp_p=0.01 //('entering the uncertainty in pressure measurement=:') +disp("Uncertainty in temperature is given by:") +disp("wt_t=2*sqrt(wm_m^2-wp_p^2)*100") +wt_t=2*sqrt(wm_m^2-wp_p^2)*100 +printf('uncertainty in the temperature measurement is %1.2f %%\n',wt_t) \ No newline at end of file diff --git a/49/CH7/EX7.7/ex7.sce b/49/CH7/EX7.7/ex7.sce new file mode 100755 index 000000000..e37fa2672 --- /dev/null +++ b/49/CH7/EX7.7/ex7.sce @@ -0,0 +1,25 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Venturi +// Example 7// Page 446 +p1=5*10^6 //('entering the pressure of air when venturi is to be used =:') +t1=298 //('entering the temperature of air for the same=:') +m_max=1 //('entering the maximum flow rate=:') +m_min=0.3 //('entering the minimum flow rate=:') +Re_min=10^5 //('entering the throats reynold number=:') +R=287; // for air +pho1=p1/(R*t1); +b=0.5; +mu=1.8462*10^-5 //('enter the absolute viscosity=:') +D_max=(4*m_max)/(%pi*Re_min*mu); +D_min=(4*m_min)/(%pi*Re_min*mu); +printf('So the throat diameters for maximum and minimum flows so the reynolds number does not exceed 10^5 are %1.4f m and %1.4f m respectively\n',D_max,D_min) +// To calculate the differential pressure +At=%pi*D_max^2/4; +C=1; // discharge coefficient +M=1.0328; // Velocity approach coefficient +Y=.9912; // Expansion factor +dP_max=(m_max)^2/(Y^2*M^2*C^2*At^2*2*pho1); +printf('The differential pressure for maximum flow rate is %1.5f Pa\n',dP_max) +dP_min=(m_min)^2/(Y^2*M^2*C^2*At^2*2*pho1)*1000; +printf('The differential pressure for minimum flow rate is %1.2f mPa\n',dP_min) + diff --git a/49/CH7/EX7.8/ex8.sce b/49/CH7/EX7.8/ex8.sce new file mode 100755 index 000000000..c3ecc51e2 --- /dev/null +++ b/49/CH7/EX7.8/ex8.sce @@ -0,0 +1,16 @@ +//CHAPTER 7_ Flow Measurement +//Caption : Constant-Pressure-Drop , Variable-Area Meters(Rotameters) +// Example 8// Page 455 +Qd=.1/60 //('enter the maximum flow of water=:') +t=298 //('enter the temperature in k=:') +d=.03 //('enter the float diameter in m=:') +L=0.5 //('enter the total length of rotameter=:') +D=.03 //('enter the diameter of tube at inlet=:') +Vb=25*10^-6 //('enter the total volume of float=:') +Af=7.068*10^-4 // area of float +j=2*9.81*Vb/Af; +y=L; +disp("Tube taper is given by:") +disp("a=(Qd*2)/(%pi*D*y*j^(1/2))") +a=(Qd*2)/(%pi*D*y*j^(1/2)); +printf('tube taper is %1.4f m/m(taper)\n',a) -- cgit