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/CH2/EX2.1/ex1.sce | 13 ++++++++++++ 49/CH3/EX3.1/example1.sce | 44 +++++++++++++++++++++++++++++++++++++++ 49/CH3/EX3.2/example2.sce | 38 +++++++++++++++++++++++++++++++++ 49/CH3/EX3.5/example5.sce | 14 +++++++++++++ 49/CH3/EX3.6/example6.sce | 24 +++++++++++++++++++++ 49/CH3/EX3.7/example7.sce | 35 +++++++++++++++++++++++++++++++ 49/CH4/EX4.1/ex1.sce | 26 +++++++++++++++++++++++ 49/CH4/EX4.10/ex10.sce | 31 +++++++++++++++++++++++++++ 49/CH4/EX4.11/ex11.sce | 15 ++++++++++++++ 49/CH4/EX4.12/ex12.sce | 20 ++++++++++++++++++ 49/CH4/EX4.2/ex2.sce | 22 ++++++++++++++++++++ 49/CH4/EX4.3/ex3.sce | 23 ++++++++++++++++++++ 49/CH4/EX4.4/ex4.sce | 19 +++++++++++++++++ 49/CH4/EX4.5/ex5.sce | 25 ++++++++++++++++++++++ 49/CH4/EX4.7/ex7.sce | 23 ++++++++++++++++++++ 49/CH4/EX4.8/ex8.sce | 40 +++++++++++++++++++++++++++++++++++ 49/CH4/EX4.9/ex9.sce | 32 ++++++++++++++++++++++++++++ 49/CH5/EX5.1/ex1.sce | 24 +++++++++++++++++++++ 49/CH5/EX5.2/ex2.sce | 23 ++++++++++++++++++++ 49/CH5/EX5.3/ex3.sce | 21 +++++++++++++++++++ 49/CH5/EX5.4/ex4.sce | 19 +++++++++++++++++ 49/CH5/EX5.5/ex5.sce | 14 +++++++++++++ 49/CH6/EX6.1/ex1.sce | 16 ++++++++++++++ 49/CH6/EX6.10/ex10.sce | 11 ++++++++++ 49/CH6/EX6.2/ex2.sce | 21 +++++++++++++++++++ 49/CH6/EX6.3/ex3.sce | 31 +++++++++++++++++++++++++++ 49/CH6/EX6.4/ex4.sce | 40 +++++++++++++++++++++++++++++++++++ 49/CH6/EX6.5/ex5.sce | 27 ++++++++++++++++++++++++ 49/CH6/EX6.6/ex6.sce | 28 +++++++++++++++++++++++++ 49/CH6/EX6.7/ex7.sce | 15 ++++++++++++++ 49/CH6/EX6.8/ex8.sce | 14 +++++++++++++ 49/CH6/EX6.9/ex9.sce | 10 +++++++++ 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 ++++++++++++++ 49/CH8/EX8.1/ex1.sce | 42 +++++++++++++++++++++++++++++++++++++ 49/CH8/EX8.2/ex2.sce | 15 ++++++++++++++ 49/CH8/EX8.3/ex3.sce | 38 +++++++++++++++++++++++++++++++++ 49/CH8/EX8.4/ex4.sce | 24 +++++++++++++++++++++ 49/CH8/EX8.5/ex5.sce | 32 ++++++++++++++++++++++++++++ 45 files changed, 1112 insertions(+) create mode 100755 49/CH2/EX2.1/ex1.sce create mode 100755 49/CH3/EX3.1/example1.sce create mode 100755 49/CH3/EX3.2/example2.sce create mode 100755 49/CH3/EX3.5/example5.sce create mode 100755 49/CH3/EX3.6/example6.sce create mode 100755 49/CH3/EX3.7/example7.sce create mode 100755 49/CH4/EX4.1/ex1.sce create mode 100755 49/CH4/EX4.10/ex10.sce create mode 100755 49/CH4/EX4.11/ex11.sce create mode 100755 49/CH4/EX4.12/ex12.sce create mode 100755 49/CH4/EX4.2/ex2.sce create mode 100755 49/CH4/EX4.3/ex3.sce create mode 100755 49/CH4/EX4.4/ex4.sce create mode 100755 49/CH4/EX4.5/ex5.sce create mode 100755 49/CH4/EX4.7/ex7.sce create mode 100755 49/CH4/EX4.8/ex8.sce create mode 100755 49/CH4/EX4.9/ex9.sce create mode 100755 49/CH5/EX5.1/ex1.sce create mode 100755 49/CH5/EX5.2/ex2.sce create mode 100755 49/CH5/EX5.3/ex3.sce create mode 100755 49/CH5/EX5.4/ex4.sce create mode 100755 49/CH5/EX5.5/ex5.sce create mode 100755 49/CH6/EX6.1/ex1.sce create mode 100755 49/CH6/EX6.10/ex10.sce create mode 100755 49/CH6/EX6.2/ex2.sce create mode 100755 49/CH6/EX6.3/ex3.sce create mode 100755 49/CH6/EX6.4/ex4.sce create mode 100755 49/CH6/EX6.5/ex5.sce create mode 100755 49/CH6/EX6.6/ex6.sce create mode 100755 49/CH6/EX6.7/ex7.sce create mode 100755 49/CH6/EX6.8/ex8.sce create mode 100755 49/CH6/EX6.9/ex9.sce 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 create mode 100755 49/CH8/EX8.1/ex1.sce create mode 100755 49/CH8/EX8.2/ex2.sce create mode 100755 49/CH8/EX8.3/ex3.sce create mode 100755 49/CH8/EX8.4/ex4.sce create mode 100755 49/CH8/EX8.5/ex5.sce (limited to '49') diff --git a/49/CH2/EX2.1/ex1.sce b/49/CH2/EX2.1/ex1.sce new file mode 100755 index 000000000..eefedcefb --- /dev/null +++ b/49/CH2/EX2.1/ex1.sce @@ -0,0 +1,13 @@ +// Chapter 2_Generalized Configurations and Functional Descriptions of measuring instruments +//Caption_Error in measurement +//Ex_1 part_2 //page 22 +disp("ts=0.1") +disp("ps=2.5") +disp("dT=20") + +ts=0.1 //('enter the temperature sensitivity=:') +ps=2.5 //('enter the pressure sensitivity(in units/MPa)=:') +dT=20 //('enter the temperature change during pressure measurement=:') +P=120 //('enter the pressure to be measured (in MPa)=:') +error=(ts*dT)/(ps*P); +printf('the error in measurement is %fd percent\n',error) \ No newline at end of file diff --git a/49/CH3/EX3.1/example1.sce b/49/CH3/EX3.1/example1.sce new file mode 100755 index 000000000..883373f4f --- /dev/null +++ b/49/CH3/EX3.1/example1.sce @@ -0,0 +1,44 @@ +//Chapter_3 Generalized Performance Characteristics Of Instruments +//Caption:Gaussian Distribution +// Example 1 +clc; +close; +disp("me=7") +disp("stddev=0.5") +disp("x = 6 ") +disp("y= 7.5") +me=7 ; +stddev=0.5; +x = 6 //('enter the lower limit of the range=:') +y= 7.5 //('enter the upper limit of the range=:') +n= 200 //('enter the number of samples=:') +disp("using k =abs((x-me)/((2^0.5)*stddev));") +k =abs((x-me)/((2^0.5)*stddev)); +printf('Value of eta1 is %1.2f \n',k) + +p=abs((y-me)/((2^0.5)*stddev)); +printf('Value of eta2 is %1.2f \n',p) +//Using the gaussian probability error function table, find the error function corresponding to the value of k and p +//LET IT BE s +s= 0.95 // ('enter the error function corresponding to k value=:') +F(x)=(1/2)+(1/2*s);// Probability of having lengths less than x +l= 0.68 // ('enter the error function corresponding to p value=:') +F(y)=(1/2)+(1/2*l);// Probability of having lengths less than y + +printf('probability of having length less than 6 cm is %1.3f ',F(x)); +printf('probability of having length less than 67.5cm is %1.3f ',F(y)); + +P(x)=abs(F(y)-F(x)); +printf("Number of samples in the given length range=") +m=(n*P(x)); +disp(m); + + + + + + + + + + diff --git a/49/CH3/EX3.2/example2.sce b/49/CH3/EX3.2/example2.sce new file mode 100755 index 000000000..071f21f97 --- /dev/null +++ b/49/CH3/EX3.2/example2.sce @@ -0,0 +1,38 @@ +//Caption:Combination of component errors in overall system-accuracy calculations +//example2 +//page 62 +clc; +//Consider an experiment for measuring, by means of a dynamometer, the average power transmitted by a rotating sheft +disp("R=1202 ") +disp("F=45") +disp("L=0.397 ") +disp("t=60") +R=1202 //('Enter the revolutions of shaft during time t=:') +F=45 //('Enter the force at end oftorque arm=:') +L=0.397 //('Enter the length of torque arm=:') +t=60 //('Enter the time length of run=:') +W=(2*%pi*R*F*L)/t; +//Computing various partial dervatives +dWF=(2*%pi*R*L)/t; +disp(dWF) //dWF represents dW/dF +dWR=(2*%pi*F*L)/t; +dWL=(2*%pi*F*R)/t; +dWt=-(2*%pi*R*F*L)/(t^2); +//Let f, r, l and t represent the uncertainties +disp("f=0.18") +disp("r=1 ") +disp("l=0.00127 ") +disp("t=0.5") +disp("Ea=(dWF*f)+(dWR*r)+(dWL*l)+abs(dWt*t); ") +f=0.18 //('Enter the uncertainty in force=:') +r=1 //('Enter the uncertainty in the no of revolutions=:') +l=0.00127 //('Enter the uncertainty in the length=:') +t=0.5 //('Enter the uncertainty in the time length of run=:') +Ea=(dWF*f)+(dWR*r)+(dWL*l)+abs(dWt*t); //absolute error +printf("The absolute error is ") +disp(Ea); +//To find total uncertainty +U=(((dWF*f)^2)+(dWR*r)^2+(dWL*l)^2+abs(dWt*t)^2)^0.5 +printf("Total uncertainty is ") +disp(U) + diff --git a/49/CH3/EX3.5/example5.sce b/49/CH3/EX3.5/example5.sce new file mode 100755 index 000000000..4426e4579 --- /dev/null +++ b/49/CH3/EX3.5/example5.sce @@ -0,0 +1,14 @@ +// Chapter_3 Generalized Performance Characteristics Of Instruments +//Caption:First order instrument +//Example 5 +//Page no. 96 +d=.004 //('Enter the diameter of the diameter of the sphere in meters=:') +p=13600 //('Enter the density of the liquid in glass bulb=:') +c=150 //('Enter the specific heat of liquid(in j/kg degree centigrade)=:') +U=40 //('Enter the heat transfer coefficient in W/m^2-degree centigrade=:') + +Vb=(%pi*d*d*d)/6; //Volume of sphere +Ab=%pi*d*d; //Surface area of sphere +timconstant=(p*c*Vb*1000)/(U*Ab); //time constant +disp(timconstant) + diff --git a/49/CH3/EX3.6/example6.sce b/49/CH3/EX3.6/example6.sce new file mode 100755 index 000000000..61e360e64 --- /dev/null +++ b/49/CH3/EX3.6/example6.sce @@ -0,0 +1,24 @@ +//Caption:Step response of first order systems +//Example 6 +// page 100 +clc; +// Given:In air, probe dry timeconstant(tc)=30s +// In water tc=5s +// In air, probe wet tc=20s +// for t<0,T=25 degree C(initial temperature) +// 0 500*10^6 then + disp("The diaphragm must be redesigned"); + t1=((3*p_max*R^2)/(4*500*10^6))^(1/2); +printf('The required thickness is %fd m\n',t1) + +else + disp("The design is OK"); +end +// Let the voltage ratio be represented by Err +Err=(820*p_max*R^2*(1-v^2))/(E*(t1^2)) +printf('The voltage ratio is %fd\n', Err) +// For maximum power dissipation +PT=1 +RT=120 +Ei=2*(PT*RT)^(1/2); +disp("Let the sensitivity of the transducer be represented by ss") +ss=(820*R^2*(1-v^2)*Ei)/(E*t1^2) +printf('sensitivity is %fd\n', ss) +// Part c +S_LVDT=(ss*16*t^3*E)/(3*R^4*(1-v^2)*Ei) +printf('SENSITIVITY OF LVDT IS %fd \n',S_LVDT) + diff --git a/49/CH6/EX6.5/ex5.sce b/49/CH6/EX6.5/ex5.sce new file mode 100755 index 000000000..4d0ab154e --- /dev/null +++ b/49/CH6/EX6.5/ex5.sce @@ -0,0 +1,27 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT +//Caption : Pressure Gage +// Example 5 // Page 347 +p_max=10*10^6 //('Enter the maximum differential pressure') +fn=20000 //(' Enter the frequency') +E=200*10^9; // modulus of elasticity +v=0.3; // poissons ratio +p=7800 // density of steel +disp("Let t/R be represented by TR ") +TR=((3*p_max*(1-v^2))/(4*E))^(1/4) +// we know R^2/t = r2t=10.21(Et^2/12(1-v^2)p)^0.5/R^2 using it , we have +r2t=(10.21*sqrt(E/(12*(1-v^2)*p)))/fn +R=TR*r2t; +printf('value of R is %fd m\n', R) + +t=R*TR; +printf(' value of t is %fd m \n',t) + +eo=8.85*10^-12 +er=1.0006; +d=.001 //('Enter the distance between the plates of capacitor=:') +S=-(eo*er*%pi*R^2)/d^2; +// variation of capacitor distance with respect to pressure is given by +q=(3*R^4*(1-v^2))/(16*E*t^3) +// total sensitivity of the pressure transducer is given by +sensitivity=S*q*10^18; +printf(' So the total sensitivity of the pressure transducer is given by %1.2f pF/MPa\n',sensitivity) \ No newline at end of file diff --git a/49/CH6/EX6.6/ex6.sce b/49/CH6/EX6.6/ex6.sce new file mode 100755 index 000000000..2c601e1d9 --- /dev/null +++ b/49/CH6/EX6.6/ex6.sce @@ -0,0 +1,28 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT +//Caption : High Pressure Measurement +// Example 6 // Page 357 +R1=100 //(' Enter the resistance of Mangnin wire=:') +disp("R1=100") +b=25*10^-12; // standard for mangnin +disp("b=25*10^-12;") +disp("u=0.5") +u=0.5 //(' enter the uncertainty in measuring pressure for gage=:') +// to calculate maximum uncertainty in differential pressure +udp=u*(10-0.1)*10^6/100; +uR=R1*b*udp; +printf('So the maximum uncertainty in measuring resistance is %fd ohm \n',uR) +//to calculate the output bridge voltage for 10 MPa +Ei=5 //('enter the input voltage=:') +disp("p1=0.1*10^6") +disp("R2=R1*(1+b*p1)") +disp("p2=10*10^6 ") +p1=0.1*10^6 //('enter the pressure at which bridge is assumed to be balanced=:') +R2=R1*(1+b*p1) +p2=10*10^6 //('enter the pressure at which output voltage is to be calculated=:') +R3=R1*(1+b*p2); +dR=R3-R2; +r=1; +Eo=(r*dR*Ei)/((1+r)^2*R2) +printf(' The output bridge voltage is %fd volt\n',Eo) + + diff --git a/49/CH6/EX6.7/ex7.sce b/49/CH6/EX6.7/ex7.sce new file mode 100755 index 000000000..3e32f4d67 --- /dev/null +++ b/49/CH6/EX6.7/ex7.sce @@ -0,0 +1,15 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT +//Caption : McLeod Gage +// Example 7 // Page 362 +disp("Vb=150*10^-6") +disp("d=1.5*10^-3") +disp("a=%pi*d^2/4;") +Vb=150*10^-6 //('enter the volume of the Mc Leod gage=:') +d=1.5*10^-3 //('enter the diameter of capillary=:') +a=%pi*d^2/4; +p=40*10^-6 //('enter the pressure for which the gage reading is to be noted=:') +//y=(-p*area_cap+sqrt((p*area_cap)^2-4*p*area_cap*Vb))/(2*area_cap); +l=p*a; + +y=(sqrt(l^2+(4*l*Vb))-l)/(2*a) +printf('The gage reading comes out to be %fd mof Hg\n',y) diff --git a/49/CH6/EX6.8/ex8.sce b/49/CH6/EX6.8/ex8.sce new file mode 100755 index 000000000..2d7eabefd --- /dev/null +++ b/49/CH6/EX6.8/ex8.sce @@ -0,0 +1,14 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT +//Caption : Knudsen Gage +// Example 8 // Page 363 +disp("Td=40") +disp("Tv=300") +disp("p=2*10^-6") +Td=40 //('enter the temperature difference=:') +Tv=300 //('enter the gas temperature at which the force has to be calculated=:') +p=2*10^-6 //('enter the pressure(in m of Hg)=:') +pa=p*13600*9.81; +k=4*10^-4; // knudsen constant +F=(pa*Td)/(k*Tv); +printf('So the required force is %1.1f N',F) + diff --git a/49/CH6/EX6.9/ex9.sce b/49/CH6/EX6.9/ex9.sce new file mode 100755 index 000000000..1a846c6de --- /dev/null +++ b/49/CH6/EX6.9/ex9.sce @@ -0,0 +1,10 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT +//Caption : Sound Measurement +// Example 9// Page 369 +disp("Lp=104") +Lp=104 //('enter the sound pressure level in decibles=:') +disp("pa=20*10^-6;") +disp("p=sqrt(10^(Lp/10)*pa^2);") +pa=20*10^-6; // rms pressure threshold of hearing +p=sqrt(10^(Lp/10)*pa^2); +printf('root mean square sound pressure is %1.3fPa\n',p) 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) diff --git a/49/CH8/EX8.1/ex1.sce b/49/CH8/EX8.1/ex1.sce new file mode 100755 index 000000000..8d03580a5 --- /dev/null +++ b/49/CH8/EX8.1/ex1.sce @@ -0,0 +1,42 @@ +//CHAPTER 8 _ TEMPERATURE MEASUREMENT +//Caption : Thermocouple +// Example 1 // Page 500 +t1 = 100 //('entering the temperature(in deg cent) =:') +e1= 5 // ('entering the emf (in mv)at temperature t1 =:') +t2=445 //('entering the second temperature(in deg cent)= :') +e2=25 //('entering the emf(in mv) at temperature t2 =:') +// TO CALCULATE CONSTANTS a AND b +//e1=a*(t1)+b*(t1^2); +//e2=a*(t2)+b*(t2^2); +A=[t1 t1^2;t2 t2^2]; + +B=[e1 0 ;e2 0] +Y=lsq(A,B); //computes the minimum norm least square solution of the equation A*Y=B, +disp(Y) + +printf('value of constants a and b are %fd V/deg cent and %fd V/deg cent respectively',Y(1,1),Y(2,1)) +//PART B +//Let e(0-40) be represented by E1 , e(40-t) by E2 and e(0-t) by E3 + +E1=(Y(1,1)*40)+(Y(2,1)*40^2); +disp(E1); +E2=2; // given +E3=E1+E2; +D=sqrt((Y(1,1)^2)+(4*Y(2,1)*E3)); +t=(-Y(1,1)+D)/(2*Y(2,1)); +disp(t) +printf('Hot junction temperature is %1.1f deg cent ',t); +// PART C +// Let e(0-500) be represented by E4 and e(40-500) by E5 +E4=Y(1,1)*500+Y(2,1)*500^2; +E5=E4-E1; +disp (E5) +printf('emf when the hot junction is at 500 and cold at 40 is %1.1f mV ',E5); + + + + + + + + diff --git a/49/CH8/EX8.2/ex2.sce b/49/CH8/EX8.2/ex2.sce new file mode 100755 index 000000000..c7ead969b --- /dev/null +++ b/49/CH8/EX8.2/ex2.sce @@ -0,0 +1,15 @@ +//CHAPTER 8 _ TEMPERATURE MEASUREMENT +//Caption : THERMOCOUPLE AND THERMOPILE +// Example 2 // Page 511 +h=(100/5)*10^-3 // in mv +printf('emf per thermocouple is %1.2f mV \n', h); +// e(0-100)+e(100-t)=e(0-t) +// Let e(0-100) = E1 and e(100-t)= E2 +E1= 5.27 // given +E2=h; +E3=E1+E2; +E4=5.325; // given emf at 101 deg cent +c=100 ; // given that cold junction is at 100 deg cent +// BT EXTRAPOLATION +t=c+((E3-E1)/(E4-E1)); +printf('Required temperature difference is %1.2f deg cent ' ,t) diff --git a/49/CH8/EX8.3/ex3.sce b/49/CH8/EX8.3/ex3.sce new file mode 100755 index 000000000..cb090f788 --- /dev/null +++ b/49/CH8/EX8.3/ex3.sce @@ -0,0 +1,38 @@ +//CHAPTER 8 _ TEMPERATURE MEASUREMENT +//Caption : ELECTRICAL- RESISTANCE SENSORS +// Example 3 // Page 517 +s =0.2 //('enter the sensitivity =:') +d=0.4*10^-3 +A=%pi*(d^2)/4; +// R=pho *l/A +R=100 +pho=0.8*10^-3; +l=(R*A)/pho; + +printf('Length corresponding to resistance 100 ohm and diameter 0.4mm is %fd m\n',l) +d=2*10^-3 +A=%pi*(d^2)/4; +R=100 +pho=0.8*10^-3; +l=(R*A)/pho; +printf('Length corresponding to resistance 100 ohm and diameter 2mm is %1.2f m\n',l) +// The above lengths of wire indicate that their diameters should be very small so reasonable lengths can be used in practical applications . +// Let resistance at 50deg cent be R1 and at 100 deg cent be R2 +t=-50 //('Enter the temperture at which resistance has to be calculated = :') +R1= R+s*(t-20); +printf('Resistance at temperature %d is %f ohm \n',t,R1) +t2=100 //('Enter the temperture at which resistance has to be calculated = :') +R2= R+s*(t2-20); +printf('Resistance at temperature %d is %f ohm\n ',t2,R2) + + + + + + + + + + + + diff --git a/49/CH8/EX8.4/ex4.sce b/49/CH8/EX8.4/ex4.sce new file mode 100755 index 000000000..eb0d4561e --- /dev/null +++ b/49/CH8/EX8.4/ex4.sce @@ -0,0 +1,24 @@ +//CHAPTER 8 _ TEMPERATURE MEASUREMENT +//Caption : THERMISTOR +// Example 4 // Page 521 +To= 293 //('Enter the temperature in K=:') +Ro=1000 //('Entering the corresponding resistance in ohm=:') +B=3450 // (' Entering the val)ue of constant=:') +Rt=2500 //(' Entering the resistance at which temperature has to be calculated=:') +T=1/((1/To)+(1/B)*log(Rt/Ro)); +disp("Temperature is given by:") +disp("T=1/((1/To)+(1/B)*log(Rt/Ro));") +printf('The temperature corresponding to resistance of %d ohm is %1.3f K \n ',Rt,T) +Wrt=5 //('Entering the error in Rt resistance measurement=:' ) +Wro=2 //('Entering the error in Ro temperature measurement=:') +// Let dT/dRt be represented by DRt and dT/dRo by DRo +DRt=-T^2/(B*Rt) ; +DRo=-T^2/(B*Ro); +disp ("Error in temperature measurement is given by:") +disp("Wt=sqrt((DRt*Wrt)^2+(DRo*Wro)^2);") +Wt=sqrt((DRt*Wrt)^2+(DRo*Wro)^2); +printf('Error in the required temperature measurement is %1.4f K \n',Wt) +printf('So the required temperature is %d+_%1.4f K \n',T,Wt) + + + diff --git a/49/CH8/EX8.5/ex5.sce b/49/CH8/EX8.5/ex5.sce new file mode 100755 index 000000000..e6ec98bd3 --- /dev/null +++ b/49/CH8/EX8.5/ex5.sce @@ -0,0 +1,32 @@ +//CHAPTER 8 _ TEMPERATURE MEASUREMENT +//Caption : PYROMETERS +// Example 5// Page 545 + +//(i)Optical Pyrometer +// Ta(K) is the actual temperature and Ti(K) is the indicated temperature +TI=1200 //('Enter the indicated temperature in degree centigrade=:') +Ti=TI+273 +disp("Ti=TI+273") +lamda=0.7*10^-6 //('Entering the wavelength(in meters) at which intensities are compared') +epsilon=0.6 //('Entering the emissivity of the body') +C2=0.014387 //('Entering the value of constant') +disp("Actual temperature is given by :") +disp("Ta=(Ti*C2)/(C2-lamda*Ti*log(epsilon));") +Ta=(Ti*C2)/(C2-lamda*Ti*log(epsilon)); +ta=Ta-273; +printf('Actual temperature of the body is %d \n',ta) +//(ii) For radiation pyrometer +T=(epsilon*Ta^4)^(1/4); +ti=T-273; +printf('Indicated temperature in degree celsius of the total radiation pyrometer is %d degree cent \n',ti) +//To calculate error +Error1=Ta-Ti; +printf('Error using Optical Pyrometer is %d K \n',Error1) +Error2=Ta-T; +printf('Error using Radiation Pyrometer is %d K \n',Error2) + + + + + + -- cgit