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 /49 | |
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 '49')
45 files changed, 1112 insertions, 0 deletions
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<t<7, T=35 degree C(dry probe in air)
+// 7<t<15, T=70 degree C(probe in water)
+// 15<t<30, T=35 degree C(wet probe in air)
+
+//case i T(a)=25
+T(7)=35+(25-35)*%e^(-(7/30))
+printf("Temperature at the end of first interval")
+disp(T(7));
+//case ii T(a)=T(7)
+T(15)=70+(T(7)-70)*%e^(-((15-7)/5))
+printf("Temperature at the end of second interval")
+disp(T(15));
+//case iii T(a)=T(15)
+T(30)=35+(T(15)-35)*%e^(-((30-15)/20))
+printf("Temperature at the end of third interval")
+disp(T(30));
diff --git a/49/CH3/EX3.7/example7.sce b/49/CH3/EX3.7/example7.sce new file mode 100755 index 000000000..3e444cf6b --- /dev/null +++ b/49/CH3/EX3.7/example7.sce @@ -0,0 +1,35 @@ +//Caption:Adequate frequency response conditions for first order instruments
+//Example 7
+//Page 103
+// To measure qi given by
+// qi=sin2t+0.3sin20t
+// timeconstant=0.2s
+H=1/((0.16+1)^0.5); //H(jw)=qo/qiK
+phi=((atan(-2*0.2))*180)/%pi ;
+H2=1/((16+1)^0.5);
+phi2=((atan(-20*0.2))*180)/%pi;
+printf("sinusoidal transfer function at 2 rad/sec is")
+disp(H);
+disp(phi)
+printf("sinusoidal transfer function at 20rad/sec is")
+disp(H2)
+disp(phi2)
+
+printf("qo/K can be written as")
+
+printf(" qo=0.93K sin(2t-21.8)+(0.24K) 0.3sin(20t-76)")
+//Suppose we consider use of an instrument with timeconstant=0.002s
+H=1/((1.6*(10)^(-5)+1)^0.5);
+phi=((atan(-2*.002))*180)/%pi ;
+H2=1/((1.6*(10^-3)+1)^0.5);
+phi2=((atan(-20*0.002))*180)/%pi;
+printf("sinusoidal transfer function at 2 rad/sec is")
+disp(H);
+disp(phi)
+printf("sinusoidal transfer function at 20rad/sec is")
+disp(H2)
+disp(phi2)
+printf("qo/K can be written as")
+
+printf(" qo=K sin(2t-0.23)+K 0.3sin(20t-2.3)")
+printf("Clearly, this instrument measures the given qi faithfully")
diff --git a/49/CH4/EX4.1/ex1.sce b/49/CH4/EX4.1/ex1.sce new file mode 100755 index 000000000..1d773dfd7 --- /dev/null +++ b/49/CH4/EX4.1/ex1.sce @@ -0,0 +1,26 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Resistance strain gage
+// Example 1// Page 163
+
+disp("Rg=120")
+disp("E=200 *10^9")
+disp("dL=3 ")
+disp("dp=0.3")
+disp("v=0.3 ")
+Rg=120 //('enter the resistance of strain gage=:')
+E=200 *10^9 // given
+dL=3 //('enter the percent change in the length of nthe rod due to loading=:')
+dp=0.3 //('enter the corresponding change in the resistivity of strain gage=:')
+v=0.3 // poissons ratio
+e=dL/100;
+dp_p=dp/100
+disp("dR_R=dp_p+e*(1+2*v)")
+dR_R=dp_p+e*(1+2*v)
+Sg=dR_R/e;
+printf('So the gage factor is %fd \n',Sg)
+u_dr=0.02 //('enter the uncertainty in resistance=:')
+u_sig=E*u_dr/(Rg*Sg)*10^-6;
+printf(' Stress uncertainty is %1.1f MPa\n',u_sig)
+// To calculate strain uncertainty
+u_e=u_dr/(Rg*Sg)
+printf('Strain uncertainty is %fd\n',u_e)
diff --git a/49/CH4/EX4.10/ex10.sce b/49/CH4/EX4.10/ex10.sce new file mode 100755 index 000000000..f36eda636 --- /dev/null +++ b/49/CH4/EX4.10/ex10.sce @@ -0,0 +1,31 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Seismic pickup
+// Example 10// Page 238
+disp("r1=0.2;")
+disp("r2=0.6 ")
+disp("tou=0.05")
+r1=0.2;
+r2=0.6 // given
+tou=0.05; //given
+wn=1600 //(' enter the natural frequency=:')
+disp("H1=1/sqrt((1-r1^2)^2+(2*tou*r1)^2)")
+H1=1/sqrt((1-r1^2)^2+(2*tou*r1)^2);
+H1_phase=-atan((2*tou*r1)/(1-r1^2))*360/(2*%pi);
+disp("H1_phase=-atan((2*tou*r1)/(1-r1^2))*360/(2*%pi)")
+H2=1/sqrt((1-r2^2)^2+(2*tou*r2)^2);
+H2_phase=-atan((2*tou*r2)/(1-r2^2))*360/(2*%pi);
+//In order to obtain the amplitude of relative displacement, transfer function must be multiplied by amplitude of the input signal and the static sensitivty of the pickup (1/wn^2) for each frequency
+//amp1=H1/wn^2;
+//amp2=H2/wn^2;
+tou2=0.6; // given
+H11=1/sqrt((1-r1^2)^2+(2*tou2*r1)^2);
+H11_phase=-atan((2*tou2*r1)/(1-r1^2))*360/(2*%pi);
+H22=1/sqrt((1-r2^2)^2+(2*tou2*r2)^2);
+H22_phase=-atan((2*tou2*r2)/(1-r2^2))*360/(2*%pi);
+//amp11=H11/wn^2;
+//amp22=H22/wn^2;
+printf('the magnitude of the transfer function will be %fd and %fd while the phases will shift by %fd and %fd for tou=0.05\n',H1,H2,H1_phase,H2_phase)
+printf('the magnitude of the transfer function will be %fd and %fd while the phases will shift by %fd and %fd for tou=0.6\n',H11,H22,H11_phase,H22_phase)
+
+
+
diff --git a/49/CH4/EX4.11/ex11.sce b/49/CH4/EX4.11/ex11.sce new file mode 100755 index 000000000..41b8ad9ab --- /dev/null +++ b/49/CH4/EX4.11/ex11.sce @@ -0,0 +1,15 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Accelerometer
+// Example 11// Page 240
+disp("fn=20000")
+disp("tou=0.6")
+disp("f=10000 ")
+fn=20000 //('enter the natural frequency of the accelerometer =:')
+tou=0.6 //('enter the daping ratio of the accelerometer=:')
+f=10000 //('enter the frequency at which transfer function is to be calculated=:')
+r=f/fn;
+H_mag=1/sqrt((1-r^2)^2+(2*tou*r)^2);
+H_phase=atan((2*tou*r)/(1-r^2))*360/(2*%pi);
+printf(' The magnitude is %fd and phase is %fd deg\n',H_mag,H_phase)
+error=(H_mag-1)*100/1;
+printf(' Error at %fd Hz is %d percent\n',f,error)
diff --git a/49/CH4/EX4.12/ex12.sce b/49/CH4/EX4.12/ex12.sce new file mode 100755 index 000000000..6e5cd7d11 --- /dev/null +++ b/49/CH4/EX4.12/ex12.sce @@ -0,0 +1,20 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Strain gage
+// Example 12// Page 172
+Rg=120; // given
+Sg=2 // gage factor is given
+stress=7*10^6; //given
+Ia=.03 //('enter the gage current=:')
+//maximum allowable bridge voltage is
+Eex=240*Ia;
+strain=7*10^6/(200*10^9);
+dR=strain*Sg*Rg;
+Eo=Eex*dR/(4*Rg);
+printf('output voltage is %fd V\n',Eo)
+k=1.38*10^-23; //boltzmann constant
+T=300 //room temperature
+dF=100000// bandwidth
+E_noise=sqrt(4*k*Rg*T*dF)
+printf('rms noise voltage is %fd V\n',E_noise)
+SN=Eo/E_noise;
+printf('Signal to noise ratio is %fd\n',SN)
\ No newline at end of file diff --git a/49/CH4/EX4.2/ex2.sce b/49/CH4/EX4.2/ex2.sce new file mode 100755 index 000000000..9b8496867 --- /dev/null +++ b/49/CH4/EX4.2/ex2.sce @@ -0,0 +1,22 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Rosette
+// Example 2// Page 168
+Eh=625*10^-6 //('enter the circumferential strain=:')
+Ea= 147*10^-6 //('enter the longitudinal strain=:')
+E=200*10^9 // given
+v=0.3; // poissons ratio
+// to calculate circumferential stress
+sig_h=E/(1-v^2)*(Eh+v*Ea)*10^-6;
+printf('Circumferential stress (hoops stress) is %1.1f MPa\n',sig_h);
+sig_a=E/(1-v^2)*(v*Eh+Ea)*10^-6;
+printf('Axial stress is %1.2f M Pa\n',sig_a);
+// To calculate ratio of stresse
+disp("Let the ratio be represented by RR")
+RR=sig_h/sig_a;
+printf('Ratio of stresses is %fd\n',RR)
+disp("Let the ratio of strains be represented by SS")
+SS=Eh/Ea;
+printf('THe ratio of strains is %1.2f', SS)
+
+
+
diff --git a/49/CH4/EX4.3/ex3.sce b/49/CH4/EX4.3/ex3.sce new file mode 100755 index 000000000..1bcb6dabe --- /dev/null +++ b/49/CH4/EX4.3/ex3.sce @@ -0,0 +1,23 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Strain gage
+// Example 3// Page 176
+disp("Rg=120")
+disp("Sg=2;")
+disp("Rs=120000")
+Rg=120; // given
+Sg=2; // gage factor
+Rs=120000 //('enter the value of shunt resistor=:')
+disp("The input bridge excitation is represented by Eex")
+A=10 //('enter the amplifier gain=:')
+// The shunt resistance has to be very large since we intend to measure only very small change in resistanc
+eo=30*10^-3 //('enter the unbalanced bridge voltage=:')
+dR=Rg/(Rg+Rs);
+r=1;//ratio of resistances of adjacent arms
+Eex=eo*(1+r)^2/(r*dR*A);
+printf('The input excitation voltage is %fd V\n',Eex)
+p1=2 *(1+v) // bridge factor
+Eo=.5 //('enter the voltmeter reading when shunt is removed=:')
+E_axial=Eo*(1+r)^2/(r*Sg*p1*Eex*A);
+printf(' Axial strain is %fd\n ',E_axial)
+E_trans=E_axial*v;
+printf('The transverse strain is -%fd',E_trans)
diff --git a/49/CH4/EX4.4/ex4.sce b/49/CH4/EX4.4/ex4.sce new file mode 100755 index 000000000..dc3a022e0 --- /dev/null +++ b/49/CH4/EX4.4/ex4.sce @@ -0,0 +1,19 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Capacitance pick ups
+// Example 4// Page 192
+disp("h=.005")
+disp("A=200*10^-6")
+disp("n=0.03")
+h=.005 //('enter the distance between the capacitors=:')
+A=200*10^-6 //('enter the area of the transducer=:')
+n=0.03 //('enter the non linearity=:')
+w=.014 //('enter the side of the square capacitor=:')
+er=1 // given that air if filled
+eo=8.85 ;
+// to calculate the sensitivity of this transducer, let it be represented by c
+c=eo*er*A/h^2;
+printf('sensitivity of the transducer is %1.2f pF/m \n',c)
+// to calculate the sensitivity of the square moving plate sensor cl
+cl=eo*er*w/h;
+printf('the sensitivity of the square moving plate sensor is %1.2f pF/m ',cl)
+
diff --git a/49/CH4/EX4.5/ex5.sce b/49/CH4/EX4.5/ex5.sce new file mode 100755 index 000000000..cf7d0db81 --- /dev/null +++ b/49/CH4/EX4.5/ex5.sce @@ -0,0 +1,25 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Piezoelectric transducer
+// Example 5// Page 207
+g=15 //('enter the value constant g for the crystal=:')
+A=%pi*((5*10^-3)^2)/4 //('enter the area of cross section of the crystal=:')
+f=50 //('enter the frequency of sinusoidally varying pressure=:')
+ eoer=15*10^-9 // for the crystal
+ E=120 *10^9 // youngs modulus of elasticity
+ t=.003 //('enter the thichness of the crystal=:')
+ Kq=g*eoer*A*E/t;
+ printf('Charge sensitivity is %fd mC/m \n',Kq)
+ Ccr=eoer*A/t;
+ Camp=2000*10^-12;
+ Ccable=100*10^-12;
+ C=Ccr+Camp+Ccable;
+ Ramp=2000000 //('enter the input impedance of the amplifier')
+ Req=Ramp;
+ tou=Req*C; // time constant
+ // Let the amplitude ratio is given by EOP
+ w=2*%pi*f;
+ EOP=Kq*t*w*tou/(C*E*sqrt(1+(w*tou)^2))
+ printf('The amplitude ratio is %fd mV/V\n',EOP)
+ // let the phase lag be represented by phi
+ phi=360*atan(1/(w*tou))/(2*%pi);
+ printf(' The phase lag is %fd deg',phi);
\ No newline at end of file diff --git a/49/CH4/EX4.7/ex7.sce b/49/CH4/EX4.7/ex7.sce new file mode 100755 index 000000000..728446efc --- /dev/null +++ b/49/CH4/EX4.7/ex7.sce @@ -0,0 +1,23 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Seismic vibration
+// Example 7// Page 232
+disp("ty=0.6")
+disp("fn=10")
+disp("f=25")
+disp("M=0.15")
+disp("xo=1.5*10^-3")
+ty=0.6 //(' enter the damping ratio of seismic vibration pickup=:')
+fn=10 //('enter the natural frequency =:')
+f=25 //('enter the frequency at which the table is vibrating=')
+M=0.15 //( 'enter the seismic mass=:')
+xo=1.5*10^-3 //('enter the relative amplitude of the mass=:')
+r=f/fn;
+disp("xi=xo/((r^2)/sqrt((1-r^2)^2+(2*ty*r)^2));")
+xi=xo/((r^2)/sqrt((1-r^2)^2+(2*ty*r)^2));
+error=(xi-xo)/xo;
+printf('error in measurement is %fd\n',error)
+wn=2*%pi*fn;
+Ks=wn^2*M;
+printf('spring constant is %fd N/m\n',Ks)
+B=ty*(2*sqrt(Ks*M));
+printf(' damping coefficient of pickup is %fdN-s/m\n',B)
\ No newline at end of file diff --git a/49/CH4/EX4.8/ex8.sce b/49/CH4/EX4.8/ex8.sce new file mode 100755 index 000000000..b7c8ea6da --- /dev/null +++ b/49/CH4/EX4.8/ex8.sce @@ -0,0 +1,40 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Seismic velocity pickup
+// Example 8// Page 235
+disp("fn=4")
+disp("S=500")
+disp("m=0.2")
+disp("v=1.5*10^-2")
+fn=4 //('enter the natural frequency=:')
+S=500 //('enter the sensitivity=:')
+m=0.2 //('enter the mass =:')
+v=1.5*10^-2 //('enter the maximum velocity with which the surface is vibrating=:')
+f=10 //('enter the frequency=:')
+r=f/fn;
+tou=0.2 // given
+w=2*%pi*f;
+eo=(v*S*r^2)/sqrt((1-r^2)^2+(2*tou*r)^2);
+printf('The peak voltage corresponding to 10Hz frequency is %fd mV\n',eo)
+phi1=360*atan(2*tou*r/(1-r^2))/(2*%pi);
+printf('phase angle corresponding to the 10 Hz frequency is %fd deg\n',phi1)
+f2=20 //('enter the other frequency=:')
+r=f2/fn;
+eo=(v*S*r^2)/sqrt((1-r^2)^2+(2*tou*r)^2);
+printf('The peak voltage corresponding to 20Hz frequency is %fd mV\n',eo)
+phi2=360*atan(2*tou*r/(1-r^2))/(2*%pi);
+printf('phase angle corresponding to the 20 Hz frequency is %fd deg\n',phi2)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/49/CH4/EX4.9/ex9.sce b/49/CH4/EX4.9/ex9.sce new file mode 100755 index 000000000..a6546aeed --- /dev/null +++ b/49/CH4/EX4.9/ex9.sce @@ -0,0 +1,32 @@ +//CHAPTER 4_ Motion and Dimensional Measurement
+//Caption : Piezoelectric transducer
+// Example 9// Page 237
+disp("Ccr=1200")
+disp("Kq=100")
+disp("Cc=250")
+Ccr=1200 //('enter the capacitance of the transducer=:')
+Kq=100 //('enter the charge sensitivity of the transducer=:')
+Cc=250 //('enter the capacitance of the connecting cable=:')
+//to calculate the sensitivity of transducer alone
+Ktrans=Kq/Ccr;
+printf('the sensitivity of the transducer alone is %fd V/micro m\n',Ktrans)
+Camp=75 //('enter the capacitance of amplifier=:')
+Ceq=Ccr+Cc+Camp
+Ktot=Kq/Ceq;
+printf('total sensitivity of the transducer is %fdV/micro m\n',Ktot)
+Ramp=2*10^6 //('enter the resistance of the amplifier=:')
+disp("tou=Ramp*Ceq*10^-12")
+tou=Ramp*Ceq*10^-12;
+e=5 //('enter the error in percent=:')
+e1=1-(e/100);
+// let tou*w1=l
+l=sqrt(e1^2/(1-e1^2));
+f1=l/(2*%pi*tou);
+printf('The lowest frequency that can be measured with 5 per cent amplitude error by the entire system is %fd Hz\n',f1)
+tou1=l/(2*%pi*100)
+disp("Ceq1=tou1*10^12/Ramp")
+Ceq1=tou1*10^12/Ramp
+Creq=Ceq1-Ceq;
+printf(' The capacitance that needs to be connected in parallel to extend the range of 5percent error to 100hz is %fd pF\n',Creq)
+K_hf=Kq/Ceq1
+printf('high frequency sensitivity is %fd V/micro m\n',K_hf)
\ No newline at end of file diff --git a/49/CH5/EX5.1/ex1.sce b/49/CH5/EX5.1/ex1.sce new file mode 100755 index 000000000..0e8121947 --- /dev/null +++ b/49/CH5/EX5.1/ex1.sce @@ -0,0 +1,24 @@ +//CHAPTER 5_ Force,Torque and Shaft Power Measurement
+//Caption : Load cell
+// Example 1// Page 294
+
+disp("Sg=2;")
+disp("Rg=120;")
+disp("v=0.3")
+disp("E=210*10^9;")
+Sg=2; // Strain gage factor
+Rg=120; // Gage resistance
+v=0.3 // poissons ratio
+E=210*10^9; // for steel
+Pd=1 //('enter the power dissipation capacity=:')
+// Looking for a suitable voltage measuring system
+sig_f=700*10^6 //('enter the fatigue strength=:')
+P_max=10000 //('enter the maximum load=:')
+// For a load cell of square cross-section d,
+d=sqrt(P_max/sig_f);
+Ei=sqrt(4*Rg*Pd) //input excitation to the bridge circuit
+x=(Sg*sig_f*(1+v))/(2*E);
+dEo_max=x*Ei*10^3;
+disp("x=(Sg*sig_f*(1+v))/(2*E)")
+printf('a voltmeter with a maximum range of %1.2f mV is suitable for measurement',dEo_max)
+disp("Round it off to get the suitable range voltmeter")
\ No newline at end of file diff --git a/49/CH5/EX5.2/ex2.sce b/49/CH5/EX5.2/ex2.sce new file mode 100755 index 000000000..72b88c815 --- /dev/null +++ b/49/CH5/EX5.2/ex2.sce @@ -0,0 +1,23 @@ +//CHAPTER 5_ Force,Torque and Shaft Power Measurement
+//Caption : Load cell
+// Example 2// Page 295
+disp("b=.2")
+disp("h=.05")
+disp("Sg=2")
+disp("Rg=120")
+disp("sig_f=150*10^6")
+b=.2 //('enter the width of load cell=:')
+h=.05 //('enter the thickness of load cell=:')
+Sg=2;
+Rg=120;
+sig_f=150*10^6 //('enter the fatigue strength=:')
+E=70; //(in GPa) for aluminium
+v=0.33; //poissons ratio
+// Let dE/V_max be represented by W
+W=Sg*sig_f/E;
+printf('(dE/V)_max= %fd\n ',W)
+P_max=100000 //('enter the value of maximum load=:')
+l=sig_f*b*h^2/(6*P_max);
+
+S=(6*Sg*l)/(E*b*h^2);
+printf('Sensitivity of this load cell is %1.2f nV/N/per unit excitation',S);
diff --git a/49/CH5/EX5.3/ex3.sce b/49/CH5/EX5.3/ex3.sce new file mode 100755 index 000000000..603428eb1 --- /dev/null +++ b/49/CH5/EX5.3/ex3.sce @@ -0,0 +1,21 @@ +//CHAPTER 5_ Force,Torque and Shaft Power Measurement
+//Caption : Load cell
+// Example 3// Page 296
+Sg=2;
+v=0.3; //poissons ratio
+Ei=10 //('enter the excitation voltage=:')
+A=5*10^-4 //('enter the area of load cell=:')
+E=200; //(in Gpa) Youngs modulus
+// Let sensitivity Eo/P be represented by Se
+Se=Sg*(1+v)*Ei/(2*A*E)*.001;
+printf('Sensitivity of this load cell is %1.2f micro V/N\n',Se)
+Rg=120 //given
+Pd=1 //('enter the power dissipated in each gage=:')
+Ei_max=sqrt(4*Rg*Pd)
+Se_max=Sg*(1+v)*Ei_max/(2*A*E)*.001
+printf('The maximum density that can be achieved without endangering the strain gage sensors is %1.2fmicro V/N\n',Se_max)
+// Let (Eo/Ei)_max be represented by Em
+sig_f=600*10^6 //('enter the fatigue strength=:')
+Em=Sg*sig_f*(1+v)/(2*E)*10^-6
+printf('The voltage ratio is %1.1f mV/V',Em)
+
diff --git a/49/CH5/EX5.4/ex4.sce b/49/CH5/EX5.4/ex4.sce new file mode 100755 index 000000000..a53cede21 --- /dev/null +++ b/49/CH5/EX5.4/ex4.sce @@ -0,0 +1,19 @@ +//CHAPTER 5_ Force,Torque and Shaft Power Measurement
+//Caption : Piezoelectric Transducers
+// Example 4// Page 302
+mc=0.04 //('enter the connector mass=:')
+m=0.01 //('enter the seismic mass=:')
+k=10^9 //('enter the stiffness of the sensing element=:')
+Sf=.005 //('enter the sensitivity of the transducer=:')
+Xi=100*10^-6 // ('enter the displacement amplitude of the shaker vibration=:')
+Eo=.1 //('enter the reading of voltage recorder connected to the transducer=:')
+wnc=sqrt(k/(m+mc));
+R=20; //20N (rms)
+Z=(1/(m+mc))*(1/wnc^2)*R;
+printf('Relative displacement is %fd',Z)
+disp("wnc^2 is approx. 10^9. So,")
+disp("Z is approx. 20nm(rms)")
+f=100; // given
+
+F=R-((2*%pi*f)^2*(m+mc)*Xi);
+printf('Actual force transmitted to the plate is %fd N',F)
diff --git a/49/CH5/EX5.5/ex5.sce b/49/CH5/EX5.5/ex5.sce new file mode 100755 index 000000000..fb2ddc9db --- /dev/null +++ b/49/CH5/EX5.5/ex5.sce @@ -0,0 +1,14 @@ +//CHAPTER 5_ Force,Torque and Shaft Power Measurement
+//Caption : Torque measurement on rotating shaft
+// Example 5// Page 308
+Sg=2;
+Rg=120;
+G=80*10^9 //('enter the sheer modulus of elasticity=:')
+D=0.05 //('enter the shaft diameter=:')
+dR=0.1 // given
+// we have to find the load torque
+y=2*dR/(Rg*Sg);
+tou_xy=y*G;
+j=%pi*D^4;
+T=tou_xy*2*j/(D*32);
+printf('The load torque is%fd N-m',T)
\ No newline at end of file diff --git a/49/CH6/EX6.1/ex1.sce b/49/CH6/EX6.1/ex1.sce new file mode 100755 index 000000000..08e15fd36 --- /dev/null +++ b/49/CH6/EX6.1/ex1.sce @@ -0,0 +1,16 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
+//Caption : MANOMETERS
+// Example 1 // Page 329
+D1=0.1 //('Enter the diameter of well =:')
+D2=0.01 //('Enter the diameter of the tube =:')
+g=9.81;
+pho_air=1.23 //('Enter the density of air in kg/m^3 =:')
+pho_liquid=1200 //('Enter the density of liquid in manometer =:')
+h=1 //('Enter the height by which liquid decreases in smaller area arm when exposed to the nominal pressure of p2 =:')
+// Let the pressure difference is represented by P=p1-p2
+disp("The pressure difference is given by:")
+disp("P=h*(1+((D2/D1)^2)*g*(pho_liquid-pho_air))")
+P=h*(1+((D2/D1)^2)*g*(pho_liquid-pho_air))*10^-3;
+printf('So the pressure difference is given by %1.2f kPa \n',P)
+
+
diff --git a/49/CH6/EX6.10/ex10.sce b/49/CH6/EX6.10/ex10.sce new file mode 100755 index 000000000..66ed239ec --- /dev/null +++ b/49/CH6/EX6.10/ex10.sce @@ -0,0 +1,11 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
+//Caption : Sound Measurement
+// Example 10// Page 370
+Lp1=75 //('enter the sound level first machine=:')
+Lp2=77 //('enter the sound level second machine=:')
+Lp3=79 //('enter the sound level third machine=:')
+disp("Since the noise levels are incoherent,the total sound pressure is the sum of the mean square value of the individual sound pressures")
+disp("Lp_total=10*log10(10^(Lp1/10)+10^(Lp2/10)+10^(Lp3/10))")
+Lp_total=10*log10(10^(Lp1/10)+10^(Lp2/10)+10^(Lp3/10));
+printf('The total sound pressure is %ddB',Lp_total)
+//decibles are normally rounded off to the nearest integers
\ No newline at end of file diff --git a/49/CH6/EX6.2/ex2.sce b/49/CH6/EX6.2/ex2.sce new file mode 100755 index 000000000..d99616966 --- /dev/null +++ b/49/CH6/EX6.2/ex2.sce @@ -0,0 +1,21 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
+//Caption : MANOMETERS
+// Example 2 // Page 329
+pho_l=900
+disp("pho_l=900 ") //('Enter the density of the fluid =:')
+Pa= 500000
+disp("Pa= 500000 ") //('Enter the air pressure =:')
+t=298
+disp("t=298 ") //('Air is at what temperature(in deg cent) =:')
+R=287;
+disp("R=287;")
+g=9.81;
+T=t+273;
+disp("pho_a=Pa/(R*T);")
+pho_a=Pa/(R*T);
+printf('The density of air is %fd kg/m^3 \n',pho_a)
+h=.2 //('Enter the difference in the height of the fluid in the manometer=:')
+disp("Pres_diff=(g*h)*(pho_l-pho_a)")
+Pres_diff=(g*h)*(pho_l-pho_a)*10^-3
+printf('The differential pressure is %1.2f kPa\n',Pres_diff)
+
diff --git a/49/CH6/EX6.3/ex3.sce b/49/CH6/EX6.3/ex3.sce new file mode 100755 index 000000000..1da1ada8b --- /dev/null +++ b/49/CH6/EX6.3/ex3.sce @@ -0,0 +1,31 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
+//Caption : Elastic Transducers
+// Example 3 // Page 337
+Sa=1000
+disp("Sa=1000") //('Enter the sensitivity of LVDT =:')
+//Properties of diaphragm
+E=200*10^9 //('Enter the value of modulus of elasticity=:')
+disp("E=200*10^9 ")
+v=0.3 //('Enter the Poissons ratio=:')
+disp("v=0.3 ")
+d=0.2 //('Enter the diameter of diaphragm=:')
+disp("d=0.2 ")
+R=d*(1/2);
+P_max=2*10^6 //('What is the maximum pressure?')
+disp("P_max=2*10^6 ")
+p=7800 //('What is the density of steel?')
+disp("Thickness is given by:")
+disp("t=(3*P_max*R^4*(1-v^4)/(4*E))^(1/4);")
+t=(3*P_max*R^4*(1-v^4)/(4*E))^(1/4)
+T=t*1000;
+printf('Thickness is %1.1f mm\n',T)
+//To calculate the lowest pressure in kPa which may be sensed by this instrument , resolution and the natural frequency of the diaphragm
+y=.001 //('Enter the l)east value of measurement=:')
+p_min=(y*16*E*t^3)/(3*R^4*(1-v^2)*Sa)
+printf('So the minimum pressure and resolution is %d Pa \n',p_min)
+f=(10.21/R^2)*((E*t^2)/(12*(1-v^2)*p))^(1/2)
+printf('The natural frequency of diaphragm is %fd Hz',f)
+
+
+
+
diff --git a/49/CH6/EX6.4/ex4.sce b/49/CH6/EX6.4/ex4.sce new file mode 100755 index 000000000..6e4b6f240 --- /dev/null +++ b/49/CH6/EX6.4/ex4.sce @@ -0,0 +1,40 @@ +//CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
+//Caption : Design of Pressure Transducers
+// Example 4 // Page 338
+p_max=10*10^6 //('Enter the capacity of the transducer=:')
+D=.05 //('Enter the diameter of diaphragm=:')
+R=D/2;
+v=0.3; // poissons ratio
+E=200*10^9;
+// We know that
+// y=3pR^4(1-v^2)/16t^3E
+// if y<t/4, the non linearity is restricted to 0.3%
+//So t is given by
+t=(3*p_max*R^4*(1-v^2)/(4*E))^(1/4)
+disp(t)
+printf('thickness comes out to be %fd m\n',t);
+Sr_max=(3*p_max*R^2)/(4*t^2)
+printf('So the max radial stress is %fd Pa\n',Sr_max)
+printf('The given fatigue strength is 500MPa\n' )
+if Sr_max > 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)
+
+
+
+
+
+
|