summaryrefslogtreecommitdiff
path: root/572/CH2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /572/CH2
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '572/CH2')
-rwxr-xr-x572/CH2/EX2.1/c2_1.sce40
-rwxr-xr-x572/CH2/EX2.2/c2_2.sce33
-rwxr-xr-x572/CH2/EX2.3/c2_3.sce46
-rwxr-xr-x572/CH2/EX2.4/c2_4.sce19
-rwxr-xr-x572/CH2/EX2.5/c2_5.sce15
-rwxr-xr-x572/CH2/EX2.6/2_6fig1.pdfbin0 -> 2865 bytes
-rwxr-xr-x572/CH2/EX2.6/2_6fig2.pdfbin0 -> 3499 bytes
-rwxr-xr-x572/CH2/EX2.6/c2_6.sce38
8 files changed, 191 insertions, 0 deletions
diff --git a/572/CH2/EX2.1/c2_1.sce b/572/CH2/EX2.1/c2_1.sce
new file mode 100755
index 000000000..24a66cfee
--- /dev/null
+++ b/572/CH2/EX2.1/c2_1.sce
@@ -0,0 +1,40 @@
+//(2.1) A gas in a piston–cylinder assembly undergoes an expansion process for which the relationship between pressure and volume is given by p*(v^n) = constant.The initial pressure is 3 bar, the initial volume is 0.1 m3, and the final volume is 0.2 m3. Determine the work for the process,in kJ, if (a) n=1.5, (b) n=1.0,and (c) n=0.
+
+//solution
+
+// variable initialization
+p1 = 3*(10^5) // initial pressure of gas in pascal
+v1 = .1 //initial volumme of gas in meter^3
+v2 = .2 //final volume of gas in meter^3
+
+//part (a) i.e. n=1.5
+funcprot(0);
+function [constant] = f1(n)
+ constant = p1*(v1^n); //p*(v^n) = constant
+endfunction;
+
+function [p] = f2(v,n)
+ p = f1(n)/(v^n); //expressing pressure as function of volume
+endfunction;
+
+function [work1] = f3(n)
+ work1 = intg(v1,v2,f2); //integrating pdv from initial to final volume
+endfunction;
+
+w1 = f3(1.5)/1000; // divided by 1000 to convert to KJ
+disp(w1,"the work done for n=1.5 in KJ is");
+
+//part(b) i.e. n = 1
+
+w2 = f3(1)/1000;
+disp(w2,"the work done for n=1 in KJ is");
+
+//part(c) i.e. n=0
+
+w3 = f3(0)/1000;
+disp(w3,"the work done for n=0 in KJ is");
+
+
+
+
+
diff --git a/572/CH2/EX2.2/c2_2.sce b/572/CH2/EX2.2/c2_2.sce
new file mode 100755
index 000000000..128f5ddae
--- /dev/null
+++ b/572/CH2/EX2.2/c2_2.sce
@@ -0,0 +1,33 @@
+// (2.2) Four kilograms of a certain gas is contained within a piston–cylinder assembly. The gas undergoes a process for which the pressure–volume relationship is p*(v^1.5) = constant. The initial pressure is 3 bar, the initial volume is 0.1 m3, and the final volume is 0.2 m3. The change in specific internal energy of the gas in the process is u2-u1 =- 4.6 kJ/kg. There are no significant changes in kinetic or potential energy. Determine the net heat transfer for the process, in kJ.
+
+// solution
+
+//variable initialization
+p1 = 3*(10^5) // initial pressure in pascal
+v1 = .1 // initial volume in m3
+v2 = .2 // initial volume in m3
+m = 4 //mass of the gas in kg
+deltau = -4.6 // change in specific internal energy in KJ/Kg
+
+
+funcprot(0);
+function [constant] = f1(n)
+ constant = p1*(v1^n); //p*(v^n) = constant
+endfunction;
+
+function [p] = f2(v,n)
+ p = f1(n)/(v^n); //expressing pressure as function of volume
+endfunction;
+
+function [work] = f3(n)
+ work = intg(v1,v2,f2); //integrating pdv from initial to final volume
+endfunction;
+
+w = f3(1.5)/1000; // divided by 1000 to convert to KJ
+
+deltaU = m*deltau; // change in internal energy in KJ
+Q = deltaU + w; // neglecting kinetic and potential energy changes
+
+disp(Q,"net heat transfer for the process in KJ")
+
+
diff --git a/572/CH2/EX2.3/c2_3.sce b/572/CH2/EX2.3/c2_3.sce
new file mode 100755
index 000000000..e70302351
--- /dev/null
+++ b/572/CH2/EX2.3/c2_3.sce
@@ -0,0 +1,46 @@
+//(2.3) Air is contained in a vertical piston–cylinder assembly fitted with an electrical resistor. The atmosphere exerts a pressure of 1 bar on the top of the piston, which has a mass of 45 kg and a face area of .09 m2. Electric current passes through the resistor, and the volume of the air slowly increases by .045 m3 while its pressure remains constant. The mass of the air is .27 kg, and its specific internal energy increases by 42 kJ/kg. The air and piston are at rest initially and finally. The piston–cylinder material is a ceramic composite and thus a good insulator. Friction between the piston and cylinder wall canbe ignored, and the local acceleration of gravity is g = 9.81 m/s2. Determine the heat transfer from the resistor to the air, in kJ, for a system consisting of (a) the air alone, (b) the air and the piston.
+
+//solution
+
+// variable initialization
+patm = 10^5 // atmospheric pressure in pascal.
+mp = 45 // mass of piston in Kg
+A = .09 // face area of piston in m2
+deltaV = .045 // increment of the volume of air in m3
+m = .27 // mass of air in kg
+deltau = 42 // specific internal energy increase of air in kJ/kg
+g = 9.81 // local acceleration of gravity
+
+
+//part (a) i.e. air is system
+
+p = (mp*g)/A + patm ; //constant pressure of air obtained from equilibrium of piston
+w = (p*deltaV)/1000; //work done in KJ
+deltaU = m*deltau; // internal energy change of air in KJ
+Q = w + deltaU; // applying first with air as system
+
+printf('the answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air alone as system is:\n\n\tQ=%f',Q);
+
+// the answer given in book is incorrect. deltaU is incorrect in book.
+
+//part(b) i.e. (air+piston) is system
+
+wd = (patm*deltaV)/1000; // work done in KJ
+deltaz = (deltaV)/A; // change in elevation of piston
+deltaPE = (mp*g*deltaz)/1000; // change in potential energy of piston in KJ
+Qt = wd + deltaPE + deltaU; // applying first law with air plus piston as system
+
+printf('\n\nthe answer given in book is incorrect.They have miscalculated deltaU.The correct heat transfer from resistor to air in KJ for air + piston as system is:\n\n\tQt=%f',Qt);
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/572/CH2/EX2.4/c2_4.sce b/572/CH2/EX2.4/c2_4.sce
new file mode 100755
index 000000000..2b260c3a1
--- /dev/null
+++ b/572/CH2/EX2.4/c2_4.sce
@@ -0,0 +1,19 @@
+//(2.4) During steady-state operation, a gearbox receives 60 kW through the input shaft and delivers power through the output shaft.For the gearbox as the system, the rate of energy transfer by convection is Qdot = -hA(tb-tf) where h = 0.171 kW/m2.k is the heat transfer coefficient, A=  1.0 m2 is the outer surface area of the gearbox, Tb = 300k is the temperature at the outer surface, and Tf  293k is the temperature of the surrounding air away from the immediate vicinity of the gearbox. For the gearbox, evaluate the heat transfer rate and the power delivered through the output shaft, each in kW.
+
+//solution
+
+// initializing variables
+w1dot = -60 // input work rate in KW
+h = .171 // heat transfer coefficient,unit in KW/m2 .K
+A = 1 // outer surface area of gearbox, unit in m2
+Tb = 300 // outer surface temperature in kelvin
+Tf = 293 // temperature of the sorrounding
+
+Qdot = -h*A*(Tb-Tf); // rate of energy transfer by heat
+wdot = Qdot; // steady state energy equation
+w2dot = wdot-w1dot;
+
+printf('the heat transfer rate in KW is:\n\tQdot = %f',Qdot);
+printf('\n\nthe power delivered through output shaft in KW is:\n\tw2dot = %f',w2dot);
+
+
diff --git a/572/CH2/EX2.5/c2_5.sce b/572/CH2/EX2.5/c2_5.sce
new file mode 100755
index 000000000..58e0cb757
--- /dev/null
+++ b/572/CH2/EX2.5/c2_5.sce
@@ -0,0 +1,15 @@
+//(2.5) A silicon chip measuring 5 mm on a side and 1 mm in thickness is embedded in a ceramic substrate. At steady state, the chip has an electrical power input of 0.225 W. The top surface of the chip is exposed to a coolant whose temperature is 20 degree Celcius . The heat transfer coefficient for convection between the chip and the coolant is 150 W/m2 K. If heat transfer by conduction between the chip and the substrate is negligible, determine the surface temperature of the chip, in degree Celcius.
+
+// solution
+
+//variable initialization
+
+s=5*(10^-3); //measurement on a side in meter
+wdot = -.225 //power input in watt
+Tf = 293 //coolant temprature in kelvin
+h = 150 //heat transfer coefficient in w/m2 k
+
+A = s^2; //surface area
+Tb = ((-wdot/(h*A)) + Tf - 273) ; //surface temperature in degree
+
+printf('the surface temperature of the chip in degree celcius is:\n\t Tb = %f',Tb); \ No newline at end of file
diff --git a/572/CH2/EX2.6/2_6fig1.pdf b/572/CH2/EX2.6/2_6fig1.pdf
new file mode 100755
index 000000000..3e51afc37
--- /dev/null
+++ b/572/CH2/EX2.6/2_6fig1.pdf
Binary files differ
diff --git a/572/CH2/EX2.6/2_6fig2.pdf b/572/CH2/EX2.6/2_6fig2.pdf
new file mode 100755
index 000000000..7c5716eb5
--- /dev/null
+++ b/572/CH2/EX2.6/2_6fig2.pdf
Binary files differ
diff --git a/572/CH2/EX2.6/c2_6.sce b/572/CH2/EX2.6/c2_6.sce
new file mode 100755
index 000000000..1975f11d8
--- /dev/null
+++ b/572/CH2/EX2.6/c2_6.sce
@@ -0,0 +1,38 @@
+//(2.6) The rate of heat transfer between a certain electric motor and its surroundings varies with time as Qdot = -.2[1-e^(-.05t)] where t is in seconds and Qdot in KW.The shaft of the motor rotates at a constant speed of omega = 100 rad/s and applies a constant torque of tau = 18 N.m to an external load. The motor draws a constant electric power input equal to 2.0 kW. For the motor, plot Qdot and Wdot,each in kW, and the change in energy deltaE in kJ, as functions of time from t =0 to t = 120s.
+
+//solution
+
+//initializing variables
+omega = 100; // motor rotation speed in rad/s
+tau = 18; //torque applied by shaft in N.m
+Welecdot = -2; // electric power input in KW
+
+funcprot(0);
+Wshaftdot = (tau*omega)/1000; //shaft work rate in KW
+Wdot = Welecdot + Wshaftdot; //net work rate in KW
+
+function [Qdot]=f(t)
+ Qdot = (-.2)* [1-%e^(-.05*t)];
+endfunction
+
+function [Edot]=f1(t) //function for rate of change of energy
+ Edot =(-.2)* [1-%e^(-.05*t)] - Wdot ;
+endfunction;
+
+function [deltaE] =f2(t) //function for change in energy
+ deltaE = intg(0,t,f1);
+endfunction;
+
+t = linspace(0,120,100);
+for i = 1:100
+ Qdt(1,i)= f((120/99)*(i-1));
+ Wdt(1,i)= Wdot;
+ dltaE(1,i)= f2((120/99)*(i-1));
+end
+plot2d(t,Qdt,rect=[0,-.25,120,0]);
+plot2d(t,Wdt,style=5,rect=[0,-.25,120,0]);
+xtitle("","time,s","Qdot,Wdot,KW");
+legend("Qdot","Wdot");
+xset('window',1);
+plot2d(t,dltaE);
+xtitle("deltaE versus time","Time, s","deltaE, KJ");