diff options
Diffstat (limited to '167')
167 files changed, 3258 insertions, 0 deletions
diff --git a/167/CH1/EX1.1/ex1.sce b/167/CH1/EX1.1/ex1.sce new file mode 100755 index 000000000..b91a8c9ca --- /dev/null +++ b/167/CH1/EX1.1/ex1.sce @@ -0,0 +1,8 @@ +//ques1
+//obtaining formulas for from unit considerations
+clear
+clc
+d=850;//density m^3/kg
+V=2;//volume m^3
+m=d*V;//mass Kg
+printf("Mass of the sample m =%.0f Kg",m);
diff --git a/167/CH1/EX1.10/ex10.sce b/167/CH1/EX1.10/ex10.sce new file mode 100755 index 000000000..26620db2e --- /dev/null +++ b/167/CH1/EX1.10/ex10.sce @@ -0,0 +1,11 @@ +//ques10
+//Hydrostatic Pressure in a Solar Pond with Variable Density
+clear
+clc
+d=1040;//density of pond in Kg/m^3
+g=9.81;//acc due to gravity in m/s^2
+h1=0.8;//height of liquid in metre
+H=4;//height of liquid of variable density
+P1=d*g*h1/1000;//divided by 1000 to convert it into kPa
+P=P1+integrate('d*g*sqrt(1+tan(%pi/4*z/H)^2)','z',0,4)/1000;
+printf('Pressure at the bottom of the gradient zone = %.1f kPa',P);
\ No newline at end of file diff --git a/167/CH1/EX1.12/ex12.sce b/167/CH1/EX1.12/ex12.sce new file mode 100755 index 000000000..e5c21ab1d --- /dev/null +++ b/167/CH1/EX1.12/ex12.sce @@ -0,0 +1,19 @@ +//ques12
+//Analyzing a Multifluid Manometer with EES
+clc
+g=9.81;//acc due to gravity in m/s^2
+Patm=85600;//Atmospheric pressure in Pa
+h1=0.1;//height of water in metre
+h2=0.2;//height of oil in metre
+h3=0.35;//height of mercury in metre
+dwater=1000;//density of water in Kg/m^3
+doil=850;//density of oil in Kg/m^3
+dmercury=13600;//density of mercury in Kg/m^3
+P1=Patm-(dwater*g*h1+doil*g*h2-dmercury*g*h3);//in Pa
+printf('Pressure at point 1 = %.0f Pa',P1);
+//Now to find h3 if mercury is replaced by another oil
+dmercury=1030;//Density of new mercury in Kg/m^3
+h3=(P1-Patm+dwater*g*h1+doil*g*h2)/(g*dmercury);//in metre
+printf("\n New height h3 = %.2f metres",h3);
+
+
diff --git a/167/CH1/EX1.5/ex5.sce b/167/CH1/EX1.5/ex5.sce new file mode 100755 index 000000000..77d7ccb24 --- /dev/null +++ b/167/CH1/EX1.5/ex5.sce @@ -0,0 +1,8 @@ +//ques5
+//Absolute Pressure of a Vacuum Chamber
+clc
+Patm=14.5;//Atmospheric Pressure in psi
+Pvac=5.8;//vaccum Pressure in psi
+Pabs=Patm-Pvac;//Absolute Pressure in psi
+printf("Absolute Pressure=Atmospheric Pressure - Vaccum Pressure=%0.1f psi",Pabs);
+
diff --git a/167/CH1/EX1.6/ex6.sce b/167/CH1/EX1.6/ex6.sce new file mode 100755 index 000000000..5260a62f7 --- /dev/null +++ b/167/CH1/EX1.6/ex6.sce @@ -0,0 +1,10 @@ +//ques6
+//Measuring Pressure with nanometer
+clc
+Patm=96;//Atmospheric Pressure in kPa
+d=850;//density in Kg/m^3
+g=9.81;//gravitational accelaration
+h=0.55;//hieght in metre
+P=Patm+d*g*h/1000; //Pressure in kPa
+printf("Presure=Patm+ d*g*h=%.1f kPa",P);
+
diff --git a/167/CH1/EX1.7/ex7.sce b/167/CH1/EX1.7/ex7.sce new file mode 100755 index 000000000..a50228ce6 --- /dev/null +++ b/167/CH1/EX1.7/ex7.sce @@ -0,0 +1,16 @@ +//ques7
+//Measuring pressure with multifluid manometer
+clear
+clc
+Patm=85.6; //in kPa
+dwater=1000;//density of water in Kg/m^3
+dmercury=13600;//density of mercury in Kg/m^3
+doil=850;//density of oil in Kg/m^3
+g=9.81;//acc due to gravity in m/s^2
+h1=0.1;//height of water in metre
+h2=0.2;//height of oil in metre
+h3=0.35;//hieght of mercury in metre
+P1=Patm+g*(dmercury*h3-dwater*h1-doil*h2)/1000;
+printf("Pressure P1 = %.0f kPa",P1);
+
+
diff --git a/167/CH1/EX1.8/ex8.sce b/167/CH1/EX1.8/ex8.sce new file mode 100755 index 000000000..700a70923 --- /dev/null +++ b/167/CH1/EX1.8/ex8.sce @@ -0,0 +1,9 @@ +//ques8
+//Measuring Atmospheric Pressure with barometer
+clear
+clc
+g=9.81;//acc due to gravity in m/s^2
+h=0.74;//height in metre
+d=13570;//density in Kg/m^3
+Patm=d*g*h/1000;//Atmospheric pressure in kPa
+printf("Atmospheric pressure from barometer is = %.1f kPa",Patm);
\ No newline at end of file diff --git a/167/CH1/EX1.9/ex9.sce b/167/CH1/EX1.9/ex9.sce new file mode 100755 index 000000000..9de4ee683 --- /dev/null +++ b/167/CH1/EX1.9/ex9.sce @@ -0,0 +1,11 @@ +//ques9
+//Effect of piston weight on Pressure of Cylinder
+clear
+clc
+Patm=0.97;//Atmospheric pressure in bar
+m=60;//mass in kg
+g=9.81;//acc due to gravity in m/s^2
+A=0.04;//area in m^2
+P=Patm+m*g/A/10^5;//net pressure after considering the effect in Bar
+//divided by 10^5 to convert it into bars
+printf("Pressure = %.2f Bar",P);
\ No newline at end of file diff --git a/167/CH10/EX10.2/ex2.sce b/167/CH10/EX10.2/ex2.sce new file mode 100755 index 000000000..af7efccf2 --- /dev/null +++ b/167/CH10/EX10.2/ex2.sce @@ -0,0 +1,22 @@ +//example 2
+//An Actual Steam Power Cycle
+clear
+clc
+V1=0.001009 //specific volume of steam in m3/kg
+P1=9 // pressure in state 1 in kPa
+P2=16000 //pressure in state 2 final pressure in kPa
+np=0.85 //isentropic efficiency of pump
+nt=0.87 //isentropic efficiency of turbine
+wpumpin=V1*(P2-P1)/np //pump work input in kJ/kg
+h4=3647.6 //specific enthalpy in state 4 in kJ/kg
+h3=160.12 //specific enthalpy in state 3 in kJ/kg
+qin=h4-h3 //boiler heat input in kJ/kg
+h5=3583.1 //specific enthalpy in state 3 in kJ/kg
+h6=2115.32 //specific enthalpy in state 3 in kJ/kg
+wturbout=nt*(h5-h6) //work output of turbine in kJ/kg
+wnet=wturbout-wpumpin //net work done in kJ/kg
+n=wnet/qin//themal efficiency of the cycle
+m=15 //mass flow rate in kg/s
+Wnet=m*wnet //power produced by the power plant in kW
+printf("\n Hence, the thermal efficiency of the cycle is = %.3f . \n",n);
+printf("\n Hence, net power output of the plant is = %.1f MW. \n",Wnet/1000);
\ No newline at end of file diff --git a/167/CH10/EX10.3/ex3.sce b/167/CH10/EX10.3/ex3.sce new file mode 100755 index 000000000..545749d1e --- /dev/null +++ b/167/CH10/EX10.3/ex3.sce @@ -0,0 +1,42 @@ +//example 3
+//Effect of Boiler Pressure and Temperature on Efficiency
+clear
+clc
+P1=10 //pressure of steam in state 1 in kPa
+P2=3000 //pressure of steam in state 2 in kPa
+P3=3000 //pressure of steam in state 3 in kPa
+P4=10 //pressure of steam in state 4 in kPa
+T3=350 //temp. of state in state 3 in celsius
+h3=3116.1 //specific heat enthalpy in state 3 in kJ/kg
+s3=6.7450 //specific entropy in state 3 in kJ/kg-K
+h1=191.81 //specific heat enthalpy in state 1 in kJ>kg
+v1=0.00101 //specific volume in state 1 in m3>kg
+wpumpin=3.02 //work done by the pump in kJ/kg
+h2=h1+wpumpin //specific heat enthalpy in state 2 in kJ/kg
+s3=6.7450 //specific entropy in state 3 in kJ/kg-K
+s4=s3 //specific entropy in state 4
+sf=0.6492 //in kJ/kg-K
+sfg=7.4996 //in kJ/kg-K
+x4=(s4-sf)/sfg //quality of steam in state 4
+hf=191.81 // kJ/kg
+hfg=2392.1 //kJ/kg
+h4=hf+x4*hfg //specific heat enthalpy in state 4 in kJ/kg
+qin=h3-h2 //heat coming in in kJ/kg
+qout=h4-h1 //heat going out in kJ/kg
+n1=1-qout/qin //thermal efficiency of power plant
+disp('the thermal efficiency if steam is superheated to 600°C instead of 350°C')
+h32=3682.8 //Specific enthalpy in state 3 in kJ/kg
+h42=2380.3 //Specific enthalpy in state 3 in kJ/kg
+qin2=h32-h2 //heat coming in in kJ/kg
+qout2=h42-h1//heat going out in kJ/kg
+n2=1-qout2/qin2 //thermal efficiency under given conditions
+disp('the thermal efficiency if the boiler pressure is raised to 15 MPa while the turbine inlet temperature is maintained at 600°C')
+h23=206.95 //Specific enthalpy in state 2 in kJ/kg
+h43=2115.3 //Specific enthalpy in state 4 in kJ/kg
+h33=3583.1 //Specific enthalpy in state 3 in kJ/kg
+qin3=h33-h23 //heat coming in in kJ/kg
+qout3=h43-h1 //heat going out in kJ/kg
+n3=1-(qout3/qin3) //thermal efficiency under given conditions
+printf("\n Hence, the thermal efficiency of this power plant if the steam is uperheated to 600 C is = %.3f. \n",n1);
+printf("\n Hence, the thermal efficiency of this power plant if the steam is uperheated to 350 C is = %.3f. \n",n2);
+printf("\n Hence, the thermal efficiency if the boiler pressure is raised to 15 MPa while the turbine inlet temperature is maintained at 600°C. is = %.3f. \n",n3);
\ No newline at end of file diff --git a/167/CH10/EX10.4/ex4.sce b/167/CH10/EX10.4/ex4.sce new file mode 100755 index 000000000..69586c149 --- /dev/null +++ b/167/CH10/EX10.4/ex4.sce @@ -0,0 +1,37 @@ +//example 4
+//The Ideal Reheat Rankine Cycle
+clear
+clc
+disp('the pump and the turbines are isentropic,there are no pressure drops in the boiler and condenser, and steam leaves the condenser and enters the pump as saturated liquid at the condenser pressure.')
+P6=10 //pressure at state 6 in kPa
+x6=0.896 //quality of steam in state 6
+sf=0.6492 // in kJ/kg-K
+sfg=7.4996 //in kJ/kg-K
+hf=191.81 //in kJ/kg
+hfg=2392.1 //in kJ/kg
+h6=hf+x6*hfg //specific heat enthalpy in state 6 in kJ/kg
+s6=sf+x6*sfg //specific entropy at state 6 in kJ/kg-K
+T5=600 // temperature in state 5 in Celsius
+s5=s6 //specific entropy in state 5
+disp(' At state 5, T5=600C,s5=s6.Hence,')
+P5=4.0 //pressure at state 5 in MPa
+h5=3674.9 //spacific heat enthalpy at state 5 in kJ/kg
+P1=10 //pressure at state 1 in kPa
+h1=191.81 //specific heat enthalpy at state 1 in kJ/kg
+v1=0.00101 //specific volume at state 1 in m3/kg
+P2=15000 //pressure at state 2 in kPa
+wpumpin=v1*(P2-P1) //work done by pump in kJ/kg
+h2=h1+wpumpin //enthalpy in state 2 in kJ/kg
+P3=15000 //pressure in state 3 in kPa
+T3=600//temperature in state 3 in °C
+h3=3583.1 //specific heat enthalpy in state 3 in kJ/kg
+s3=6.6796 //specific entropy in state 3 in kJ/kg-K
+P4=4000 //pressure in state 4 in kPa
+s4=s3 //specific entropy in state 4
+h4=3155.0 //specific heat enthalpy in state 4 in kJ/kg
+T4=375.5 //temperature in state 4 in °C
+qin=(h3-h2)+(h5-h4) //heat coming in in kJ/kg
+qout=h6-h1 //heat going out in kJ/kg
+n=1-qout/qin //thermal efficiency of the cycle
+printf("\n Hence, the pressure at which the steam should be reheated is = %.1f MPa. \n",P5);
+printf("\n Hence, the the thermal efficiency of the cycle is = %.1f. \n",n*100);
\ No newline at end of file diff --git a/167/CH10/EX10.5/ex5.sce b/167/CH10/EX10.5/ex5.sce new file mode 100755 index 000000000..05f0901c3 --- /dev/null +++ b/167/CH10/EX10.5/ex5.sce @@ -0,0 +1,38 @@ +//example5
+//The Ideal Regenerative Rankine Cycle
+clear
+clc
+P1=10 //Pressure in state 1 in kPa
+h1=191.81 //Specific enthelpy in state 1 in kJ/kg
+v1=0.00101 //Specific volume in state 1 in m3/kg
+P2=1200 //Pressure in state 2 in kPa
+wpumpin=v1*(P2-P1) //work done by the pump 1 in kJ/kg
+h2=h1+wpumpin //Specific Enthalpy in state 2 in kJ/kg
+v3=0.001138 //Specific volume in state 3 in m3/kg
+h3=798.33 //Specific enthalpy in kJ/kg
+P3=1200 //Pressure in state 3 in kPa
+P4=15000 //Pressure in state 4 in kPa
+wpumpin2=v3*(P4-P3) //work done by pump 2 in kJ/kg
+h4=h3+wpumpin2 //Specific ehnthalpy in state 4 in kJ/kg
+P5=15 //Pressure in state 5 in MPa
+T5=600 //Temp. in state 5 in °C
+P6=1200 //Pressure in state 6 in kPa
+h5=3583.1 //Specific enthalpy in state 5 in kJ/kg
+s5=6.6796 //Specific entropy in state 5 in kJ/kg-K
+h6=2860.2 //Specific enthalpy in state 6 in kJ/kg
+T6=218.4//Temp. in state 6 in °C
+sf=0.6492 //in kJ/kg-K
+sfg=7.4996 //in kJ/kg-K
+s5=6.6796 //Specific entropy in state 5 in kJ/kg-K
+s6=s5 //Specific entropy in state 6
+s7=s5 //Specific entropy in state 7
+x7=(s7-sf)/sfg //quality of steam in state 7
+hf=191.81 //in kJ/kg
+hfg=2392.1 //in kJ/kg
+h7=hf+x7*hfg //Specific enthalpy in state 7 in kJ/kg
+y=(h3-h2)/(h6-h2) //fraction of steam extracted from the turbine
+qin=h5-h4 //heat coming in in kJ/kg
+qout=(h7-h1)*(1-y) //heat going out in kJ/kg
+n=1-qout/qin //Thermal efficiency of the cycle
+printf("\n Hence, the fraction of steam extracted from the turbine is = %.4f. \n",y);
+printf("\n and thermal efficiency of the cycle is = %.3f. \n",n);
\ No newline at end of file diff --git a/167/CH10/EX10.6/ex6.sce b/167/CH10/EX10.6/ex6.sce new file mode 100755 index 000000000..eecc9d597 --- /dev/null +++ b/167/CH10/EX10.6/ex6.sce @@ -0,0 +1,28 @@ +//example 6
+//The Ideal Reheat–Regenerative Rankine Cycle
+clear
+clc
+h1=191.81 //specific heat enthalpy for state 1 in kJ/kg
+h2=192.30 //specific heat enthalpy for state 2 in kJ/kg
+h3=640.09 //specific heat enthalpy for state 3 in kJ/kg
+h4=643.92 //specific heat enthalpy for state 4 in kJ/kg
+h5=1087.4 //specific heat enthalpy for state 5 in kJ/kg
+h6=1087.4 //specific heat enthalpy for state 6 in kJ/kg
+h7=1101.2 //specific heat enthalpy for state 7 in kJ/kg
+h8=1089.8 //specific heat enthalpy for state 8 in kJ/kg
+h9=3583.1//specific heat enthalpy for state 9 in kJ/kg
+h10=3155.0 //specific heat enthalpy for state 10 in kJ/kg
+h11=3674.9 //specific heat enthalpy for state 11 in kJ/kg
+h12=3014.8 //specific heat enthalpy for state 12 in kJ/kg
+h13=2335.7 //specific heat enthalpy for state 13 in kJ/kg
+wpumpin1=0.49 //work done by pump 1 in kJ/kg
+wpumpin2=3.83 //work done by pump 2 in kJ/kg
+wpumpin3=13.77 //work done by pump 3 in kJ/kg
+y=(h5-h4)/(h5-h4+h10-h6) //fraction of steam extracted
+z=(1-y)*(h3-h2)/(h12-h2)
+h8=(1-y)*h5+y*h7 //specific heat enthalpy for state 8 in kJ/kg
+qin=(h9-h8)+(1-y)*(h11-h10) //heat coming in in kJ/kg
+qout=(1-y-z)*(h13-h1) //heat going out in kJ/kg
+n=1-qout/qin //thermal efficiency of cycle
+printf("\n Hence, the fraction of steam extracted from the turbine is = %.4f. \n",y);
+printf("\n and thermal efficiency of the cycle is = %.3f. \n",n);
\ No newline at end of file diff --git a/167/CH10/EX10.7/ex7.sce b/167/CH10/EX10.7/ex7.sce new file mode 100755 index 000000000..557f30a54 --- /dev/null +++ b/167/CH10/EX10.7/ex7.sce @@ -0,0 +1,24 @@ +//example 7
+//Second-Law Analysis of an Ideal Rankine Cycle
+clear
+clc
+xdest12=0 //irreversibility during the process 1 to 2 in kJ/kg
+xdest34=0 //irreversibility during the process 3 to 4 in kJ/kg
+s2=1.2132 //specific entropy for state 2 in kJ/kg-K
+s4=6.7450 //specific entropy for state 4 in kJ/kg-K
+s1=s2 //specific entropy for state 1 in kJ/kg-K
+s3=s4 //specific entropy for state 3 in kJ/kg-K
+qin23=2728.6 //heat input for the process 2 to 3 in kJ/kg
+Tsource=1600 //temperature of furnaace in K
+To=290 //temp. of cooling medium in K
+xdest23=To*(s3-s2-qin23/Tsource) //irreversibility during the process 2 to 3 in kJ/kg
+Tsink=To //temperature of sink
+qout41=2018.6 //in kJ/kg
+xdest41=To*(s1-s4+qout41/Tsink) //irreversibility during the process 4 to 1 in kJ/kg
+xdestcycle=xdest12+xdest23+xdest34+xdest41 //irreversibility of cycle
+ho=71.355 //in kJ/kg
+so=0.2533 //in kJ/kg-K
+h4=2403.0 //in kJ/kg
+e4=(h4-ho)-To*(s4-so)//exergy of steam leaving the turbine in kJ/kg
+printf("\n Hence, the exergy destruction associated with the rankine cycle is = %.0f kJ/kg. \n",xdestcycle);
+printf("\n and exergy of steam leaving the turbine is = %.0f. \n",e4);
\ No newline at end of file diff --git a/167/CH10/EX10.8/ex8.sce b/167/CH10/EX10.8/ex8.sce new file mode 100755 index 000000000..991e55183 --- /dev/null +++ b/167/CH10/EX10.8/ex8.sce @@ -0,0 +1,47 @@ +//example 8
+//An Ideal Cogeneration Plant
+clear
+clc
+v8=0.001005 //specific volume for state 3 in m3/kg
+P9=7000 //pressure at state9 in kPa
+P8=5//pressure at state 8 in kPa
+wpumpin1=v8*(P9-P8) //work done by pump 1 in kJ/kg
+v7=0.001093 //specific volume for state 7 in m3>kg
+P10=7000 //pressure for state 10 in kPa
+P7=500//pressure for state 7 in kPa
+wpumpin2=v7*(P10-P7) //work done by pump 2 in kJ/kg
+h4=3411.4 //specific enthalpy for state 4 in kJ/kg
+h3=h4 //specific enthalpy for state 3
+h2=h4 //specific enthalpy for state 2
+h1=h4 //specific enthalpy for state 1
+h5=2739.3 //specific enthalpy for state 5 in kJ/kg
+h6=2073.0 //specific enthalpy for state 6 in kJ/kg
+h7=640.09 //specific enthalpy for state 7 in kJ/kg
+h8=137.75 //specific enthalpy for state 8 in kJ/kg
+h9=h8+wpumpin1 //specific enthalpy for state 9 in kJ/kg
+h10=h7+wpumpin2 //specific enthalpy for state 10 in kJ/kg
+disp('Since all the steam the boiler is throttled and sent to the process heater and none is sent to the turbine, therefore')
+M1=15//mass flow rate for steam in kg/s
+M4=15// in kg/s
+M7=15//in kg/s
+M=M1
+M3=0
+M5=0
+M6=0
+Qpmax=M1*(h4-h7) //Maximum rate at which process heat can be supplied in kW
+Wturbout=M*(h3-h6) //Work done by turbine in kW
+Wpumpin=M*wpumpin2 //Work done by pump in kW
+Wnetout=Wturbout-Wpumpin //power produced in kW
+h11=144.78 //Specific enthalpy for state 11 when no heat is supplied
+Qin=M1*(h1-h11)
+Qp=0 //rate of supply of process heat in kW
+e=(Qp+Wnetout)/Qin //utilization factor
+disp('Now, calculating the rate of process heat supply when 10 percent of the steam is extracted before it enters the turbine and 70 percent of the steam is extracted from the turbine at 500 kPa for process heating')
+M4=0.1*15 //in kg/s
+M5=0.7*15 // in kg/s
+M7=M4+M5 //in kg/s
+Qpout=M4*h4+M5*h5-M7*h7 //rate of process heat supply in kW
+printf("\n Hence, the maximum rate at which process heat can be supplied is = %.0f kW. \n",Qpmax);
+printf("\n The power produced when no heat is supplied is = %.1f MW. \n",Wnetout/1000);
+printf("\n and utilization factor is = %.3f . \n",e);
+printf("\n the rate of process heat supply when 10 percent of the steam is extracted before it enters the turbine and 70 percent of the steam is extracted from the turbine at 500 kPa for process heating = %.1f MW. \n",Qpout/1000);
\ No newline at end of file diff --git a/167/CH10/EX10.9/ex9.sce b/167/CH10/EX10.9/ex9.sce new file mode 100755 index 000000000..c5825254b --- /dev/null +++ b/167/CH10/EX10.9/ex9.sce @@ -0,0 +1,18 @@ +//example 9
+//A Combined Gas–Steam Power Cycle
+clear
+clc
+h4=880.36 //specific enthalpy for state 4 in kJ/kg
+T4=853 //temperature for state 4 in K
+qin=790.58 //in kJ/kg
+wnet=210.41 //in kJ/kg
+h5=451.80 //specific enthalpy for state 5 in kJ/kg
+h2=144.78 //specific enthalpy for state 2 in kJ/kg
+h3=3411.4 //specific enthalpy for state 3 in kJ/kg
+wnetgas=210.41 //in kJ/kg
+wnetsteam=1331.4 //in kJ/kg
+y=(h4-h5)/(h3-h2) //ratio of mass folw rates of the steam and combustion gases
+wnet=wnetgas+y*wnetsteam //net work output of the cycle in kJ/kg
+n=wnet/qin //thermal efficiency of the combined cycle
+printf("\n Hence, the ratio of mass folw rates of the steam and combustion gases is = %.3f . \n",y);
+printf("\n Hence, the thermal efficiency of the cobined cycle is = %.3f . \n",n);
\ No newline at end of file diff --git a/167/CH11/EX11.2/ex2.sce b/167/CH11/EX11.2/ex2.sce new file mode 100755 index 000000000..0aa74bfeb --- /dev/null +++ b/167/CH11/EX11.2/ex2.sce @@ -0,0 +1,30 @@ +//ques2
+//The Actual Vapor-Compression Refrigeration Cycle
+clear
+clc
+//state 1
+P1=0.14;//Pressure in MPa
+T1=-10;//Temperature in C
+h1=246.36;//enthalpy of heat in kJ/kg
+//state 2
+P2=0.8;//Pressure in MPa
+T2=50;//Temperature in C
+h2=286.69;//Enthalpy of heat in kJ/kg
+//state 3
+P3=0.72;//Pressure in MPa
+T3=26;//Temperature in C
+h3=87.83;//Enthalpy in kJ/kg
+
+h4=h3;//throttling
+ms=0.05;//mass flow rate in kg/s
+Qls=ms*(h1-h4);//heat removal in kW
+Wins=ms*(h2-h1);//Power in kW
+printf('(a) Rate of heat removal = %.2f kW \n',Qls);
+printf(' Power = %.2f kW \n',Wins);
+
+//(b)The isentropic efficiency of the compressor is determined as
+h2s=284.21;
+nc=(h2s-h1)/(h2-h1);
+printf(' (b) Isentropic efficiency = %.3f \n',nc);
+COPr=Qls/Wins;
+printf(' (c) Coefficient of performance of the refrigerator = %.1f \n',COPr);
diff --git a/167/CH11/EX11.4/ex4.sce b/167/CH11/EX11.4/ex4.sce new file mode 100755 index 000000000..8c749b105 --- /dev/null +++ b/167/CH11/EX11.4/ex4.sce @@ -0,0 +1,23 @@ +//ques4
+//A Two-Stage Refrigeration Cycle with a Flash Chamber
+clear
+clc
+h6=95.47;//Enthalpy at state 6 in kJ/kg
+hf=55.16;//Enthalpy of lquid water in kJ/kg
+hfg=196.71;//difference in enthalpy of water and vapor in kJ/kg
+x6=(h6-hf)/hfg;
+printf('(a) Fraction of the refrigerant that evaporates = %.4f \n',x6);
+h1=239.16;//enthalpy at state 1 in kJ/kg
+h8=55.16;//Enthalpy at state 8 in kJ/kg
+Ql=(1-x6)*(h1-h8);//heat removal in kJ/kg
+printf(' (b) Amount of heat removed from refrigerant = %.1f kJ/kg \n',Ql);
+//The enthalpy at state 9 is determined from an energy balance on mixing chamber
+//Ein=Eout ie h9=x6*h3+(1-x6)*h2
+h3=251.88;//Enthalpy at state 3 n kJ/kg
+h2=255.93;//Enthalpy at state 2 n kJ/kg
+h9=x6*h3+(1-x6)*h2;//Enthalpy at state 9 n kJ/kg
+h4=274.48;//enthalpy at state 4 in kJ/kg
+Win=(1-x6)*(h2-h1)+1*(h4-h9);//work input in kJ/kg
+printf(' Work input = %.2f kJ/kg \n',Win);
+COPr=Ql/Win;
+printf(' (c) Coefficient of performance = %.2f ',COPr);
diff --git a/167/CH11/EX11.5/ex5.sce b/167/CH11/EX11.5/ex5.sce new file mode 100755 index 000000000..d398319cf --- /dev/null +++ b/167/CH11/EX11.5/ex5.sce @@ -0,0 +1,35 @@ +//ques5
+//The Simple Ideal Gas Refrigeration Cycle
+clear
+clc
+//(a) The maximum and minimum temperatures in the cycle are determined from the isentropic relations of ideal gases for the compression and expansion processes. From Table A–17E
+//state 1
+T1=460;//R
+h1=109.90;//Btu/lbm
+Pr1=0.7913;//reduced pressure
+r=4;
+//state 2
+Pr2=r*Pr1;//r=P2/P1=4
+//from table
+h2=163.5;//Btu/lbm
+T2=683;//R
+printf('(a) Temperature T2 = %.0f R \n',T2);
+//state 3
+T3=540;//R
+h3=129.06;//Btu/lbm from table
+Pr3=1.3860;//reduced pressure
+//state 4
+Pr4=1/r*Pr3;//1/r = P4/P3
+//from table
+h4=86.7;//Btu/lbm
+T4=363;//R
+printf(' Temperature T4 = %.0f R \n',T4);
+Ql=h1-h4;//Btu/lbm
+Wturbout=h3-h4;//work output by turbine in kJ/kg
+Wcompin=h2-h1;//work input by compressor in kJ/kg
+Wnetin=Wcompin-Wturbout;//net work in kJ/kg
+COPr=Ql/Wnetin;
+printf(' (b) Coefficient of Performance = %.2f \n',COPr);
+ms=0.1;//mass flow in lbm/s
+Qrefs=ms*Ql;
+printf(' (c) Rate of refrigeration = %.2f Bu/sec \n',Qrefs);
\ No newline at end of file diff --git a/167/CH11/EX11.6/ex6.sce b/167/CH11/EX11.6/ex6.sce new file mode 100755 index 000000000..27730e972 --- /dev/null +++ b/167/CH11/EX11.6/ex6.sce @@ -0,0 +1,18 @@ +//ex6
+//Cooling of a Canned Drink by a Thermoelectric Refrigerator
+clear
+clc
+d=1;//density in kg/L
+V=0.350;//volume in L
+m=d*V;//mass in Kg
+c=4.18;//specific heat in kJ/kg.C
+T2=20;//Temperature in C
+T1=4;//Temperature in C
+Qcooling=m*c*(T2-T1);//heat of cooling in kJ
+
+t=30*60;//sec
+Qcoolings=Qcooling/t;//rate of cooling in kW
+COPr=0.10;
+Wins=Qcoolings/COPr;
+printf('Power = %.0f W',Wins*1000);
+
diff --git a/167/CH11/EX17.10/ex10.sce b/167/CH11/EX17.10/ex10.sce new file mode 100755 index 000000000..dd8eeb247 --- /dev/null +++ b/167/CH11/EX17.10/ex10.sce @@ -0,0 +1,7 @@ +//ques10
+//Estimation of the Mach Number from Mach Lines
+clear
+clc
+u=19;//angle of mach lines in degree
+Ma1=1/sin(u/180*%pi);
+printf('Mach number = %.2f ',Ma1);
diff --git a/167/CH12/EX12.1/ex1.sce b/167/CH12/EX12.1/ex1.sce new file mode 100755 index 000000000..bb175f548 --- /dev/null +++ b/167/CH12/EX12.1/ex1.sce @@ -0,0 +1,10 @@ +//example 1
+//Approximating Differential Quantities by Differences
+clear
+clc
+h305=305.22 //Specific Enthalpy at 305 K in kJ/kg
+h295=295.17 //Specific Enthalpy at 205 K in kJ/kg
+dh=h305-h295 //Chnage in Specific Enthalpy
+dT=305-295 //Change in Temp. in kelvins
+cp=dh/dT //Specific heat of air at 300K in kJ/kg-K
+printf("\n Hence, the specific heat of air at 300 K is = %.3f kJ/kg-K. \n",cp);
\ No newline at end of file diff --git a/167/CH12/EX12.11/ex11.sce b/167/CH12/EX12.11/ex11.sce new file mode 100755 index 000000000..d451fee2d --- /dev/null +++ b/167/CH12/EX12.11/ex11.sce @@ -0,0 +1,31 @@ +//example 11
+//dh and ds of Oxygen at High Pressures
+clear
+clc
+T1=220 //Initial Temp. in K
+P1=5 //Initial Pressure in MPa
+T2=300 //Final Temp.in K
+P2=10// Final Pressure in MPa
+h2ideal=8736//in kJ/mol
+h1ideal=6404 //in kJ/mol
+Ru=8.314 //Universal Gas constant in kJ/kmol-K
+s2o=205.213 //in kJ/kmol-K
+s1o=196.1712 //in kJ/kmol-K
+Tcr=154.8 //Critical Temp. in K
+Pcr=5.08 //Critical Pressure in MPa
+Tr1=T1/Tcr //Reduced initial temp.
+Pr1=P1/Pcr //Reduced initial pressure
+Tr2=T2/Tcr//Reduced final Temp.
+Pr2=P2/Pcr //Reduced Final Pressure
+Zh1=0.53
+Zs1=0.25
+Zh2=0.48
+Zs2=0.20
+dhi=h2ideal-h1ideal// Enthalpy change by assuming ideal gas behaviour
+dhn=dhi-Ru*Tcr*(Zh2-Zh1) //Enthalpy change by accounting for deviation from ideal gas behaviour
+dsi=s2o-s1o-Ru*log(P2/P1)// Entropy change by assuming ideal gas behaviour
+dsn=dsi-Ru*(Zs2-Zs1)//Entropy change by accounting for deviation from ideal gas behaviour
+printf(" Hence, by assuming ideal gas behaviour, enthalpy change is = %.0f kJ/kmol ",dhi);
+printf("and entropy change is = %.2f kJ/kmol-K. ",dsi);
+printf("\n By accounting for deviation from ideal gas behaviour, enthalpy change is=%.0f kJ/kmol ",dhn);
+printf("and entropy change is = %.2f kJ/kmol-K. \n",dsn);
\ No newline at end of file diff --git a/167/CH12/EX12.2/ex2.sce b/167/CH12/EX12.2/ex2.sce new file mode 100755 index 000000000..5157361d7 --- /dev/null +++ b/167/CH12/EX12.2/ex2.sce @@ -0,0 +1,11 @@ +//example 2
+//Total Differential versus Partial Differential
+clear
+clc
+R=0.287 //Universal gas constant kPa-m3/kg-K
+v=(0.86+0.87)/2 //average value m^3/kg
+T=(300+302)/2 //average temp. in kelvins
+dT=302-300 //change in tep. in K
+dv=0.87-0.86 //change in volume in m^3/kg
+dP=R*dT/v-R*T*dv/v^2 //Change in the pressure in kPa
+printf("\n Hence, the change in the pressure of air is = %.3f kPa. \n",dP);
\ No newline at end of file diff --git a/167/CH12/EX12.5/ex5.sce b/167/CH12/EX12.5/ex5.sce new file mode 100755 index 000000000..83aabc92a --- /dev/null +++ b/167/CH12/EX12.5/ex5.sce @@ -0,0 +1,14 @@ +//example 5
+//Evaluating the hfg of a Substance from the P-v-T Data
+clear
+clc
+vg=0.035969 //in m^3/kg
+vf=0.0008161 //in m^3/kg
+vfg=vg-vf //in m^3/kg at 20°C
+dT=24-16 //change in Temp. in C
+Psat1=646.18 //saturation presssure at 24 C in kPa
+Psat2=504.58 //saturation pressure at 16C in kPa
+dP=Psat1-Psat2 //Difference between saturation pressures in kPa
+T=293.15 //Difference between temp. in K
+hfg=T*vfg*dP/dT //Enthalpy of vaporization in kJ/kg
+printf("\n Hence, the enthalpy of vaporization of refrigerant 134-a is = %.2f kJ/kg. \n",hfg);
\ No newline at end of file diff --git a/167/CH12/EX12.6/ex6.sce b/167/CH12/EX12.6/ex6.sce new file mode 100755 index 000000000..eb7296b91 --- /dev/null +++ b/167/CH12/EX12.6/ex6.sce @@ -0,0 +1,11 @@ +// example 6
+//Extrapolating Tabular Data with the Clapeyron Equation
+clear
+clc
+hfg=97.100 //in Btu/lbm
+R=0.01946 //universal Gas constant in Btu/lbm-R
+T1=420 //in R
+T2=410 //in R
+P1=7.432 //in psia
+P2=%e^((hfg/R)*(1/T1-1/T2)+log(P1)) //Saturation pressure at -50R in psia
+printf("\n Hence, the Saturation Pressure of Refrigerant 134-a at -50 R is = %.2f psia. \n",P2);
\ No newline at end of file diff --git a/167/CH13/EX13.1/ex1.sce b/167/CH13/EX13.1/ex1.sce new file mode 100755 index 000000000..dfd953c31 --- /dev/null +++ b/167/CH13/EX13.1/ex1.sce @@ -0,0 +1,23 @@ +//example 1
+//Mass and Mole Fractions of a Gas Mixture
+clear
+clc
+m=20 //total mass of the mixture in kg
+mfO2=3/m //mass fraction of oxygen
+mfN2=5/m //mass fraction of nitrogen
+mfCH4=12/m //mass fraction of methane
+NO2=3/32 //no.of kilo moles of oxygen
+NN2=5/28 // no.of kilo moles of nitrogen
+NCH4=12/16 //no.of kilo moles of methane
+N=NO2+NN2+NCH4//total no. of moles
+yO2=NO2/N //mole fraction of O2
+yN2=NN2/N //mole fraction of N2
+yCH4=NCH4/N // mole fraction of CH4
+Mm=m/N //average molar mass of gas in kg/kmol
+printf("\n Mass fraction of oxygen is = %.2f. \n",mfO2);
+printf("\n Mass fraction of Nitrogen is = %.2f. \n",mfN2);
+printf("\n Mass fraction of Methane is = %.2f. \n",mfCH4);
+printf("\n Mole fraction of Nitrogen is = %.3f. \n",yN2);
+printf("\n Mole fraction of Oxygen is = %.3f. \n",yO2);
+printf("\n Mole fraction of Methane is = %.3f. \n",yCH4);
+printf("\n Average Molar mass of gas is = %.1f kg/mol. \n",Mm);
\ No newline at end of file diff --git a/167/CH13/EX13.2/ex2.sce b/167/CH13/EX13.2/ex2.sce new file mode 100755 index 000000000..97d7be16c --- /dev/null +++ b/167/CH13/EX13.2/ex2.sce @@ -0,0 +1,48 @@ +//example 2
+//P-v-T Behavior of Nonideal Gas Mixtures
+clear
+clc
+NN2=2 //No.of kmol of N2
+NCO2=6 //No. of kmol of CO2
+Nm=8 // total no. of kmol of mixture
+Ru=8.314 //Universal gas constant in kPa-m^3/kmol-K
+Tm=300//Temp. of mixture in K
+Pm=15000 //Pressure of mixture in kPa
+Vm=Nm*Ru*Tm/Pm //volume of tank on the basis of ideal gas equation in m^3
+printf("\n Hence, the volume of the mixture on the basis of ideal gas equation of state is = %.3f m^3. \n",Vm);
+disp('Now,estimating volume of tank on the basis of Kays rule')
+yN2=NN2/Nm//mole fraction of nitrogen
+yCO2=NCO2/Nm //mole fraction of CO2
+TcrN2=126.2 // critical temop. of N2 in Kelvins
+TcrCO2=304.2 //critical temp. of CO2 in kelvins
+Tcrm=yN2*TcrN2+yCO2*TcrCO2 //pseudo critical temp. of mixture in Kelvins
+PcrN2=3.39 //critical pressure of N2 in MPa
+PcrCO2=7.39 //critical pressure in MPa
+Pcrm=yN2*PcrN2+yCO2*PcrCO2 //pseodo critical pressure of mixture in MPa
+Tm=300 //actual critical temp. of mixture in kelvins
+Pm=15 //actual critical pressure of mixture in MPa
+Tr=Tm/Tcrm //Reduced Temp. of mixture
+Pr=Pm/Pcrm //Reduced pressure of mixture
+Zm1=Tr/Pr //compressibility of the mixture
+Vm1=Zm1*Vm//volume of tank on the basis of Kays rule in m^3
+printf("\n Hence, the volume of the mixture on the basis of Kays rule is = %.3f m^3. \n",Vm1);
+disp('Now, estimating volume of tank on the basis of compressibility factors and Amagats law')
+TrN2=Tm/TcrN2 //Reduced Temp. of N2
+PrN2=Pm/PcrN2 //Reduced Pressure of N2
+ZN2=1.02 //compressibility factor of N2
+TrCO2=Tm/TcrCO2 //Reduced Temperature of CO2
+PrCO2=Pm/PcrCO2 //Reduced pressure of CO2
+ZCO2=0.30 //compressibility factor of CO2
+Zm2=ZN2*yN2+ZCO2*yCO2 //compressibility factor of the mixture
+Vm2=Zm2*Vm //volume of the mixture in m^3
+printf("\n Hence, the volume of the mixture on the basis of compressibility factors and Amagats law is = %.3f m^3. \n",Vm2);
+disp('Now, estimating volume of tank on the basis of compressibility factors and daltons law')
+VrN2=(Vm/NN2)/(Ru*TcrN2/(PcrN2*1000))
+VrCO2=(Vm/NCO2)/(Ru*TcrCO2/(PcrCO2*1000))
+ZN2=0.99 //compressibility factor of N2
+ZCO2=0.56 //compressibility factor of CO2
+Zm3=yN2*ZN2+yCO2*ZCO2 //compressibility factor of the mixture
+Vm3=Zm3*Vm //volume of the mixture in m^3
+disp('This is 33 percent lower than the assumed value. Therefore, we should repeat the calculations, using the new value of Vm. When the calculations are repeated we obtain 0.738 m^3 after the second iteration, 0.678 m^3 after the third iteration, and 0.648 m^3 after the fourth iteration. This value does not change with more iterations. Therefore')
+Vm=0.648 //volume of the mixture in m^3
+printf("\n Hence, the volume of the mixture on the basis of compressibility factors and Daltons law is = %.3f m^3. \n",Vm);
\ No newline at end of file diff --git a/167/CH13/EX13.3/ex3.sce b/167/CH13/EX13.3/ex3.sce new file mode 100755 index 000000000..d9d6abe77 --- /dev/null +++ b/167/CH13/EX13.3/ex3.sce @@ -0,0 +1,25 @@ +//example 3
+//Mixing Two Ideal Gases in a Tank
+clear
+clc
+disp('We assume both gases to be ideal gases, and their mixtureto be an ideal-gas mixture. This assumption is reasonable since both the oxygen and nitrogen are well above their critical temperatures and well below their critical pressures.')
+CvN2=0.743 //Constant-Volume Specific heat of N2 in kJ/kg-K
+CvO2=0.658 //Constant-Volume Specific heat of O2 in kJ/kg-K
+disp('This is a closed system since no mass crosses the boundary during the process. We note that the volume of a rigid tank is constant and thus,there is no boundary work done. ')
+T1N2=20 // Temperature of N2 in celsius
+T1O2=40 // Temperature of O2 in celsius
+mN2=4 //mass of N2 in kg
+mO2=7 //mass of O2 in kg
+Tm=(mN2*CvN2*T1N2+mO2*CvO2*T1O2)/(mN2*CvN2+mO2*CvO2) //Temp. of mixture in Celsius
+printf("\n Hence, the temp. of the mixture is = %.1f C. \n",Tm)
+NO2=mO2/32 //No. of kmol of O2
+NN2=mN2/28 //No. of kmol of N2
+Nm=NO2+NN2 //Total No. of kmol of mixture
+Ru=8.314 //Universal Gas Constant in kPa-m^3/kmol-K
+P1O2=100 //Initial Pressure of O2 in kPa
+P1N2=150 //Initial Pressure of N2 in kPa
+VO2=NO2*Ru*(T1O2+273)/P1O2//Initial volume of O2 in m^3
+VN2=NN2*Ru*(273+T1N2)/P1N2 //Initial volume of N2 in m^3
+Vm=VO2+VN2 //total volume of mixture in m^3
+Pm=Nm*Ru*(Tm+273)/Vm //Mixture Pressure after equilbrium in kPa
+printf("\n Hence, the mixture pressure after equilbrium is = %.1f kPa. \n",Pm)
\ No newline at end of file diff --git a/167/CH13/EX13.4/ex4.sce b/167/CH13/EX13.4/ex4.sce new file mode 100755 index 000000000..ffe28ed41 --- /dev/null +++ b/167/CH13/EX13.4/ex4.sce @@ -0,0 +1,15 @@ +//example 4
+//Exergy Destruction during Mixing of Ideal Gases
+clear
+clc
+disp('We take the entire contents of the tank as the system. This is a closed system since no mass crosses the boundary during the process. We note that the volume of a rigid tank is constant, and there is no energy transfer as heat or work.')
+NO2=3 //No.of kmol of O2
+NCO2=5 //No. of kmol of CO2
+Nm=NO2+NCO2 //total moles of the mixture
+yO2=NO2/Nm //mole fraction of O2
+yCO2=NCO2/Nm //mole fraction of CO2
+Ru=8.314 //Universal Gas Constant in kJ/kmol-K
+dSm=-Ru*(NO2*log(yO2)+NCO2*log(yCO2)) //Entropy change in kJ/K
+To=298 //Temp. of surroundings in kelvins
+X=To*dSm //energy destuction in the process in kJ
+printf("\n Hence, the exergy destruction in the process is = %.1f MJ. \n",X/10^3);
\ No newline at end of file diff --git a/167/CH13/EX13.5/ex5.sce b/167/CH13/EX13.5/ex5.sce new file mode 100755 index 000000000..0c6d8fc86 --- /dev/null +++ b/167/CH13/EX13.5/ex5.sce @@ -0,0 +1,43 @@ +//example 5
+//cooling of non ideal gas mixture
+clear
+clc
+disp('We take the cooling section as the system. This is a control volume since mass crosses the system boundary during the process.The critical properties ')
+TcrN2= 126.2 //Critical Pressure of N2in K
+PcrN2=3.39 //Critical Pressure of N2 in MPa
+TcrO2=154.8 //Critical Temp. of O2 in K
+PcrO2=5.08 //Critical Pressure of O2 in MPa
+yN2=0.79 //mole fraction of nitrogen
+yO2=0.21 //mole fraction of O2
+T1=220 //Initial Temp. of air in kelvins
+T2=160//Final Temp. of air in kelvins
+Pm=10 //PRessure in MPa
+Ru=8.314 //Universal Gas constant in kJ/kmol-K
+disp('calculating heat transfer per kmol of air using ideal gas approximation')
+h1N2=6391 //Enthalpy of N2 at T1 in kJ/kmol
+h1O2=6404 //Enthalpy of O2 at T1 in kJ/kmol
+h2O2=4657 //Enthalpy of O2 at T2 in kJ/kmol
+h2N2=4648 //Enthalpy of N2 at T2 in kJ/kmol
+qout=yN2*(h1N2-h2N2)+yO2*(h1O2-h2O2) //Heat Transfer in kJ/kmol
+printf("\n Hence, the heat transfer during the process using the ideal gas approximation is = %.0f kJ/kmol. \n",qout);
+disp('calculating heat transfer per kmol of air using Kays law')
+Tcrm2=yN2*TcrN2+yO2*TcrO2 //critical temp. of pseudopure substance
+Pcrm2=yN2*PcrN2+yO2*PcrO2 //critical pressure of pseudopure substance
+Tr1=T1/Tcrm2 //Reduced Temp. at T1
+Tr2=T2/Tcrm2 //Reduced Temp. at T2
+Zh1m=1.0 //Compresibility factor at T1
+Zh2m=2.6 //Compressibility Factor at T2
+Pr=Pm/Pcrm2 //Reduced Pressure
+h1m=yN2*h1N2+yO2*h1O2 //Enthalpy of the mixture at T1 in kJ/kmol
+h2m=yN2*h2N2+yO2*h2O2 //Enthalpy of the mixture at T2 in kJ/kmol
+qout=(h1m-h2m)-Ru*Tcrm2*(Zh1m-Zh2m)//Heat transfer during the process in kJ/kmol
+printf("\n Hence, the heat transfer during the process using Kays law is = %.0f kJ/kmol. \n",qout);
+disp('calculating heat transfer per kmol of air using Amagats law')
+Zh1N2=0.9 //Compressibility factor of N2 at T1
+Zh2N2=2.4 //Compressibility factor of N2 at T2
+Zh1O2=1.3 //Compressibility factor of O2 at T1
+Zh2O2=4.0 //Compressibility factor of O2 at T2
+dhN2=(h1N2-h2N2)-Ru*TcrN2*(Zh1N2-Zh2N2) //Enthalpy change for N2 in kJ/kmol
+dhO2=(h1O2-h2O2)-Ru*TcrO2*(Zh1O2-Zh2O2) //Enthaloy change for O2 in kJ/kmol
+qout=yN2*dhN2+yO2*dhO2 //kJ/mol //heat transfer during the process in kJ/kmol
+printf("\n Hence, the heat transfer during the process using Amagats law is = %.0f kJ/kmol. \n",qout);
\ No newline at end of file diff --git a/167/CH13/EX13.6/ex6.sce b/167/CH13/EX13.6/ex6.sce new file mode 100755 index 000000000..c7c137d03 --- /dev/null +++ b/167/CH13/EX13.6/ex6.sce @@ -0,0 +1,24 @@ +//example 6
+//obtaining fresh water from sea water
+clear
+clc
+Mw=18.0 //molar mass of water kg/kmol
+Ms=58.44 //molar mass of salt kg/kmol
+Rw=0.4615 //gas constant of pure water kJ/kg-K
+mfs=0.0348 //mass fraction of salt
+mfw=1-mfs //mass fraction of water
+Mm=1/((mfs/Ms)+(mfw/Mw)) //molar mass of mixture kg/kmol
+yw=mfw*Mm/Mw //mole fraction of water
+ys=1-yw //mole fraction of salt
+To=288.15 //Temp. of Seawater in kelvins
+Ru=8.314 //Universal Gas constant in kJ/kmol-K
+dm=1028 //density of seawater in kg/m^3
+wminin=-Ru*To*(yw*log(yw)+ys*log(ys)) //minimum work input required to separate 1 kg of seawater completely into pure water and pure salts kJ/kmol
+Wminin=wminin/Mm //minimum work input in kJ/kg seawater
+wminin2=Rw*To*log(1/yw) //minimum work input required to produce 1 kg of fresh water from seawater in kJ/kg fresh water
+Pm=dm*Rw*To*log(1/yw) //the minimum gauge pressure that the seawater must be raised if fresh water is to be obtained by reverse osmosis using semipermeable membranes in kPa
+printf("\n Hence, the mole fraction of water in the seawater is = %.4f. \n",yw);
+printf("\n Hence, the mole fraction of salt in the seawater is = %.2f percentage. \n",ys*100);
+printf("\n Hence, the minimum work input required to separate 1 kg of seawater completely into pure water and pure salts is = %.2f kJ/kg sea water. \n",Wminin);
+printf("\n Hence, the minimum work input required to produce 1 kg of fresh water from seawater kJ/kg fresh water is = %.2f kJ/kg fresh water. \n",wminin2);
+printf("\n Hence, the the minimum gauge pressure that the seawater must be raised if fresh water is to be obtained by reverse osmosis using semipermeable membranes is = %.0f kPa. \n",Pm);
\ No newline at end of file diff --git a/167/CH14/EX14.1/ex1.sce b/167/CH14/EX14.1/ex1.sce new file mode 100755 index 000000000..e110370a3 --- /dev/null +++ b/167/CH14/EX14.1/ex1.sce @@ -0,0 +1,26 @@ +//example 1
+// the amonut of water vapour in room air
+clear
+clc
+disp('The constant-pressure specific heat of air at room temperature is')
+cp=1.005 //Constant Pressure Specific Heat of air at room temperature in kJ/kg · K
+T=25 //room temp. in Celsius
+disp('For water at 25°C, we have ')
+Pg=3.1698 //Saturation pressure in kPa
+hg=2546.5 //Specific enthalpy in kJ/kg
+x=0.75 //humidity
+Pv=x*Pg //Vapour pressure in kPa
+P=100 // Pressure of air in room in kPa
+Pa=P-Pv //partial pressure of dry air
+w=(0.622*Pv)/(P-Pv) //specific humidity of air
+h=cp*T+w*hg //enthalpy of dry air per unit mass
+Ra=0.287 //gas constant for dry air in kPa-m^3/kg-K
+Rv=0.4615 //gas constant for water vapour in kPa-m^3/kg-K
+V=5*5*3 //volume of room in m^3
+ma=(Pa*V)/(Ra*(T+273)) //mass of dry air
+mv=(Pv*V)/(Rv*(T+273)) //mass of water vapour
+printf("\n Hence, the partial pressure of dry air is = %.2f kPa. \n",Pa);
+printf("\n The specific humidity is = %.4f . \n",w);
+printf("\n The enthalpy per unit mass of dry air is = %.1f kJ/kg dry air. \n",h);
+printf("\n The mass of dry air is = %.2f kg. \n",ma);
+printf("\n The mass of water vapour is = %.2f kg. \n",mv);
\ No newline at end of file diff --git a/167/CH14/EX14.2/ex2.sce b/167/CH14/EX14.2/ex2.sce new file mode 100755 index 000000000..9e899591b --- /dev/null +++ b/167/CH14/EX14.2/ex2.sce @@ -0,0 +1,10 @@ +//example 2
+// fogging of the windows in house
+clear
+clc
+x=0.75 //relative humidity
+P=2.3392 //saturation pressure of water at 20°C in kPa
+Pv=x*P //Vapour pressure in kPa
+disp('Saturation temp. of water at Pv=15.4 C.Therefore, ')
+Tdp=15.4 //window temperature in Celsius
+printf("\n Hence, window temperature at which moisture in the air start condensing on the inner surfaces of the windows is = %.1f C. \n",Tdp);
\ No newline at end of file diff --git a/167/CH14/EX14.3/ex3.sce b/167/CH14/EX14.3/ex3.sce new file mode 100755 index 000000000..4ee9ea264 --- /dev/null +++ b/167/CH14/EX14.3/ex3.sce @@ -0,0 +1,21 @@ +//example 3
+// The Specific and Relative Humidity of Air
+clear
+clc
+disp('The saturation pressure of water is 1.7057 kPa at 15C, and 3.1698 kPa at 25 C')
+T1=25 //dry bulb temperature in Celsius
+T2=15 //wet bulb temperature in Celsius
+hg1=2546.5 //in kJ/kg
+hf2=62.9822 //in kJ/kg
+cp=1.005 //Constant pressure specific heatof air at room temp. in kJ/kg-K
+hfg2=2465.4 //in kJ/kg
+P2=101.325 // Atmospheric pressure in kPa
+Pg2=1.7057 //Saturation pressure of water at 15C in kPa
+w2=0.622*Pg2/(P2-Pg2) //kg water/kg dry air
+w1=(cp*(T2-T1)+w2*hfg2)/(hg1-hf2) //specific humidity
+Pg1=3.1698 //Saturation pressure of water at 25C in kPa
+o1=w1*P2/((0.622+w1)*Pg1) //relative huumidity
+h1=cp*T1+w1*hg1 //enthalpy of air per unit mass of dry air
+printf("\n Hence, the specific humidity is = %.5f kg H2o/kg dry air. \n",w1);
+printf("\n The relative humidity = %.3f . \n",o1);
+printf("\n The Enthalpy of air per unit mass of dry air is = %.1f kJ/kg dry air. \n",h1);
\ No newline at end of file diff --git a/167/CH14/EX14.4/ex4.sce b/167/CH14/EX14.4/ex4.sce new file mode 100755 index 000000000..9b94f05c7 --- /dev/null +++ b/167/CH14/EX14.4/ex4.sce @@ -0,0 +1,15 @@ +//example 4
+// The Use of the Psychrometric Chart
+clear
+clc
+disp('At a given total pressure, the state of atmospheric air is completely specifiedby two independent properties such as the dry-bulb temperature and the relative humidity. Other properties are determined by directly reading their values at the specified state.')
+disp('The specific humidity is determined by drawing a horizontal line from the specified state to the right until it intersects with the v axis')
+v=0.0142 // in kg water/kg dry air
+disp('The enthalpy of air per unit mass of dry air is determined by drawing a line parallel to the h=constant lines from the specific state until it intersects the enthalpy scale, giving')
+h=71.5 // in kJ/kg dry air
+disp('The wet-bulb temperature is determined by drawing a line parallel to the Twb=constant lines from the specified state until it intersects the saturation line, giving')
+Twb=24 // in Celsius
+disp('The dew-point temperature is determined by drawing a horizontal line from the specified state to the left until it intersects the saturation line, giving')
+Tdp=19.4// in Celsius
+disp('The specific volume per unit mass of dry air is determined by noting the distances between the specified state and the v=constant lines on both sides of the point. The specific volume is determined by visual interpolation to be')
+v=0.893 // in m3/kg dry air
\ No newline at end of file diff --git a/167/CH14/EX14.5/ex5.sce b/167/CH14/EX14.5/ex5.sce new file mode 100755 index 000000000..d0727b62b --- /dev/null +++ b/167/CH14/EX14.5/ex5.sce @@ -0,0 +1,32 @@ +//example 5
+//Heating and Humidification of Air
+clear
+clc
+disp('This is a steady-flow process and thus the mass flow rate of dry air remains constant during the entire process.We take the system to be the heating or the humidifying section,as appropriate.')
+o1=0.3 //relative humidity
+Psat=1.2281 //Saturation pressure of water in kPa at 10C
+P1=100 //Pressure at which entire process takes in kPa
+Pv1=0.3682 //Vapour pressure of water in kPa
+Ra=0.287 // Gas constant for air in kPa-m3/kg-K
+T1=10 // Temp. of outdoor air in K
+Pa=P1-Pv1 // Pressure of dry air in kPa
+V1=Ra*(T1+273)/Pa // specific volume of dry air in m^3/kg
+v1=45 //steady intake of outdoor air in m^3/min
+ma=v1/V1 //mass flow rate of dry air in kg/min
+w1=0.622*Pv1/(P1-Pv1)//kg water/kg dry air
+cp=1.005 //constant pressure specific heat in kJ/kg-°C
+hg1=2519.2 //in kJ/kg
+T2=22 //temp. in celsius (given)
+w2=w1
+hg2=2541 //specific enthalpy of saturated water vaporin at 22 C in kJ/kg
+h1=cp*T1+w1*hg1 //kJ/kg dry air
+h2=cp*T2+w2*hg2 //kJ/kg dry air
+qin=ma*(h2-h1) //rate of heat transfer to air in the heating section
+x3=0.60 //relative humidity
+Pg3=3.1698 //saturation pressure of water at 25C in kPa
+P3=100 //pressure of entire process in kPa
+w3=0.622*x3*Pg3/(P3-x3*Pg3)//kg water/kg dry air
+mw=ma*(w3-w2) //required mass flow rate of the steam in the humidifying section in kg/min
+printf("\n Hence, the rate of heat supply in the heating section is=%.0f kJ/min. \n",qin);
+printf("\n The mass flow rate of the steam required in the humidifying section is=%.3f kg/min\n",mw);
+
diff --git a/167/CH14/EX14.6/ex6.sce b/167/CH14/EX14.6/ex6.sce new file mode 100755 index 000000000..1dc3e6260 --- /dev/null +++ b/167/CH14/EX14.6/ex6.sce @@ -0,0 +1,17 @@ +//example 6
+//Cooling and Dehumidification of Air
+clear
+clc
+disp('This is a steady-flow process and thus the mass flow rate of dry air remains constant during the entire process')
+h1=85.4 //Specific enthalpy for state 1 in kJ/kg dry air
+w1=0.0216 //kg water/kg dry air
+v1=0.889 //Specific volume for state 1 in m3/kg dry air
+h2=39.3 // Specific enthalpy for state 2 in kJ/kg dry air
+w2=0.0100 //kg water/kg dry air
+V1=10 //volume flow rate of air in m^3/min
+hw=58.8 //enthalpy of saturated liquid water at 14°C in kJ/kg
+ma=V1/v1 //mass flow rate of dry air in kg/min
+mw=ma*(w1-w2) //rate of moisture removal in m^3/min
+qout=ma*(h1-h2)-mw*hw //rate of heat removal from air in kJ/min
+printf("\n Hence, the rate of moisture removal from dry air is = %.3f kg/min. \n",mw);
+printf("\n and rate of heat removal is = %.0f kJ/min. \n",qout);
\ No newline at end of file diff --git a/167/CH14/EX14.8/ex8.sce b/167/CH14/EX14.8/ex8.sce new file mode 100755 index 000000000..e22a8b5fe --- /dev/null +++ b/167/CH14/EX14.8/ex8.sce @@ -0,0 +1,27 @@ +//example 8
+//Mixing of Conditioned Air with Outdoor Air
+clear
+clc
+disp('The properties of each inlet stream are determined from the psychrometric chart to be')
+v2=0.889 //Specific volume of outside air in m3/kg dry air
+w2=0.0182 //properties of stream 2 in kg water/kg dry air
+h2=79.0 //Specific enthalpy of outside air in kJ/kg dry air
+v1=0.826 //Specific volume of saturated air in m3/kg dry air
+w1=0.010 //in kg water/kg dry air
+h1=39.4 //Specific enthalpy for stream 1 in in kJ/kg dry air
+V1=50 //flow rate of saturated air in m^3/min
+V2=20 //flow rate for stream 2 in m^3/min
+ma1=V1/v1 //mass flow rate for stream 1 in kg/min
+ma2=V2/v2 //mass flow rate for stream 2 in kg/min
+ma3=ma1+ma2 //mass balance of air in kg/min
+disp('using the expression ma1/ma2=(w2-w3)/(w3-w1)=(h2-h3)/(h3-h1)')
+w3=0.0122 //kg water/kg dry air
+h3=50.1 //kJ/kg dry air
+disp('These two properties fix the state of the mixture. Other properties of the mixture are determined from the psychrometric chart:')
+T3=19.0 //dry bulb temp. in °C
+x3=0.89//relative humidity of mixture
+v3=0.844 //Specific volume of mixture in m3/kg
+V3=ma3*v3 //volume flow rate of the mixture in m^3/min
+printf("\n Hence, the specific humidity of the mixture is = %.4f kg H2o/kg dry air. \n",w3);
+printf("\n The dry bulb temp. is = %.1f C. \n",T3);
+printf("\n The volume flow rate of the mixture is = %.1f kg H2o/kg dry air. \n",V3);
\ No newline at end of file diff --git a/167/CH14/EX14.9/ex9.sce b/167/CH14/EX14.9/ex9.sce new file mode 100755 index 000000000..d5cd995a6 --- /dev/null +++ b/167/CH14/EX14.9/ex9.sce @@ -0,0 +1,17 @@ +//example 9
+//Cooling of a Power Plant by a Cooling Tower
+clear
+clc
+h1=42.2 // Specific enthalpy of dry air in kJ/kg
+w1=0.0087 //kg water/kg dry air
+v1=0.842 //specific volume of dry air in m3/kg
+h2=100.0 //Specific enthalpy of leaving air in kJ/kg
+w2=0.0273 //kg water/kg dry air
+h3=146.64 //Specific enthalpy of warm water in kJ/kg
+h4=92.28 //Specific enthalpy of cool water in kJ/kg
+M3=100 //mass flow rate of warm water in kg/s
+Ma=M3*(h3-h4)/((h2-h1)-(w2-w1)*h4) //in m^3/s
+V1=Ma*v1//volume flow rate of air into the cooling tower in m^3/s
+Mmakeup=Ma*(w2-w1) //mass flow rate of required makeup water in kg/s
+printf("\n Hence, the mass flow rate of required makeup water= %.2f kg /s. \n",V1);
+printf("\n the volume flow rate of air into the cooling tower = %.2f m^3/s. \n",Mmakeup);
\ No newline at end of file diff --git a/167/CH15/EX15.1/ex1.sce b/167/CH15/EX15.1/ex1.sce new file mode 100755 index 000000000..d9fe3d80b --- /dev/null +++ b/167/CH15/EX15.1/ex1.sce @@ -0,0 +1,14 @@ +//example 1
+//Balancing the Combustion Equation
+clear
+clc
+Mair=28.97 //Molar mass of air in kg/kmol
+x=8 //no. of moles of CO2 in products
+y=9 //no. of moles of H2O in products
+z=7.5 //no. of moles of O2 in products
+w=75.2 // no. of moles of N2 in products
+NMair=20*4.76*29 //mass of air in kg
+NMc=8*12 //mass of carbon in fuel in kg
+NMh2=2*9 //mass of hydrogen in fuel in kg
+AF=NMair/(NMc+NMh2) //air fuel ratio in kg air/kg fuel
+printf("\n Hence, the air fuel ratio for this combustion process is = %.1f kg air/kg fuel. \n",AF);
\ No newline at end of file diff --git a/167/CH15/EX15.11/ex11.sce b/167/CH15/EX15.11/ex11.sce new file mode 100755 index 000000000..3c04a5b2b --- /dev/null +++ b/167/CH15/EX15.11/ex11.sce @@ -0,0 +1,20 @@ +//example 11
+//second law analysis of isothermal combustion
+clear
+clc
+Pv=3.1698 //Partial pressure of water vapour in kPa
+Ptotal=101.325 //Total pressure of products in kPa
+x=Pv/Ptotal
+Nv=x*13.28/(1-x) //amount of water vapour in kmol
+Qout=1*(-74850)-1*(-393520)-0.43*(-241820)-1.57*(-285830) //Heat transfer per kmol of CH4
+Sprod=2845.35 //Total entropy of products in kJ/kmol-K
+Sreact=3023.69 //Total entropy of reactants in kJ/kmol-K
+Tsurr=298 //Temperature of surroundings in K
+Sgen=Sprod-Sreact+Qout/Tsurr //Entropy generation during the process in kJ/kmol-K CH4
+To=298 //K
+Xdestroyed=To*Sgen //exergy destruction in kJ/kmol CH4
+Wrev=Xdestroyed //reversible work associated with the process
+printf("\n The heat transfer per kmol of CH4 is = %.0f kJ/kmol CH4. \n",Qout);
+printf("\n The Entropy generation is = %.0f kJ/kmol-K CH4. \n",Sgen);
+printf("\n The Exergy destruction is = %.0f MJ/kmol CH4. \n",Xdestroyed/1000);
+printf("\n The reversible work is = %.0f MJ/kmol CH4. \n",Wrev/1000);
\ No newline at end of file diff --git a/167/CH15/EX15.2/ex2.sce b/167/CH15/EX15.2/ex2.sce new file mode 100755 index 000000000..5e087521f --- /dev/null +++ b/167/CH15/EX15.2/ex2.sce @@ -0,0 +1,15 @@ +//example 2
+//Dew-Point Temperature of Combustion Products
+clear
+clc
+mair=4.2*4.76*29 //mass of air in kg
+mfuel=2*12+3*2 //mass of fuel in kg
+AF=mair/mfuel //air-fuel ratio
+Nv=3 //no. of kmol of water vapour
+Nprod=21.49 //No. of kmol of products
+Pprod=100 //No. of kmol of products in kPa
+Pv=Nv*Pprod/Nprod //Partial pressure of water vapour in kPa
+disp('therefore,Dew point temp. of products =Saturation temp. at Pv')
+Tdp=52.3//Dew point temp. of products in °C
+printf("\n Hence, the Air fuel ratio is = %.1f kg air/kg fuel. \n",AF);
+printf("\n and dew point temp. of products is = %.1f C. \n",Tdp);
\ No newline at end of file diff --git a/167/CH15/EX15.3/ex3.sce b/167/CH15/EX15.3/ex3.sce new file mode 100755 index 000000000..0302f2faa --- /dev/null +++ b/167/CH15/EX15.3/ex3.sce @@ -0,0 +1,21 @@ +//example 3
+//Combustion of a Gaseous Fuel with Moist Air
+clear
+clc
+x=0.75 //no. of moles of CO2 in the product
+y=1.53 //no. of moles of H2O in the product
+z=5.648 //no. of moles of N2 in the product
+o=0.8 //relative humidity
+Psat=2.3392 //Saturation pressure of water at 20C in kPa
+Pvair=o*Psat //partial pressure of moisture in air
+Ptotal=101.325 //Total pressure in kPa
+Ndryair=6.97 //no.of kmol of dry air
+Nvair=Pvair*Ndryair/(Ptotal*(1-Pvair/Ptotal)) //no. of moles of moisture in air
+Ntotal=Nvair+Ndryair //total no.of kmol
+Pprod=101.325 //Pressure of products in kPa
+Nvprod=y+0.131 //no. of kmol of H2O in products
+Nprod=x+z+Nvprod //no. of kmol of products
+Pvprod=Nvprod*Pprod/Nprod //partial pressure of water vapour in the combustion gases
+disp('The dew-point temperature of the products is equal the saturation temp. of water at P=Pvprod. Therefore,')
+Tdp=60.9 //in C
+printf("\n Hence, the dew point temp. of products is = %.1f C. \n",Tdp);
\ No newline at end of file diff --git a/167/CH15/EX15.4/ex4.sce b/167/CH15/EX15.4/ex4.sce new file mode 100755 index 000000000..34e61f6ac --- /dev/null +++ b/167/CH15/EX15.4/ex4.sce @@ -0,0 +1,19 @@ +///example 4
+//Reverse Combustion Analysis
+clear
+clc
+a=22.20 //No. of kmol of dry air
+x=1.36 //No. of kmol of octane
+b=12.24 //No. of kmol of H2O
+mair=16.32*4.76*29 //mass of air in kg
+mfuel=8*12+9*2 //mass of fuel in kg
+AF=mair/mfuel //air fuel ratio kg air/kg fuel
+mairact=4.76*16.32 //actual amount of air in kmol
+mairth=12.50*4.76 //Theoretical amount of air mol
+p=mairact/mairth //percentage of theoretical air
+Pv=3.198 //Partial pressure of water vapour in kPa
+Pprod=100 //Pressure of products in kPa
+Nw=(900-82.53*Pv)/(Pprod-Pv) //no. of kmol of water vapour
+printf("\n Hence, the Air fuel ratio is = %.2f kg air/kg fuel. \n",AF);
+printf("\n The precentage of theoretical air used is = %.0f . \n",p*100);
+printf("\n The amount of H2O that is condensed as products are cooled is=%.2f kmol. \n",Nw);
\ No newline at end of file diff --git a/167/CH15/EX15.5/ex5.sce b/167/CH15/EX15.5/ex5.sce new file mode 100755 index 000000000..e724f3eab --- /dev/null +++ b/167/CH15/EX15.5/ex5.sce @@ -0,0 +1,13 @@ +//example 5
+//Evaluation of the Enthalpy of Combustion
+clear
+clc
+hfCO2=-393520 //enthalpy of formation of CO2 in kJ/kmol
+hfH2O=-285830 //enthalpy of formation of H2O in kJ/kmol
+hfC8H18=-249950 //enthalpy of formation of octane in kJ/kmol
+NCO2=8 //No. of kmol of CO2
+NH2O=9 //No. of kmol of H2O
+NC8H18=1 //No. of kmol of C8H18
+hc=NCO2*hfCO2+NH2O*hfH2O-NC8H18*hfC8H18 //Enthalpy of combustion of octane in kJ/kmol
+hc=hc/114 //enthalpy of combustion in kJ/kg
+printf("\n Hence, the enthalpy of combustion of liquid octane is = %.0f kg air/kg C8H18. \n",hc);
diff --git a/167/CH15/EX15.6/ex6.sce b/167/CH15/EX15.6/ex6.sce new file mode 100755 index 000000000..343de4863 --- /dev/null +++ b/167/CH15/EX15.6/ex6.sce @@ -0,0 +1,17 @@ +//example 6
+//First-Law Analysis of Steady-Flow Combustion
+clear
+clc
+mair=7.5*4.76*29 //mass of air in kg
+mfuel=3*12+4*2 //mass of fuel in kg
+AF=mair/mfuel //air fuel ratio
+Mfuel=0.05 //Mass flow rate of fuel in kg/min
+Mair=AF*Mfuel //mass flow rate of air in kg/min
+qout=1*(-118910)+7.5*(8150-8682)+28.2*(0+8141-8669)-2.7*(-393520+71078 -9364)-0.3*(-110530+47517-8669)-4*(-241820+57999-9904)-2.65*(0+49292-8682)-28.2*(0+47073-8669) //in kJ/kmol C3H8
+disp('This heat is transferred from the combustion chamber for each kmol (44kg) of propane.therefore qout = qout/44 kJ/kg')
+qout=qout/44 //in kJ/kg propane
+M=0.05 //mass flow rate of liquid propane in kg/min
+Qout=M*qout //rate of heat transfer in kJ/min
+Qout=Qout/60 //rate of heat reansfer in kW
+printf("\n Hence, the mass flow rate of air is = %.2f kg/min. \n",Mair);
+printf("\n and the rate of heat transfer from combustion chamber is = %.2f kW. \n",Qout);
\ No newline at end of file diff --git a/167/CH15/EX15.7/ex7.sce b/167/CH15/EX15.7/ex7.sce new file mode 100755 index 000000000..d4661614c --- /dev/null +++ b/167/CH15/EX15.7/ex7.sce @@ -0,0 +1,13 @@ +//example 7
+//first law anlysis of combustion in bomb
+clear
+clc
+Preact=1 //initial pressure in atm
+Nreact=4 //Mo. of lbmol of reactants
+Treact=537 //Temp. of reactants in R
+Nprod=4 //No. of lbmol of products
+Tprod=1800 //Temp. of products in R
+Pprod=Preact*Nprod*Tprod/(Nreact*Treact) //final pressure of products in atm
+Qout=1*(-32210-(1.986*537))+3*(0-1.986*537)-1*(-169300+18391.5-4027.5-(1.986*1800))-2*(-104040+15433.0-4258.0-(1.986*1800))-1*(0+13485.8-3725.1-(1.986*1800)) //Heat transfer during the process in Btu/lbmol CH4
+printf("\n Hence, the final pressure in the tank is = %.2f atm. \n",Pprod);
+printf("\n The heat transfer during the process is = %.0f Btu/lbmol CH4. \n",Qout);
\ No newline at end of file diff --git a/167/CH15/EX15.8/ex8.sce b/167/CH15/EX15.8/ex8.sce new file mode 100755 index 000000000..ed0da9e6e --- /dev/null +++ b/167/CH15/EX15.8/ex8.sce @@ -0,0 +1,20 @@ +//example 8
+//Adiabatic Flame Temperature in Steady Combustion
+clear
+clc
+hfC8H18=-249950 //in kJ/kmol
+hfO2=0 //in kJ/kmol
+hO2=8682 //in kJ/kmol
+hfN2=0 //in kJ/kmol
+hN2=8669 //in kJ/kmol
+hfH2O=-241820 //in kJ/kmol
+hH2O=9904 //in kJ/kmol
+hfCO2=-393520 //in kJ/kmol
+hCO2=9364 //in kJ/kmol
+Hprod=8*hfCO2+9*hfH2O+47*hfN2 //in kJ
+Hmol=Hprod/(8+9+47) //enthalpy per mole
+disp('This enthalpy value corresponds to about 2650 K for N2, 2100 K for H2O, and 1800 K for CO2. But since, the majority of the moles are N2, we see that Tprod should be close to 2650 K, but somewhat under it.')
+disp('For 2400 K, the value is higher than actual Hprod and for 2350 K, it is lower than that value.By interpolation, it comes out to be Tprod=2395 K')
+Tprod=2395 //in K
+printf("\n Hence,The adiabatic flame temperature for complete combustion with 100 percent theoretical air is=%.0f K. \n",Tprod);
+disp('Similarily, the adiabatic flame temperature for complete combustion with 400 percent theoretical air is 962 K and with 90% theoretical air is 2236 K.')
\ No newline at end of file diff --git a/167/CH15/EX15.9/ex9.sce b/167/CH15/EX15.9/ex9.sce new file mode 100755 index 000000000..2fe990578 --- /dev/null +++ b/167/CH15/EX15.9/ex9.sce @@ -0,0 +1,8 @@ +//example 9
+//reversible work associated with combustion process
+clear
+clc
+NCO2=1 //mass of CO2 in lbmol
+gfCO2=-169680 //Enthalpy of formation for CO2 in Btu/lbmol
+Wrev=-NCO2*gfCO2 //Reversible work for the given prcess in Btu
+printf("\n Hence, the reversible work for this process is = %.0f Btu. \n",Wrev);
\ No newline at end of file diff --git a/167/CH16/EX16.1/ex1.sce b/167/CH16/EX16.1/ex1.sce new file mode 100755 index 000000000..4b79b8172 --- /dev/null +++ b/167/CH16/EX16.1/ex1.sce @@ -0,0 +1,13 @@ +//example 1
+//Equilibrium Constant of a Dissociation Process
+clear
+clc
+T=298.15 //Temp. in K
+vn=2 //No. of moles of N in products
+vn2=1 //No. of moles of N2 in reactants
+gN2=0 //Molar gibbs function for N2
+gN=455510 //Molar gibbs function for N in kJ/kmol
+dG=vn*gN-vn2*gN2 //Change in Gibbs function of the mixture
+Ru=8.314 //Universal Gas Constant in kJ/kmol-K
+Kp=%e^(-dG/Ru*T) //Equilbrium Constant
+printf("\n Hence, Equilbrium Constant is = %.0f . \n",Kp);
\ No newline at end of file diff --git a/167/CH16/EX16.10/ex10.sce b/167/CH16/EX16.10/ex10.sce new file mode 100755 index 000000000..128297e60 --- /dev/null +++ b/167/CH16/EX16.10/ex10.sce @@ -0,0 +1,11 @@ +//example 10
+//Diffusion of Hydrogen Gas into a Nickel Plate
+clear
+clc
+s=0.00901 //solubility of hydrogen in nickel in kmol/m3-bar
+PH2gas=3//Pressure of hydrogen in tank in bar
+PH2solid=s*PH2gas //molar density of hydrogen in nickel plate in kmol/m^3
+MH2=2 //molar mass of hydrogen kg/kmol
+dH2solid=PH2solid*MH2 //mass density of hydrogen
+printf("\n Hence, the molar density of hydrogen in Nickel plate when phase equilbrium is established is = %.3f kmol/m^3. \n",PH2solid);
+printf("\n and mass density is = %.3f kg/m^3. \n",dH2solid);
\ No newline at end of file diff --git a/167/CH16/EX16.11/ex11.sce b/167/CH16/EX16.11/ex11.sce new file mode 100755 index 000000000..44f6d1cb9 --- /dev/null +++ b/167/CH16/EX16.11/ex11.sce @@ -0,0 +1,15 @@ +//example 11
+//Composition of Different Phases of a Mixture
+clear
+clc
+yH2Ol=0.3
+yNH3l=0.7
+PH2Osat=7.3851 //kPa
+PNH3sat=1554.33 //kPa
+PH2Og=yH2Ol*PH2Osat //vapour pressure of h2o
+PNH3g=yNH3l*PNH3sat // vapour pressure of nh3
+Ptotal=PH2Og+PNH3g
+yH2Og=PH2Og/Ptotal //mole fraction of h2o in gas phase
+yNH3=PNH3g/Ptotal //mole fraction of nh3 in gas phase
+printf("\n The mole fraction of H2O in the mixture is = %.4f . \n",yH2Og);
+printf("\n The mole fraction of NH3 in the mixture is = %.4f . \n",yNH3);
\ No newline at end of file diff --git a/167/CH16/EX16.2/ex2.sce b/167/CH16/EX16.2/ex2.sce new file mode 100755 index 000000000..51719ea1c --- /dev/null +++ b/167/CH16/EX16.2/ex2.sce @@ -0,0 +1,13 @@ +//example 2
+//Dissociation Temperature of Hydrogen
+clear
+clc
+P=10 //given pressure in atm
+Nh=0.2 //No.of kmol of atomic hydrogen produced in the reaction
+Nh2=0.9 //No. of kmol of molecular hydrogen left as reactant
+Ntotal=Nh+Nh2 //Total no. of kmol of reactant and products
+vh=2 //From the stoichometry of the reaction
+vh2=1 //From the stoichometry of the reaction
+Kp=(Nh^vh/Nh2^vh2)*(P/Ntotal)^(vh-vh2) //Equilbrium constant
+T=3535 //Temp. corresponding to evaluated value of Kp
+printf("\n Hence,temperature at which 10 percent of diatomic hydrogen (H2) dissociates into monatomic hydrogen (H) is = %.0f K. \n",T);
\ No newline at end of file diff --git a/167/CH16/EX16.6/ex6.sce b/167/CH16/EX16.6/ex6.sce new file mode 100755 index 000000000..964109fb2 --- /dev/null +++ b/167/CH16/EX16.6/ex6.sce @@ -0,0 +1,25 @@ +//example 6
+//Enthalpy of Reaction of a Combustion Process
+clear
+clc
+NH2O=1 //No. of kmol of water
+NH2=1 //No. of kmol of Hydrogen
+NO2=0.5 //No. of kmol of Oxygen
+hfH2O=-241820 //standard heat of formation of liquid water from elemental reactants in kJ/kkmol
+hH2O=82593 // in kJ/kmol
+hoH2O=9904 //in kJ/kmol
+hfH2=0 //standard heat of formation of H2
+hH2=61400 //in kJ/kmol
+hoH2=8468 //in kJ/kmol
+hfO2=0 //standard heat of formation of O2
+hO2=67881 //in kJ/kmol
+hoO2=8682//in kJ/kmol
+hr1=NH2O*(hfH2O+hH2O-hoH2O)-NH2*(hfH2+hH2-hoH2)-NO2*(hfO2+hO2-hoO2) //Enthalpy of reaction in kJ/kmol using enthalpy data
+Ru=8.314 //Universal Gas Constant in kJ/kmol-K
+T1=1800 //suitable temp. lower than and closest to 2000K in K
+T2=2200 //suitable temp. higher than and closest to 2000K in K
+Kp1=18509 //Equilbrium constant at T1
+Kp2=869.6 //Equilbrium constant at T2
+hr2=Ru*log(Kp2/Kp1)/((1/T1)-(1/T2)) //Enthalpy of reaction in kJ/kmol using Kp data
+printf("\n Hence, Equilbrium Constant using Enthalpy data is = %.0f kJ/kmol. \n",hr1);
+printf("\n Hence, Equilbrium Constant using Kp data is = %.0f kJ/kmol. \n",hr2);
\ No newline at end of file diff --git a/167/CH16/EX16.7/ex7.sce b/167/CH16/EX16.7/ex7.sce new file mode 100755 index 000000000..bad26f036 --- /dev/null +++ b/167/CH16/EX16.7/ex7.sce @@ -0,0 +1,12 @@ +//example 7
+//Phase Equilibrium for a Saturated Mixture
+clear
+clc
+hf=503.81 // in kJ/kg,
+sf=1.5279 // in kJ/kg-K
+hg=2706.0 //in kJ/kg
+sg=7.1292 //in kJ/kg-K
+T=393.15 //Given temp. in K
+gf=hf-T*sf //in kJ/kg
+gg=hg-T*sg //in kJ/kg
+disp('Since, two results are in close agreement, Therefore mixture of saturated liquid water and saturated water vapor at 120°C satisfies the criterion for phase equilibrium')
\ No newline at end of file diff --git a/167/CH16/EX16.8/ex8.sce b/167/CH16/EX16.8/ex8.sce new file mode 100755 index 000000000..23f0f0849 --- /dev/null +++ b/167/CH16/EX16.8/ex8.sce @@ -0,0 +1,9 @@ +//example 8
+//Mole Fraction of Water Vapor Just over a Lake
+clear
+clc
+Pv=1.7057 //the partial pressure of water vapor in the air at the lake surface in kPa
+P=92 //atmospheric pressure at lake level in kPa
+yv=Pv/P //The mole fraction of water vapor in the air at the surface of the lake
+printf("\n Hence, The mole fraction of water vapor in the air at the surface of the lake is = %.2f percent. \n",yv*100);
+disp('Water contains some dissolved air, but the amount is negligible. Therefore,we can assume the entire lake to be liquid water. So, mole fraction of water in lake is almost 1')
\ No newline at end of file diff --git a/167/CH16/EX16.9/ex9.sce b/167/CH16/EX16.9/ex9.sce new file mode 100755 index 000000000..767b6b6cf --- /dev/null +++ b/167/CH16/EX16.9/ex9.sce @@ -0,0 +1,10 @@ +//example 9
+//The Amount of Dissolved Air in Water
+clear
+clc
+Pv=1.96 //kPa
+P=92 //atmospheric pressure at lakelevel
+Pdryair=(P-Pv)/100 //pressure of dry air in bar
+H=62000//Henry’s constant for air dissolved in waterin bar
+ydryair=Pdryair/H //mole fraction of air in the water
+printf("\n Hence, the mole fraction of air at the surface of lake is = %.7f . \n",ydryair);
\ No newline at end of file diff --git a/167/CH17/EX17.1/ex1.sce b/167/CH17/EX17.1/ex1.sce new file mode 100755 index 000000000..4f35810c5 --- /dev/null +++ b/167/CH17/EX17.1/ex1.sce @@ -0,0 +1,23 @@ +//ques1
+//Compression of High-Speed Air in an Aircraft
+clear
+clc
+//(a) the stagnation pressure at the compressor inlet (diffuser exit) can be determined from Eq. 17–5 in book
+//state 1
+T1=255.7;//Temperature in K
+V1=250;//velocity in m/s
+Cp=1.005;//specifc heat at const pressure in kJ/kg/K
+T01=T1+V1^2/(2*Cp)/1000;//divide 1000 to convert it into K
+//now from eqn 17-5
+P1=54.05;//pressure in kPa
+
+k=1.4;
+P01=P1*(T01/T1)^(k/(k-1));
+printf('(a) Pressure P01 = %.2f kPa \n',P01);
+
+//(b) To determine the compressor work
+r=8//P02/P01
+T02=T01*r^(1-1/k);//Temperature in K
+//Disregarding potential energy changes and heat transfer, the compressor work per unit mass of air is determined from Eq. 17–8
+Win=Cp*(T02-T01);//Work input in kJ/kg
+printf(' (b) Work input = %.1f kJ/kg \n',Win);
diff --git a/167/CH17/EX17.16/ex16.sce b/167/CH17/EX17.16/ex16.sce new file mode 100755 index 000000000..2eba395b0 --- /dev/null +++ b/167/CH17/EX17.16/ex16.sce @@ -0,0 +1,63 @@ +//ques16
+//Steam Flow through a Converging–Diverging Nozzle
+clear
+clc
+P01=2;//inlet stagnation pressure in MPa
+Pt=0.546*P01;//throat pressure in MPa
+//at inlet
+P1=2;//inlet pressure in MPa
+T1=400;//Inlet Temp in C
+T01=T1;//stagnation temp in K
+//from tables
+h1=3248.4;//enthalpy in kJ/kg
+h01=h1;//stagnation enthalpy in kJ/kg
+s1=7.1292;//entropy in kJ/kg.K
+st=s1;//stagnation in kJ/kg.K
+s2s=s1;//entropy at state 2s n kJ/kg.K
+//Also, at the throat
+Pt=1.09;//pressure in MPa
+st=7.1292;//entropy in kJ/kg.K
+//from tables
+ht=3076.8;//enthalpy in kJ/kg
+vt=0.24196;//m^3/kg
+//now throat velocity is determined as
+Vt=sqrt(2*(h01-ht)*1000);//throat velocity
+//The flow area at the throat is determined from the mass flow rate relation
+ms=2.5;//mass flow rate in kg/s
+At=ms*vt/Vt;//area in m^2
+printf('(a) Flow area at throat = %.2f cm^2 \n',At*10000);
+//At state 2s,
+P2s=300;//presure in kPa
+P2=P2s;//kPa
+//from table
+h2s=2783.6;//enthalpy at state 2s in kJ/kg
+//from the enthalpy of the steam at the actual exit state is (see Chap. 7) formulae
+n=0.93;
+h2=h01-n*(h01-h2s);//enthalpy at state 2 in kJ/kg
+//now from table
+v2=0.67723;//m^3/kg
+s2=7.2019;//entropy in kJ/kg.K
+// the exit velocity and the exit area
+V2=sqrt(2*(h01-h2)*1000);//Exit velocity in m^2
+A2=(ms*v2)/V2;
+printf(' Exit area = %.2f cm^2 \n',A2*10000);
+//(b)
+//c=(dP/d(1/v))^(1/2)
+//The velocity of sound at the throat is determined by evaluating the specific volume at St = 7.1292 kJ/kg · K and at pressures of 1.115 and 1.065 MPa
+Pa=1115;//kPa
+Pb=1065;//kPa
+va=0.23776;//m^3/kg
+vb=0.24633;//m^3/kg
+c=sqrt((Pa-Pb)/(1/va-1/vb)*1000);//velocity of sound at throat
+V=585.8;//velocity in m/s
+Ma=V/c;
+printf(' (b) Mach number at the throat = %.3f \n',Ma);
+//The velocity of sound and the Mach number at the nozzle exit are determined by evaluating the specific volume at St= 7.2019 kJ/kg · K and at pressures of 325 and 275 kPa
+Pa=325;//kPa
+Pb=275;//kPa
+va=0.63596;//m^3/kg
+vb=0.72245;//m^3/kg
+c=sqrt((Pa-Pb)/(1/va-1/vb)*1000);
+V=929.8;//Velocity
+Ma=V/c;
+printf(' Mach number at nozel exit = %.3f ',Ma);
diff --git a/167/CH17/EX17.2/ex2.sce b/167/CH17/EX17.2/ex2.sce new file mode 100755 index 000000000..56f60b8a9 --- /dev/null +++ b/167/CH17/EX17.2/ex2.sce @@ -0,0 +1,14 @@ +//ques2
+//Mach Number of Air Entering a Diffuser
+clear
+clc
+//(a) The speed of sound in air at 30°C is determined as
+k=1.4;
+R=0.287;//gas constant
+T=303;//air temperature in K
+c=sqrt(k*R*T*1000);//speed of light in m/s
+printf('(a) speed = %.0f m/s \n',c);
+//(b) Mach Mumber
+V=200;//speed in m/s
+Ma=V/c;
+printf(' (b) Mach number = %.3f ',Ma);
diff --git a/167/CH17/EX17.3/ex3.sce b/167/CH17/EX17.3/ex3.sce new file mode 100755 index 000000000..2d2559dbd --- /dev/null +++ b/167/CH17/EX17.3/ex3.sce @@ -0,0 +1,30 @@ +//ques3
+//Gas Flow through a Converging–Diverging Duct
+clear
+clc
+Cp=0.846;//specific heat at constant pressure in kJ/kg/K
+R=0.1889;//gas constant for substance
+T0=473;//temp at state 0 in K
+T1=T0;//temp at state 1 in K
+P0=1400;//pressure at state 0 in kPa
+P1=P0;//pressure at state 1 in kPa
+//from Eqn 17-5
+P=1200;//pressure in kPa
+k=1.289;
+T=T0*(P/P0)^(1-1/k);//Temp in K
+//from Eqn 17-4
+T=457;//K
+V=sqrt(2*Cp*(T0-T)*1000);//velocity in m/s
+printf('Velocity = %.1f m/s \n',V);
+//From the ideal-gas relation,
+d=P/(R*T);
+printf(' Density = %.1f kg/m^3 \n',d);
+//From the mass flow rate relation,
+ms=3;//mass flow in kg/s
+A=ms/(d*V);//area in m^2
+printf(' Area = %.1f cm^2 \n',A*10000);
+//speed
+k=1.289;
+c=sqrt(k*R*T*1000);//speed in m/s
+Ma=V/c;
+printf(' Mach number = %.3f ',Ma);
diff --git a/167/CH17/EX17.4/ex4.sce b/167/CH17/EX17.4/ex4.sce new file mode 100755 index 000000000..614a6ff98 --- /dev/null +++ b/167/CH17/EX17.4/ex4.sce @@ -0,0 +1,12 @@ +//ques4
+//Critical Temperature and Pressure in Gas Flow
+clear
+clc
+k=1.289;
+T0=473;//Temp at in K
+Tx=T0*2/(k+1);//Temp in K
+P0=1400//pressure in kPa
+Px=P0*(2/(k+1))^(k/(k-1));//Pressure in kPa
+printf('T* = %.0f K \n',Tx);
+printf(' P* = %.0f kPa \n',Px);
+
diff --git a/167/CH17/EX17.5/ex5.sce b/167/CH17/EX17.5/ex5.sce new file mode 100755 index 000000000..6b5daafee --- /dev/null +++ b/167/CH17/EX17.5/ex5.sce @@ -0,0 +1,33 @@ +//ques5
+//Effect of Back Pressure on Mass Flow Rate
+clear
+clc
+T=873;//Temperature in K
+V=150;//velocity in m/s
+Cp=1.005;//specific heat at constant pressure in kJ/kg.K
+T0=T+V^2/(2*Cp)/1000;//Temperaure in K
+P=1;//pressure in MPa
+k=1.4;
+P0=P*(T0/T)^(k/(k-1));//pressure in MPa
+//The critical-pressure ratio is determined from Table 17–2 (or Eq. 17–22) to be P*/P=0.5283
+Pb=0.7;//back pressure in MPa
+Rbw=Pb/P0;//back pressure ratio
+//which is greater than the critical-pressure ratio, 0.5283. Thus the exit plane pressure (or throat pressure P) is equal to the back pressure in this case
+//From Table A–32 Pt/P0=0.670 and Tt/T0=0.892
+T0=884;//Temperature in K
+Tt=0.892*T0;//Temp in K
+Pt=700;//kPa
+R=0.287;
+dt=Pt/(R*Tt);//density in kg/m^3
+Ma=0.778;//Mach no
+k=1.4;
+Vt=Ma*sqrt(k*R*Tt*1000);//Velocity in m/s
+At=50*10^-4;;//area in m^2
+ms=dt*At*Vt;
+printf('(a) Mass flow rate = %.2f kg/s \n',ms);
+//(b)
+Pb=400;//kPa
+P0=1045;//kPa
+Rbp=Pb/P0;//The back pressure ratio
+ms=At*P0*sqrt(k/(R*T0)*1000)*((2/(k+1))^((k+1)/(2*(k-1))));//multiply by 1000 to convert it into kg/s
+printf(' (b) Mass flow rate = %.2f kg/s \n',ms);
diff --git a/167/CH17/EX17.7/ex7.sce b/167/CH17/EX17.7/ex7.sce new file mode 100755 index 000000000..e69ce9010 --- /dev/null +++ b/167/CH17/EX17.7/ex7.sce @@ -0,0 +1,36 @@ +//ques7
+//Airflow through a Converging Diverging Nozzle
+clc
+P0=1000;//pressure in kPa
+R=0.287;
+T0=800;//Temperature in K
+d0=P0/(R*T0);//density in kg/m^3
+//(a) At the throat of the nozzle Ma = 1, and from Table A–32
+//throat conditions
+Px=P0*0.5283;//pressure in kPa
+Tx=T0*0.8333;//temperature in K
+dx=d0*0.6339;//density in kg/m^3
+printf('(a) P* = %.4f kPa \n',Px);
+printf(' T* = %.1f K \n',Tx);
+printf(' d* = %.3f kg/m^3 \n',dx);
+k=1.4;
+Vx=sqrt(k*R*Tx*1000);
+printf(' V* = %.1f m/s \n',Vx);
+//Since the flow is isentropic, the properties at the exit plane can also be calculated by using data from Table A–32. For Ma = 2
+Pe=0.1278*P0;//MPa
+Te=0.5556*T0;//K
+de=0.23*d0;//density in kg/m^3
+Ax=20;//cm^2
+Ae=1.6875*Ax;//cm^2
+Mae=2;
+Maex=1.633;
+Ve=Maex*Vx;//m/s
+printf(' (b) Pe = %.4f kPa \n',Pe);
+printf(' Te = %.1f K \n',Te);
+printf(' de = %.3f kg/m^3 \n',de);
+printf(' Ae = %.2f cm^2 \n',Ae);
+printf(' Ve = %.1f m/s \n',Ve);
+
+//(c)
+ms=dx*Ax*Vx*10^-4;
+printf(' (c) Mass flow rate = %.2f kg/s \n',ms);
\ No newline at end of file diff --git a/167/CH17/EX17.9/ex9.sce b/167/CH17/EX17.9/ex9.sce new file mode 100755 index 000000000..0e567edbc --- /dev/null +++ b/167/CH17/EX17.9/ex9.sce @@ -0,0 +1,33 @@ +//ex9
+//Shock Wave in a Converging–Diverging Nozzle
+clear
+clc
+//fluid property at exi nozzle
+P01=1;//pressure in MPa
+P1=0.1278;//pressure in MPa
+T1=444.5;//temperature in K
+d1=1.002;//density in Kg/m^3
+//The fluid properties after the shock (denoted by subscript 2) are related to those before the shock through the functions listed in Table A–33
+Ma1=2;
+Ma2=0.5774;
+P02=0.7209*P01;//stagnation pressure in MPa
+P2=4.5*P1;//Static Pressure in MPa
+T2=1.6875*T1;//Static Pressure in K
+d2=2.6667*d1;//Static Pressure n kg/m^3
+
+printf('(a) Stagnation pressure = %.0f MPa \n',P02);
+printf(' Static PRessure = %.4f MPa \n',P2);
+printf(' Static Temperature = %.1f K \n',T2);
+printf(' static density = %.2f kg/m^3 \n',d2);
+//(b)
+R=0.287;
+Cp=1.005;//specific heat at constant pressure in kJ/kg.K
+S=Cp*log(T2/T1)-R*log(P2/P1);//entropy change in kJ/kg.K
+printf(' (b) The entropy change across the shock = %.4f kJ/kg.K \n',S);
+//(c)
+k=1.4;
+V2=Ma2*sqrt(k*R*T2*1000);
+printf(' (c) Air velocity,V2 = %.0f m/s \n',V2);
+ms=2.86;//same as previous example
+printf(' (d) Mass Flow rate = %.2f kg/sec \n',ms);
+
diff --git a/167/CH2/EX2.1/ex1.sce b/167/CH2/EX2.1/ex1.sce new file mode 100755 index 000000000..866f0fbca --- /dev/null +++ b/167/CH2/EX2.1/ex1.sce @@ -0,0 +1,13 @@ +// example 1
+// general energy analysis
+clear
+clc
+d=0.75 //density of gasoline in kg/l
+v=5 //average consumption of gasoline by the car in litres/day
+h=44000 //heating value of gasoline in kJ/kg
+disp('daily consumption of fuel = c = d*v ')
+c=d*v //average consumption of gasoline in kg/day
+e=c*h //daily energy requirement of car in kJ/day
+E=0.1*6.73*10^10 //energy released by complete fussion of 0.1 kg of uranium in kJ
+x=E/e //no. of days for which E amount of energy can meet the energy requirements of car
+printf("\n Hence, the car will require refilling after = %.0f years. \n",x/365);
\ No newline at end of file diff --git a/167/CH2/EX2.10/ex10.sce b/167/CH2/EX2.10/ex10.sce new file mode 100755 index 000000000..1dbdfb4a2 --- /dev/null +++ b/167/CH2/EX2.10/ex10.sce @@ -0,0 +1,11 @@ +//example 10
+// cooling of hot fluid in tank
+clear
+clc
+disp('suppose that there is no change in kinetic and potential energy ')
+u1=800 //initial internal energy in 800kJ
+win=100 //work done by paddle on system in kJ
+qout=500 //loss of energy from fluid
+disp('applying first law of thermodynamics ')
+u2=u1-qout+win //final internal energy in kJ
+printf("\n Hence,final internal energy of the fluid is = %.1f kJ. \n",u2);
\ No newline at end of file diff --git a/167/CH2/EX2.11/ex11.sce b/167/CH2/EX2.11/ex11.sce new file mode 100755 index 000000000..7163b2b3c --- /dev/null +++ b/167/CH2/EX2.11/ex11.sce @@ -0,0 +1,9 @@ +//example 11
+// acceleration of air by fan
+clear
+clc
+v=8 //discharge rate of air in m/s
+m=0.25 //mass flow rate in kg/s
+p=m*v^2/2 //actual power consumed in W
+P=20 //claimed power in W
+disp('since,two powers are not equal,this claim is not reasonable ')
\ No newline at end of file diff --git a/167/CH2/EX2.12/ex12.sce b/167/CH2/EX2.12/ex12.sce new file mode 100755 index 000000000..f82be8d3a --- /dev/null +++ b/167/CH2/EX2.12/ex12.sce @@ -0,0 +1,10 @@ +//example 12
+//heating effect of a fan
+clear
+clc
+t1=25 //initial temperature of room in C
+p=200 //power consumption of fan in watts
+a=30 //exposed surface area in m^2
+u=6 //in w/m^2
+t2=p/(u*a)+t1 //final temp. of room in C
+printf("\n Hence, the indoor air temperature when steady operating conditions are established is = %.1f C. \n",t2);
\ No newline at end of file diff --git a/167/CH2/EX2.13/ex13.sce b/167/CH2/EX2.13/ex13.sce new file mode 100755 index 000000000..4863d7715 --- /dev/null +++ b/167/CH2/EX2.13/ex13.sce @@ -0,0 +1,11 @@ +//example 13
+// annual lighting cost of a classroom
+clear
+clc
+p=80 //power consumed by fluoroscent lamp in watt
+n=30 //no. of lamps used
+P=p*n/1000 //lighting power in kW
+t=250*12 //operating hours in a year
+E=P*t //lighting energy/year
+c=E*0.07 //cost of lighting a classroom for a year in dollars
+printf("\n Hence,annual energy cost of lighting for the classroom is = %.0f $/year. \n",c);
\ No newline at end of file diff --git a/167/CH2/EX2.15/ex15.sce b/167/CH2/EX2.15/ex15.sce new file mode 100755 index 000000000..8ee85588c --- /dev/null +++ b/167/CH2/EX2.15/ex15.sce @@ -0,0 +1,13 @@ +//example 15
+//cost of cooking with electric and gas charges
+clear
+clc
+e1=73 //efficiency of open burner for electric units
+e2=38 //efficiency of open burner for gas units
+E1=2 //Electrical energy input in 2kW
+q1=E1*e1/100 //actually utilised electrical energy in kWh
+c=0.09/0.73 //cost of utilised energy per kWh
+q2=q1/(e2/100) //energy input to a gas burner in kW
+c=(0.55/29.3)/(e2/100) //cost of utilised energy of gas burner
+printf("\n Hence,rate of energy consumption by the burner is = %.2f kW. \n",q2);
+printf("\n The cost of utilised energy is = $ %.3f /kWh. \n",c);
\ No newline at end of file diff --git a/167/CH2/EX2.16/ex16.sce b/167/CH2/EX2.16/ex16.sce new file mode 100755 index 000000000..ff6004d57 --- /dev/null +++ b/167/CH2/EX2.16/ex16.sce @@ -0,0 +1,18 @@ +// example 16
+// performance of hydraulic turbine generator
+clear
+clc
+h=50 //depth of lake in metres
+m=5000 // mass flow rate of water in kg/s
+g=9.81 //acc. due to gravity in m/s^2
+disp('change in mechanical energy= ')
+e=g*h/1000 //change in mech. energy in kJ/kg
+E1=e*m //Rate at which mechanical energy is supplied to the turbine in kW
+E2=1862 //electric power generated in kW
+n1=E2/E1 //overall efficiency
+n2=0.95 //efficiency of generator
+n3=n1/n2 //efficiency of turbine
+W=n3*E1 //shaft power output in kW
+printf("\n Hence,overall efficiency of turbine generator is = %.2f. \n",n1);
+printf("\n The mechanical efficiency of the turbine is = %.2f. \n",n3);
+printf("\n The shaft power supplied by the turbine to the generator is =%.0f kW.\n",W)
\ No newline at end of file diff --git a/167/CH2/EX2.17/ex17.sce b/167/CH2/EX2.17/ex17.sce new file mode 100755 index 000000000..f03cf072a --- /dev/null +++ b/167/CH2/EX2.17/ex17.sce @@ -0,0 +1,15 @@ +//example 17
+//Cost Savings Associated with High-Efficiency motors
+clear
+clc
+n1=89 //efficiency of first motor
+n2=93.2 //efficiency of second motor
+c=0.08 //cost of electricity in $/kWh
+p=60*0.7457 //rated power in kW
+h=3500 //operating hours per year
+e=p*h*(1/(n1/100)-1/(n2/100)) //energy savings
+s=e*c //cost savings
+t=640/s //simple payback period in year
+printf("\n Hence,the amount of energy saved is = %.0f kWh/year. \n",e);
+printf("\n The money saved is =%.0f $/year. \n",s);
+printf("\n The payback period is=%.2f years.\n",t);
\ No newline at end of file diff --git a/167/CH2/EX2.18/ex18.sce b/167/CH2/EX2.18/ex18.sce new file mode 100755 index 000000000..01de4c433 --- /dev/null +++ b/167/CH2/EX2.18/ex18.sce @@ -0,0 +1,11 @@ +//example 18
+//reducing air pollution by geothermal heating
+clear
+clc
+s=18*10^6 //quantity of natural gas that will be saved per year in therms
+nn=0.0047 //quantity of NOx in kg/therm
+nc=6.4 //quantity of CO2 in kg/therm
+sn=nn*s //NOx savings per year in kg/year
+sc=nc*s //CO2 savings per year in kg/year
+printf("\n Hence,geothermal system will save %.1f *10^4 kg NOx/year. \n",sn/10^4);
+printf("\n and = %.1f *10^8 kg CO2/year. \n",sc/10^8);
\ No newline at end of file diff --git a/167/CH2/EX2.19/ex19.sce b/167/CH2/EX2.19/ex19.sce new file mode 100755 index 000000000..c57957787 --- /dev/null +++ b/167/CH2/EX2.19/ex19.sce @@ -0,0 +1,12 @@ +// example 19
+// heat transfer from a person
+clear
+clc
+T1=20 //room temperature in celsius
+T2=29 //body temperature of person in celsius
+a=1.6 //exposed surface area in m^2
+h=6 //convection heat transfer coefficient in W/m^2*C
+Qc=h*a*(T2-T1) //heat loss due convection in W
+Qr=0.95*5.67*10^-8*a*((T2+273)^4-(T1+273)^4) //heat loss due to radiation in W
+Q=Qc+Qr //net heat loss from the person in W
+printf("\n Hence,the total rate of heat transfer is =%.1f W. \n",Q)
\ No newline at end of file diff --git a/167/CH2/EX2.2/ex2.sce b/167/CH2/EX2.2/ex2.sce new file mode 100755 index 000000000..d705ef687 --- /dev/null +++ b/167/CH2/EX2.2/ex2.sce @@ -0,0 +1,13 @@ +//example 2
+//analysis of wind energy
+clear
+clc
+v=8.5 //velocity of wind in m/s
+e=v^2/2 //wind energy per unit mass of air in j/kg
+m=10 //mass of wind to be considered in kg
+E=m*e //energy in joules of wind of mass m
+mf=1154 //mass flow rate in kg/s
+Ef=mf*e //wind energy in W for a mass flow rate of mf
+printf("\n Hence,wind energy per unit mass is = %.1f J/kg. \n",e);
+printf("\n The wind energy for a mass of 10 kg is = %.0f J. \n",E);
+printf("\n The wind energy for flow rate of 1154 kg/s is = %.1f kW. \n",Ef/1000);
\ No newline at end of file diff --git a/167/CH2/EX2.7/ex7.sce b/167/CH2/EX2.7/ex7.sce new file mode 100755 index 000000000..da998c3b9 --- /dev/null +++ b/167/CH2/EX2.7/ex7.sce @@ -0,0 +1,9 @@ +// example 7
+// Power Transmission by the Shaft of a Car
+clear
+clc
+t=200 //torque applied in N.m
+rpm=4000 //revolutions per minute of shaft
+n=rpm/60 //revolutions per second of shaft
+w=2*%pi*n*t // shaft power in watts
+printf("\n Hence,power transmitted by the shaft of car is = %.1f kW. \n",w/1000);
\ No newline at end of file diff --git a/167/CH2/EX2.8/ex8.sce b/167/CH2/EX2.8/ex8.sce new file mode 100755 index 000000000..4d1a72ca2 --- /dev/null +++ b/167/CH2/EX2.8/ex8.sce @@ -0,0 +1,11 @@ +// example 8
+// Power Needs of a Car to Climb a Hill
+clear
+clc
+m=1200 //mass of car in kg
+v1=90 //velocity of car in km/h
+v2=90*5/18 //velocity of car in m/s
+x=30 //slope of hill in degrees
+g=9.8 //acc. due to gravity in m/s^2
+w=m*g*v2*sin(%pi*30/180) //additional power to be delivered by engine in watts
+printf("\n Hence,additional power to be delivered by engine is = %.0f kW. \n",w/1000);
\ No newline at end of file diff --git a/167/CH2/EX2.9/ex9.sce b/167/CH2/EX2.9/ex9.sce new file mode 100755 index 000000000..df96cf50b --- /dev/null +++ b/167/CH2/EX2.9/ex9.sce @@ -0,0 +1,11 @@ +// example 9
+// power needs of a car to accelerate
+clear
+clc
+m=900 //mass ofcar in kg
+v1=0 //initial velocity of car
+v2=80*5/18 //final velocity of car in m/s
+t=20 //time in which the car has to reach its desired speed in seconds
+w=m*(v2^2-v1^2)/2 //work required to accomplish this task in joules
+p=w/t // power required in watts
+printf("\n Hence,power required to accelerate is = %.1f kW. \n",p/1000);
\ No newline at end of file diff --git a/167/CH3/EX3.1/ex1.sce b/167/CH3/EX3.1/ex1.sce new file mode 100755 index 000000000..0d3b3ea61 --- /dev/null +++ b/167/CH3/EX3.1/ex1.sce @@ -0,0 +1,9 @@ +//ex1
+//Pressure of Saturated Liquid in a Tank
+clc
+Psat=70.183;//saturated pressure @90C using steam table A-4 in kPa
+printf('From steam table Psat @ 90 C = %.3f kPa',Psat);
+vsat=0.001036;//saturated specific volume @90C in m^3/Kg
+m=50;//mass in kg
+V=m*vsat;//Volume of tank in m^3
+printf('\n Total Volume of Tank = %.4f m^3',V);
diff --git a/167/CH3/EX3.10/ex10.sce b/167/CH3/EX3.10/ex10.sce new file mode 100755 index 000000000..85e05d470 --- /dev/null +++ b/167/CH3/EX3.10/ex10.sce @@ -0,0 +1,13 @@ +//ques10
+//Mass of Air in a Room
+clc
+l=4;//length in metres
+b=5;//breadth in metres
+h=6;//height in metres
+V=l*b*h;//volume in m^3
+P=100;//Pressure in kPa
+R=0.287;//Gas constant for a given gas in kPa.m^3/Kg.k
+T=298;//Temp in K
+m=P*V/(R*T);//mass in Kg
+printf('Mass =P*V/(R*T)= %.1f kg',m);
+
diff --git a/167/CH3/EX3.11/ex11.sce b/167/CH3/EX3.11/ex11.sce new file mode 100755 index 000000000..186fdce72 --- /dev/null +++ b/167/CH3/EX3.11/ex11.sce @@ -0,0 +1,22 @@ +//ques11
+//The Use of Generalized Charts
+clear
+clc
+//(a)specific volume using ideal gas equation of state
+R=0.0815;//gas constant for given substance in kPa.m^3/Kg.K
+Pcr=4.059;//Critical Pressure in MPa
+Tcr=374.2;//Critical Temp in K
+T=323;//Temp in K
+P=1000;//Pressure in kPa
+v=R*T/P;//Specific Volume in m^3/Kg
+printf('\n(a) Specific Volume = %.6f m^3/kg ',v);
+er=(v-0.021796)/0.021796;//error
+printf('\n Error = %.3f',er);
+//(b) specific volume using chart
+Pr=P/Pcr;//reduced pressure
+Tr=T/Tcr;//reduced Temperature
+Z=0.84;//from compressibility chart
+Videal=Z*v;//Ideal Volume in m^3/kg
+printf('\n(b) Ideal volume = %.6f m^3/kg ',Videal);
+er=(Videal-0.021796)/0.021796;//error
+printf('\n Error = %.3f',er);
\ No newline at end of file diff --git a/167/CH3/EX3.12/ex12.sce b/167/CH3/EX3.12/ex12.sce new file mode 100755 index 000000000..fee809129 --- /dev/null +++ b/167/CH3/EX3.12/ex12.sce @@ -0,0 +1,23 @@ +//ques12
+//Using Generalized Charts to Determine Pressure
+clc
+//(a)
+R=0.5956;//Gas constant for a given substance in psia.ft^3/lbm.R
+Pcr=3200;//Critical Pressure in psia
+Tcr=1164.8;//Critical Temp in R
+v=0.51431;//specific volume in ft^3/lbm
+T=600;//Temperature in F
+//so
+P=1000;//Pressure in psia from Table A-6E
+printf('\n(a) Pressure at a specified state = %.0f psia',P);
+//(b)
+T=1060;//Temperature in F
+P=R*T/v;//Pressure in psia
+printf('\n(b)Pressure of the steam under specified condition = %.0f psia',P);
+//(c)using generalised compressibility chart
+Vr=v*Pcr/(R*Tcr/Pcr);//reduced volume
+Tr=T/Tcr;//reduced temperature
+//so
+Pr=0.33;//from compressibility chart
+P=Pr*Pcr;//final Pressure in psia
+printf('\n(c) Pressure(using generalised compressibility chart) = %.0f psia ',P);
diff --git a/167/CH3/EX3.13/ex13.sce b/167/CH3/EX3.13/ex13.sce new file mode 100755 index 000000000..3ae3140f6 --- /dev/null +++ b/167/CH3/EX3.13/ex13.sce @@ -0,0 +1,29 @@ +//ex13
+//Different Methods of Evaluating Gas Pressure
+clear
+clc
+T=175//temp in K
+v=0.00375//specific volume in m^3/kg
+//(a)ideal gas equation of state
+// data from table A-1
+R=0.2968//gas constant for a given gas in kPa.m^3/kg.K
+P=R*T/v;//Pressure in kPa
+printf('\n(a) Pressure from Ideal gas equation = %.0f kPa \n',P);
+//(b)van der waals equation
+//a and b are van der waals constant
+a=0.175;//m^6.kPa/Kg^2
+b=0.00138;//m^3/Kg
+P=R*T/(v-b)-a/v^2;//pressure in kPa
+printf('(b) Pressure from van der waals equation = %.0f kPa \n',P);
+//(c)Beattie-Bridgeman equation
+A=102.29//constant
+B=0.05378//constant
+c=4.2*10^4;//constant
+Ru=8.314;//universal gas constant value
+MM=28.013//molecular Mass of substance
+v=0.00375//specific volume in Kg/m^3
+V=MM*v//Volume in m^3
+
+P=Ru*T/V^2*(1-c/(V*T^3))*(V+B)-A/V^2;//pressure in KPa
+printf('(c) Pressure from Beattie-Bridgeman equation = %.0f kPa \n',P);
+
diff --git a/167/CH3/EX3.14/ex14.sce b/167/CH3/EX3.14/ex14.sce new file mode 100755 index 000000000..c2425a6ea --- /dev/null +++ b/167/CH3/EX3.14/ex14.sce @@ -0,0 +1,12 @@ +//ques14
+//Temperature Drop of a Lake Due to Evaporation
+clear
+clc
+Psat=3.17//saturated pressure in kPa @ 25 C
+Pv1=0.1*Psat//pressure for 10% humidity in kPa
+Pv2=0.8*Psat//pressure for 80% humidity in kPa
+Pv3=1*Psat//pressure for 100% humidity in kPa
+T1=-8.0;//Temp in K
+T2=21.2;//Temp in K
+T3=25;//Temp in K
+printf( 'Corresponding Temperatures(in C) are(From table A-5) \n T1 = %.1f K \n T2 = %.1f K \n T3 = %.1f K ',T1,T2,T3 );
diff --git a/167/CH3/EX3.2/ex2.sce b/167/CH3/EX3.2/ex2.sce new file mode 100755 index 000000000..0d79e4035 --- /dev/null +++ b/167/CH3/EX3.2/ex2.sce @@ -0,0 +1,9 @@ +//ques2
+//Temperature of Saturated Vapor in a Cylinder
+clc
+Tsat=280.99;//Saturated temperature in F @ 50psia from table A-5E
+printf("Saturated Temperature = %.2f F \n",Tsat);
+v=8.5175;//vg saturated volume of vapor in ft^3/lbm table A-5E
+V=2;//Total Volume in ft^3
+m=V/v;//mass in lbm
+printf('Mass of the sample is = %.3f lbm ',m);
diff --git a/167/CH3/EX3.3/ex3.sce b/167/CH3/EX3.3/ex3.sce new file mode 100755 index 000000000..e19265773 --- /dev/null +++ b/167/CH3/EX3.3/ex3.sce @@ -0,0 +1,14 @@ +//ques3
+//Volume and Energy Change during Evaporation
+clc
+vg=1.6941; //saturated vapor specific volume from table A-5 @ 100kPa in m^3/Kg
+vf=0.001043;//saturated liquid specific volume from table A-5 @ 100kPa in m^3/Kg
+vfg=vg-vf;//in m^3/Kg
+m=0.2;//in kg
+//(a) Volume change
+dV=m*vfg;//Volume in m^3
+printf('(a) Volume change = %.4f m^3 \n',dV);
+//(b) Amount of energy Transfer to water
+hfg=2257.5;//change in enthalpy from table A-5 @ 100kPa in kJ/Kg
+E=m*hfg;//In kJ
+printf('(b) Energy Transferred = %.1f kJ',E);
diff --git a/167/CH3/EX3.4/ex4.sce b/167/CH3/EX3.4/ex4.sce new file mode 100755 index 000000000..1ad0ec3fa --- /dev/null +++ b/167/CH3/EX3.4/ex4.sce @@ -0,0 +1,16 @@ +//ques4
+//Pressure and Volume of a Saturated Mixture
+clc
+//(a) Pressure in the tank
+P=70.183;//Psat @ 90 C table A-4 in kPa
+printf("(a) Pressure in the tank = %.3f kPa ",P);
+//(b)volume of tank
+disp('(b)V = Vf+Vg = mf*vf+mg*vg');
+mf=8;//mass of liquid water in kg
+mg=2//mass of vapor water in kg
+vf=0.001036;//saturated specific volume of liquid water from table A-4 in m^3/Kg
+vg=2.3593;//saturated specific volume of vapor water from Table A-5 in m^3/Kg
+V=mf*vf+mg*vg;//Total Volume in m^3
+printf('Volume of tank = %.2f m^3',V);
+
+
diff --git a/167/CH3/EX3.5/ex5.sce b/167/CH3/EX3.5/ex5.sce new file mode 100755 index 000000000..e73dccd6c --- /dev/null +++ b/167/CH3/EX3.5/ex5.sce @@ -0,0 +1,23 @@ +//ques5
+//Properties of Saturated Liquid Vapour Mixture
+clc
+V=0.080;//volume in m^3 given
+m=4;//in kg given
+v=V/m;//in m^3/kg
+vf=0.0007437;//@160kPa from table A-4 in m^3/kg
+vg=0.12348;//@160kPa from table A-4 in m^3/kg
+//(a)Temperature
+Tsat=-15.60;//in C from table A-4
+printf('\n(a) Since vf<v<vg so saturated region, so temperature at saturated state = %.2f C \n',Tsat);
+//(b)Quality Factor
+x=(v-vf)/(vg-vf);
+printf('(b) Quality factor =%.3f \n',x);
+//(c) Enthalpy of refrigerant
+hf=31.21//from table A-12 @ 160kpa in kJ/kg
+hfg=209.90//from table A-12 @ 160kpa in kJ/kg
+h=hf+x*hfg;// n kJ/kg
+printf('(c) Enthalpy of refrigerant = %.1f kJ/kg \n',h);
+//(d) Volume occupied by phase
+mg=x*m//mass of vapour n kg
+Vg=mg*vg;//volume of vapour in m^3
+printf('(d) Volume of vapour =%.4f m^3 \n',Vg);
diff --git a/167/CH3/EX3.7/ex7.sce b/167/CH3/EX3.7/ex7.sce new file mode 100755 index 000000000..452ea37b2 --- /dev/null +++ b/167/CH3/EX3.7/ex7.sce @@ -0,0 +1,11 @@ +//ex6
+//Internal Energy of Superheated Vapor using linear interpolation
+clc
+disp('h1=2855.8 @ T1=200 C and h2=2961.0 @ T2=250 C and h=2890 lies in between these two so using linear interpolation we can get Temperature ');
+h1=2855.8;//Enthalpy at T1 in kJ/Kg
+T1=200;//temp in C
+h2=2961.0;//Enthalpy at T2 in kJ/Kg
+T2=250;//Temp T2 in C
+h=2890;//Enthalpy in kJ/kg at which temp is to be determined
+T=(T2-T1)/(h2-h1)*(h-h1)+T1;//Temp for given value of enthalpy in C
+printf('Temperature = %.1f C',T);
diff --git a/167/CH3/EX3.8/ex8.sce b/167/CH3/EX3.8/ex8.sce new file mode 100755 index 000000000..36415b4d4 --- /dev/null +++ b/167/CH3/EX3.8/ex8.sce @@ -0,0 +1,9 @@ +//ques8
+//Approximating Compressed Liquid as Saturated Liquid
+clc
+u1=333.82;//(a) internal energy in KJ/Kg @ P=5MPa and T=80 C from table A-7
+printf("\n(a) Data as from compress liquid table, u= %.2f kJ/kg\n",u1);
+u2=334.97;//(b)internal energy in KJ/Kg @80 C from table A-4
+printf("(b) Data as from saturated liquid table, u = %.2f kJ/kg",u2);
+er=(u2-u1)/u1*100;//(c) %age error
+printf('\n(c)Error involved = %.2f percent',er);
diff --git a/167/CH4/EX4.10/ex10.sce b/167/CH4/EX4.10/ex10.sce new file mode 100755 index 000000000..2842d8d32 --- /dev/null +++ b/167/CH4/EX4.10/ex10.sce @@ -0,0 +1,31 @@ +//ques10
+//Heating of a Gas at Constant Pressure
+clear
+clc
+//(a) The final temperature can be determined by using the ideal-gas relation b/w state 1 and 3
+P1=150//pressure at state 1 in kPa
+P3=350//pressure at state 2 in kPa
+T1=300//temperature at state 1 in K
+//V3=2*V1
+//T3=P3*V3/(P1*V1)*T1;
+T3=P3*2/P1*T1;//temperature at state 2 in K
+printf('(a) Final Temperature = %.0f K \n',T3);
+
+//(b) The work done is area under the process curve on P-V diagram
+V2=0.8//Volume at state 2 in m^3
+V1=0.4//volume at state 1 in m^3
+P2=350//pressure at state 2 in kPa
+W13=(V2-V1)*P2;//workdone for process 1-3 in kJ
+printf(' (b) Work Done = %.0f kJ \n',W13');
+
+//(c) Mass of the system can be determined by ideal gas equation
+R=0.287//gas constant for a given substance water in kJ/mol.K
+m=P1*V1/(R*T1)//mass in kg
+//from Table A-7
+u1=214.07//internal energy at state 1 in kJ/kg @300K
+u2=1113.52//internal energy at state 2 in kJ/kg @1400K
+//from energy equation
+Qout=140//heat output in kJ
+Qin=Qout+m*(u2-u1);//heat input in kJ
+printf(' (c) Heat input = %.0f kJ',Qin);
+
diff --git a/167/CH4/EX4.11/ex11.sce b/167/CH4/EX4.11/ex11.sce new file mode 100755 index 000000000..4bdff61fc --- /dev/null +++ b/167/CH4/EX4.11/ex11.sce @@ -0,0 +1,20 @@ +//ques11
+//Enthalpy of Compressed Liquid
+clear
+clc
+//the water exists as a compressed liquid at the specified state
+//(a) using compressed liquid table
+P=15000;//pressure in kPa
+T=100;//temperature in C
+h=430.39;//heat of water in kJ/kg from Table A-7
+printf('(a) Heat of water using compressed liquid table = %.2f kJ/kg \n',h);
+
+//(b) Approximating the compressed liquid as a saturated liquid at 100°C
+h=419.17;//heat of water at liquid state in kJ/Kg ie hf @ 100C
+printf(' (b) Heat of Water by approximating compressed liquid as saturated = %.2f kJ/kg \n',h);
+
+//(c) Using correction method
+vf=0.001//specific volume of water in saturated liquid state @100C
+Psat=101.42//saturated pressure in kPa from Table
+h=h+vf*(P-Psat)//corrected value of heat of water at given state in kJ/kg
+printf(' (c) Heat of water using correction method = %.2f kJ/kg ',h);
\ No newline at end of file diff --git a/167/CH4/EX4.12/ex12.sce b/167/CH4/EX4.12/ex12.sce new file mode 100755 index 000000000..a7a45c139 --- /dev/null +++ b/167/CH4/EX4.12/ex12.sce @@ -0,0 +1,17 @@ +//ques12
+//Cooling of an Iron Block by Water
+clear
+clc
+V=0.5//volume in m^3
+v=0.001//specific volume of water in m^3/Kg
+m=V/v//mass in kg
+//dUiron+dUwater=0 ie change in internal energy of system = 0
+//mi*Ci*(T2-T1i)+mw*Cw*(T2-T1w)=0
+mi=50//mass of ice in Kg
+mw=500//mass of water in Kg
+Ci=0.45//specific heat of ice in kJ/mol
+Cw=4.18//specific heat of water in kJ/mol
+T1i=80//initial temperature of ice in C
+T1w=25//initial temperature of water in C
+T2=(mi*Ci*T1i+mw*Cw*T1w)/(mi*Ci+mw*Cw);//final temperature of mixture in C
+printf(' Final temperature = %.1f C ',T2);
diff --git a/167/CH4/EX4.2/ex2.sce b/167/CH4/EX4.2/ex2.sce new file mode 100755 index 000000000..e8ec701e0 --- /dev/null +++ b/167/CH4/EX4.2/ex2.sce @@ -0,0 +1,11 @@ +//ques2
+//Boundary Work for a Constant Pressure Process
+clear
+clc
+m=10//mass in lbm
+P=60//pressure in psia
+//from table A-6 E
+v2=8.3548//specific volume at state 1 in Kg/m^3
+v1=7.4863//specific volume at state 2 in Kg/m^3
+w=integrate('m*P','v',v1,v2)/5.404; //divided by 5.404 to convert it into Btu
+printf('Work done by steam = %.2f Btu',w);
diff --git a/167/CH4/EX4.3/ex3.sce b/167/CH4/EX4.3/ex3.sce new file mode 100755 index 000000000..e5e3f33f4 --- /dev/null +++ b/167/CH4/EX4.3/ex3.sce @@ -0,0 +1,8 @@ +//ques3
+//Isothermal Compression of an Ideal Gas
+clc
+P1=100//Initial Pressure in kPa
+V1=0.4;//Initial Volume in m^3
+V2=0.1;//final Volume in m^3
+w=P1*V1*log(V2/V1);//work done for Isothermal process in kJ
+printf('Work done = %.1f kJ',w);
diff --git a/167/CH4/EX4.4/ex4.sce b/167/CH4/EX4.4/ex4.sce new file mode 100755 index 000000000..be1fa0418 --- /dev/null +++ b/167/CH4/EX4.4/ex4.sce @@ -0,0 +1,21 @@ +//ques4
+//Expansion of a Gas against a spring
+clear
+clc
+V1=0.05//initial volume in m^3
+V2=2*V1//final volume in m^3
+A=0.25//area of cross section in m^2
+k=150//spring constant in kN/m
+//(a)
+x=(V2-V1)/A//displacement of piston in m
+F=k*x//Spring force in kN
+P1=F/A//pressure in kPa due to piston
+Po=200//initial pressure in kPa
+P=P1+Po;//final pressure in kPa
+printf('\n(a) Final pressure = %.0f kPa\n',P);
+//(b)
+w=(Po+P)/2*(V2-V1);//in kJ
+printf('(b) Work done = %.0f kJ\n',w);
+//(c)
+wspring=(P-Po)/2*V1;
+printf('(c) Fraction of work done by spring = %.0f kJ\n',wspring);
diff --git a/167/CH4/EX4.5/ex5.sce b/167/CH4/EX4.5/ex5.sce new file mode 100755 index 000000000..6bfa4ab1a --- /dev/null +++ b/167/CH4/EX4.5/ex5.sce @@ -0,0 +1,23 @@ +//ques5
+//Electric Heating of a Gas at Constant Pressure
+clear
+clc
+V=120//voltage in V
+I=0.2//current in Ampere
+t=300//time in sec
+We=V*I*t/1000//work done in kJ
+//1-initial condition
+P1=400//kPa initial Pressure
+V1=0.5//Volume in m^3
+R=0.297//gas constant for water
+T1=300//Temp in K
+m=0.025;//mass in kg
+//(a) From Energy equation We-Qout=dH=m(h2-h1)
+// i.e. h2=(We-Qout)/(m)+h1
+//(b) Final Temperature
+Qout=3.7//heat out in kJ
+h1=2724.9//Initial Enthalpy in kJ/kg
+h2=(We-Qout)/(m)+h1;//final Enthalpy in kJ/kg
+//So from steam table A-6
+T2=200;//Temp in C for P2=300kPa and h2
+printf('Final Temperature T2 = %.0f C',T2);
diff --git a/167/CH4/EX4.7/ex7.sce b/167/CH4/EX4.7/ex7.sce new file mode 100755 index 000000000..0d0aa4849 --- /dev/null +++ b/167/CH4/EX4.7/ex7.sce @@ -0,0 +1,31 @@ +//ques7
+//Evaluation of the du of an Ideal Gas
+clear
+clc
+//(a) One way of determining the change in internal energy of air is to read the values at T1 and T2 from Table A–17 and take the difference
+u1=214.07;//internal energy in kJ @ 300K
+u2=434.78;//Internal energy in kJ @ 600K
+du=u2-u1;//Change in in internal energy in kJ
+printf('(a) Change in Internal Energy(from air data table ) = %.2f kJ \n',du);
+
+//(b) the functional form of the specific heat (Table A–2c)
+//constant
+a=28.11;
+b=0.1967*10^-2;
+c=0.4802*10^-5;
+d=-1.966*10^-9;
+Ru=8.314;//Universal gas constant
+//Cp=a+b*T+c*T^2+d*T^3;
+//Cv=Cp-Ru
+T1=300;//Initial Temp in K
+T2=600;//Final temp in K
+U=integrate('a-Ru+b*T+c*T^2+d*T^3','T',T1,T2);
+M=28.97;//molicular mass
+u=U/M;//specific internal energy in KJ/Kg
+printf(' (b) Change in Internal Energy using functional form of the specific heat = %.2f kJ\n',u);
+
+//(c)the average specific heat value (Table A–2b)
+Tavg=(T1+T2)/2;//avg temp in K
+Cv=0.733;//heat capacity at constant volume in kJ/K @Tavg from Table-2A
+u=Cv*(T2-T1);//average change in internal energy in kJ/kg
+printf(' (c) Change in Internal Energy using avg specific heat value = %.2f kJ/kg ',u);
\ No newline at end of file diff --git a/167/CH4/EX4.8/ex8.sce b/167/CH4/EX4.8/ex8.sce new file mode 100755 index 000000000..c5da935d4 --- /dev/null +++ b/167/CH4/EX4.8/ex8.sce @@ -0,0 +1,22 @@ +//ques8
+//Heating of a Gas in a Tank by Stirring
+clear
+clc
+//(a)Final Temp
+w=0.02//power in hp
+t=0.5//time in hour
+W=w*t*2545//paddle wheel work in Btu
+//As W=m*Cavg*(T2-T1) ie T2=W/(m*Cavg)+T1
+m=1.5//mass in lbm
+T1=80//temperature in F
+Cavg=0.753//average specific heat at constt volume in Btu/F
+T2=W/(m*Cavg)+T1;//Temp in F
+printf('(a) Temperature = %.1f F\n',T2);
+
+//(b)The final pressure is determined from the ideal-gas relation
+//P1V1/T1=P2V2/T2 temperature in rankine or kelvin
+T1=T1+460//converted to R
+T2=T2+460//converted to R
+P1=50//preesure at 1st state in psia
+P2=P1*T2/T1;//final Pressure in psia
+printf(' (b) Final Pressure = %.1f psia',P2);
diff --git a/167/CH5/EX5.1/ex1.sce b/167/CH5/EX5.1/ex1.sce new file mode 100755 index 000000000..64219a662 --- /dev/null +++ b/167/CH5/EX5.1/ex1.sce @@ -0,0 +1,14 @@ +//example 1
+// water flow through garden hose nozzle
+clear
+clc
+t=50 //time taken to fill the bucket in seconds
+v=10 //volume of bucket in gallon
+V=v*3.7854/t //volume flow rate in litres/second
+d=1 //density of water in kg/l
+M=V*d //mass flow rate in kg/s
+A=%pi*(0.4)^2*10^-4 //area of exit in m^2
+v1=V/(A*1000) //average velocity of water at exit in m/s
+printf("\n Hence, the volume flow rate of water through the hose is = %.3f L/s. \n",V);
+printf("\n The mass flow rate through the hose is = %.3f kg/s. \n",M);
+printf("\n The average velocity of water at the nozzle exit is = %.1f m/s. \n",v1);
\ No newline at end of file diff --git a/167/CH5/EX5.10/ex10.sce b/167/CH5/EX5.10/ex10.sce new file mode 100755 index 000000000..1d5c5fb50 --- /dev/null +++ b/167/CH5/EX5.10/ex10.sce @@ -0,0 +1,19 @@ +//example 10
+//cooling of refrigant 134-a by water
+clear
+clc
+disp('We take the entire heat exchanger as the system. This is a control volume since mass crosses the system boundary during the process.')
+disp('For each fluid stream since there is no mixing. Thus, m1=m2=mh and m3=m4=mr')
+mr=6 //mass flow rate of R-134a in kg/min
+h1=62.982 //specific enthalpy of water in kJ/kg
+h2=104.83 //specific enthalpy of water in kJ/kg
+P3=1 //pressure of R-134a at inlet in MPa
+T3=70 //temperature of R-134a at inlet in Celsius
+h3=303.85 //specific enthalpy corresponding to P3,T3 in kJ/kg
+P4=1 //pressure of R-134a at exit in MPa
+T4=35 // temp. of R-134a at exit in Celsius
+h4=100.87 // corresponding to P4,T4 in kJ/kg
+mw=mr*(h4-h3)/(h1-h2) //mass flow rate of the cooling water in kg/min
+qin=mw*(h2-h1) //the heat transfer rate from the refrigerant to water in kJ/min
+printf("\n Hence,mass flow rate of the cooling water required is = %.1f kg/min. \n",mw);
+printf("\n Heat transfer rate from refrigerant to water is = %.0f kJ/min. \n",qin);
\ No newline at end of file diff --git a/167/CH5/EX5.11/ex11.sce b/167/CH5/EX5.11/ex11.sce new file mode 100755 index 000000000..ec348a7df --- /dev/null +++ b/167/CH5/EX5.11/ex11.sce @@ -0,0 +1,15 @@ +//example 11
+// electric heating of air in house
+clear
+clc
+T1=290 //Initial temp. of air in K
+P1=100 //Initial pressure of air in kPa
+R=0.287 //Gas constant in KPa*m^3/kg-K
+V1=R*T1/P1 //Initial specific volume of air in m^3/kg
+v1=150 //volume flow rate in m^3/min
+m=v1/(V1*60) //mass flow rate in kg/s
+win=15 //Power of Electric heating system in kJ/s
+qout=0.2 //heat lost from air to surroundings in kJ/s
+cp=1.005 //heat capacity in kJ/kg-C
+T2=(win-qout)/(m*cp)+(T1-273) //Exit temp. of air in C
+printf("\n Hence,the exit temp. of air is = %.1f C. \n",T2);
\ No newline at end of file diff --git a/167/CH5/EX5.12/ex12.sce b/167/CH5/EX5.12/ex12.sce new file mode 100755 index 000000000..01022a0b4 --- /dev/null +++ b/167/CH5/EX5.12/ex12.sce @@ -0,0 +1,16 @@ +//example 12
+//charging of rigid tank by system
+clear
+clc
+disp('This process can be analyzed as a uniform-flow process since the properties of the steam entering the control volume remain constant during the entire process.')
+disp('We take the tank as the system. This is a control volume since mass crosses the system boundary during the process.We observe that this is an unsteady-flow process since changes occur within the control volume')
+m1=0 //since system is initially evacuated
+disp('The properties of the steam at the inlet state are')
+P1=1 //pressure in MPa
+T1=300 //temp. in Celsius
+h1=3051.6 //especific enthalpy in kJ/kg
+P2=1 // pressure at final state in MPa
+u2=h1 //final internal energy of the steam in kJ/kg
+disp('From steam table,the temp. corresponding to final properties are')
+T2=456.1//final temp. in Celsius
+printf("\n The final temp. of the steam in the tank is = %.1f C. \n",T2);
\ No newline at end of file diff --git a/167/CH5/EX5.13/ex13.sce b/167/CH5/EX5.13/ex13.sce new file mode 100755 index 000000000..39e527c27 --- /dev/null +++ b/167/CH5/EX5.13/ex13.sce @@ -0,0 +1,31 @@ +//example 13
+//cooking with a pressure cooker
+clear
+clc
+disp('This process can be analyzed as a uniform-flow process since the properties of the steam leaving the control volume remain constant during the entire cooking process')
+disp('We take the pressure cooker as the system. This is a control volume since mass crosses the system boundary during the process.We observe that this is an unsteady-flow process since changes occur within the control volume. Also, there is one exit and no inlets for mass flow.')
+Pgage=75 //gage pressure inside cooker in kPa
+Patm=100 //atmospheric pressure in kPa
+Pabs=Pgage+Patm //absolute pressure inside pressure cooker in kPa
+disp('Since saturation conditions exist in the cooker at all times , the cooking temperature must be the saturation temperature corresponding to this pressure.From steam table, it is')
+Tsat=116.04 // Saturation Temp. at 175 kPa in Celsius
+T=Tsat //Temp. at which cooking takes place
+Qin=0.5 //Heat supplied to the pressure cooker in kJ/s
+t=30*60 //time for which het is supplied to pressure cooker in seconds
+qin=Qin*t //total heat supplied to pressure cooker in kJ
+m1=1 //initial mass of water in kg
+V=0.006 //volume of pressure cooker in m^3
+V1=V/m1 // initial specific volume in kg/m^3
+Vf=0.001 //in kg/m^3
+Vfg=1.004-0.001 //in kg/m^3
+x1=(V1-Vf)/Vfg //quality
+uf=486.82 //in kJ/kg
+ufg=2037.7 //in kJ/kg
+u1=uf+x1*ufg //specific internal energy in kJ/kg
+U1=m1*u1 //total internal energy
+disp('V2=Vf+x2*Vfg and u2=uf+x2*ufg.upon substituting various values,we get ')
+x2=0.009 //quality of steam in final state
+V2=Vf+x2*Vfg //final specific volume in m^3/kg
+m2=V/V2 //amount of water left in the pressure cooker in kg
+printf("\n Hence,the temperature at whih cooking takes place is = %.2f C. \n",T);
+printf("\n The amount of water left in the pressure cooker at the end of the process = %.1f kg. \n",m2);
\ No newline at end of file diff --git a/167/CH5/EX5.2/ex2.sce b/167/CH5/EX5.2/ex2.sce new file mode 100755 index 000000000..9dc69c0a5 --- /dev/null +++ b/167/CH5/EX5.2/ex2.sce @@ -0,0 +1,11 @@ +//example 2
+//discharge of water from a tank
+clear
+clc
+h0=4 //height of cylindrical water tank in ft
+h2=2 //final water level in tank in ft
+g=32.2 //acc. due to gravity in ft/s^2
+Dt=3*12 //diameter of tank in inches
+Djet=0.5 //diameter of water jet in inches
+t=(h0^0.5-h2^0.5)*(Dt)^2/((Djet)^2*(g/2)^0.5) //time taken for water level to fall to half of its initial value in seconds
+printf("\n Hence, the time taken for water level to fall to half of its initial value is = %.1f min. \n",t/60);
\ No newline at end of file diff --git a/167/CH5/EX5.3/ex3.sce b/167/CH5/EX5.3/ex3.sce new file mode 100755 index 000000000..10e2794ae --- /dev/null +++ b/167/CH5/EX5.3/ex3.sce @@ -0,0 +1,22 @@ +//example 3
+//energy transport by mass
+clear
+clc
+vf=0.001053 //specific volume of saturated liquid water in m3/kg
+vg=1.1594 //specific volume of water vapour in m3/kg
+ug=2519.2 //specific internal energy of water vapour kJ/kg
+hg=2693.1 //specific enthalpy of water vapour kJ/kg
+disp('Saturation conditions exist in a pressure cooker at all times after the steady operating conditions are established')
+disp(' Therefore, the liquid has the properties of saturated liquid and the exiting steam has the properties of saturated vapor at the operating pressure.')
+m=0.6/(vf*1000) //reduction in mass of liquid in pressure cooker in kg
+M=m/(40*60) //mass flow rate of steam in kg/s
+A=8*10^-6 //exit area in m^2
+V=M*vg/A //exit velocity in m/s
+e=hg-ug //flow energy of steam in kJ/kg
+TE=hg //total nergy of steam in kJ/kg
+E=M*hg //energy flow rate of steam leaving cooker in kW
+printf("\n Hence,The mass flow rate of the steam is = %.6f kg/s. \n",M);
+printf("\n The exit velocity is = %.1f m/s. \n",V);
+printf("\n The total energy of the steam is = %.1f kJ/kf. \n",TE);
+printf("\n The flow energy of the steam is = %.1f kJ/kg. \n",e);
+printf("\n The rate at which energy leaves the cooker by steam is = %.3f kW. \n",E);
\ No newline at end of file diff --git a/167/CH5/EX5.4/ex4.sce b/167/CH5/EX5.4/ex4.sce new file mode 100755 index 000000000..9a4cd0c7a --- /dev/null +++ b/167/CH5/EX5.4/ex4.sce @@ -0,0 +1,19 @@ +//example 4
+//deceleration of air in diffuser
+clear
+clc
+disp('we assume that Air is an ideal gas since it is at a high temperature and low pressure relative to its critical-point values ')
+T1=283 //Initial temp. of air in kelvins
+P1=80 //initial pressure of air in kPa
+R=0.287 //gas constant in kPa-m3/kg-K
+A1=0.4 //inlet area in m^2
+v1=200 //inintial velocity of air in m/s
+V1=R*T1/P1 //specific volume of air in m^3/kg
+m=v1*A1/V1 //mass flow rate in kg/s
+h1=283.14 // specific enthalpy of air in kJ/kg
+v2=0 //exit velocity is very small compared to initial velocity
+h2=h1-(v2^2-v1^2)/2000 //final specific enthalpy of air in kJ/kg
+disp('from steam table , the temperature corresponding to this value of enthalpy is')
+T2=303 //Temp. of air leaving the diffuser in K
+printf("\n Hence,The mass flow rate of the air is = %.1f kg/s. \n",m);
+printf("\n The temp. of air leaving the diffuser is = %.0f K. \n",T2);
\ No newline at end of file diff --git a/167/CH5/EX5.5/ex5.sce b/167/CH5/EX5.5/ex5.sce new file mode 100755 index 000000000..f9cfa2056 --- /dev/null +++ b/167/CH5/EX5.5/ex5.sce @@ -0,0 +1,19 @@ +//example 5
+//acceleration of steam in nozzle
+clear
+clc
+P1=250 //initial pressure of steam in psia
+T1=700 //initial temperature of steam in °F
+disp('The specific volume and enthalpy of steam at the nozzle inlet are ')
+v1=2.6883 //specific volume of steam at the nozzle inlet in ft3/lbm
+h1=1371.4 // specific enthalpy of steam at the nozzle inletin Btu/lbm
+A1=0.2 //inlet area in ft^2
+M=10 // mass flow rate of steam through nozzle in lbm/s
+V1=M*v1/A1 // inlet velocity in ft/s
+qout=1.2 // heat loss in Btu/lbm
+v2=900 //exit velocity in ft/s
+h2=h1-qout-(v2^2-v1^2)/(2*25037) // enthalpy after exit
+disp('from steam table, the temp. corresponding to this pressure and specifi enthalpy is ')
+T2=662.0 ///in °F
+printf("\n Hence,the inlet velocity is = %.1f ft/s. \n",V1);
+printf("\n The exit temp. of the seam is = %.0f F. \n",T2);
\ No newline at end of file diff --git a/167/CH5/EX5.6/ex6.sce b/167/CH5/EX5.6/ex6.sce new file mode 100755 index 000000000..6fd6e6660 --- /dev/null +++ b/167/CH5/EX5.6/ex6.sce @@ -0,0 +1,10 @@ +//example 6
+//compressing air by compressor
+clear
+clc
+m=0.02 //mass flow rate of the air in kg/s
+qout=16 //heat loss during the process in kJ/kg
+h1=280.13 //specific enthalpy of air at 280K in kJ/kg
+h2=400.98 //specific enthalpy of air at 400K in kJ/kg
+win=m*qout + m*(h2-h1) //power input to compressor in kW
+printf("\n Hence,the power input to the compressor is = %.2f kW. \n",win);
\ No newline at end of file diff --git a/167/CH5/EX5.7/ex7.sce b/167/CH5/EX5.7/ex7.sce new file mode 100755 index 000000000..58de44e1f --- /dev/null +++ b/167/CH5/EX5.7/ex7.sce @@ -0,0 +1,28 @@ +//example 7
+// power generation by steam turbine
+clear
+clc
+P1= 2 //initial pressure of steam in MPa
+T1= 400 //initial temp. of steam in °C
+V1= 50 //initial velocity of steam in m/s
+z1= 10 //height of inlet in metres
+h1=3248.4 //initial specific enthalpy of air in kJ/kg
+P2= 15 //final pressure of air in kPa
+V2= 180 //final velocity of air in m/s
+z2= 6 //exit height in m
+x2=0.9 //quality of steam after exit
+disp('At turbine exit,we obviously have liquid vapour mixture at 15 kPa.')
+hf=225.94 //in kJ/kg
+hfg=2372.3 //in kJ/kg
+h2=hf+x2*hfg //final specific enthalpy of mixture in kJ/kg
+dh=h2-h1 // change in enthalpy of steam in kJ/kg
+dke=(V2^2-V1^2)/2000 //change in kinetic energy of steam in kJ/kg
+g=9.8 //acc. due to gravity in m/s^2
+dpe=g*(z2-z1)/1000//change in potential energy of steam in kJ/kg
+wout=-((h2-h1)+(V2^2-V1^2)/2000+g*(z2-z1)/1000) //work done per unit mass of the steam flowing through the turbine in kJ/kg
+m=5000/wout //mass flow rate of steam in kg/s
+printf("\n The value of dh is = %.2f kJ/kg. \n",dh);
+printf("\n The value of dke is = %.2f kJ/kg. \n",dke);
+printf("\n The value of dpe is = %.2f kJ/kg. \n",dpe);
+printf("\n The work done per unit mass of the steam flowing through the turbine is = %.2f kJ/kg. \n",wout);
+printf("\n The mass flow rate of the steam is = %.2f kg/s. \n",m);
\ No newline at end of file diff --git a/167/CH5/EX5.8/ex8.sce b/167/CH5/EX5.8/ex8.sce new file mode 100755 index 000000000..2b1dbeee6 --- /dev/null +++ b/167/CH5/EX5.8/ex8.sce @@ -0,0 +1,21 @@ +//example 8
+// expansion of refrigant 134-a in refrigerator
+clear
+clc
+disp('Refrigerant-134a that enters a capillary tube as saturated liquid.Therefore,from table of refrigerant-134a ')
+P1=0.8 // initial pressure in MPa
+T1=31.31 //initial temp. in Celsius
+h1=95.47 //initial specific enthalpy in kJ/kg
+disp('Flow through a capillary tube is a throttling process. Thus, the enthalpy of the refrigerant remains constant')
+h2=h1 //final specific enthalpy
+P2=0.12 //final pressure in MPa
+T2=-22.32 //final temp. in Celsius
+hf=22.49 // in kJ/kg
+hg=236.97 // in kJ/kg
+hfg=hg-hf //in kJ/kg
+disp('Obviously hf<h2<hg thus, the refrigerant exists as a saturated mixture at the exit state')
+disp('Thus quality at this state is')
+x=(h2-hf)/hfg
+dT=T2-T1 //in Celsius
+printf("\n The quality of the refrigerant at the final state is = %.3f. \n",x);
+printf("\n The temp. drop during this process is = %.2f C. \n",dT);
\ No newline at end of file diff --git a/167/CH5/EX5.9/ex9.sce b/167/CH5/EX5.9/ex9.sce new file mode 100755 index 000000000..092859f35 --- /dev/null +++ b/167/CH5/EX5.9/ex9.sce @@ -0,0 +1,10 @@ +//example 9
+//Mixing of Hot and Cold Waters in a Shower
+clear
+clc
+disp('We take the chamber as system.Then,there are two inlets and one exit ')
+h3=78.02 //enthalpy at 110 F in Btu/lbm
+h2=18.07 //enthalpy at 50 F in Btu/lbm
+h1=107.99 //enthalpy at 140F in Btu/lbm
+y=(h3-h2)/(h1-h3) //mass ratio of hot to cold water
+printf("\n The mass ratio of hot to cold water is = %.1f . \n",y);
\ No newline at end of file diff --git a/167/CH6/EX6.1/ex1.sce b/167/CH6/EX6.1/ex1.sce new file mode 100755 index 000000000..b180579a2 --- /dev/null +++ b/167/CH6/EX6.1/ex1.sce @@ -0,0 +1,10 @@ +//ques1
+//Net Power Production of a Heat Engine
+clear
+clc
+Qh=80;//heat of source in MW
+Ql=50;//heat of sink in MW
+W=Qh-Ql;//Output power in MW
+printf('The net power output of this heat engine is = %.0f MW \n',W);
+n=W/Qh;//thermal efficiency =net work/heat of source
+printf(' Thermal Efficiency = %.3f \n',n);
\ No newline at end of file diff --git a/167/CH6/EX6.2/ex2.sce b/167/CH6/EX6.2/ex2.sce new file mode 100755 index 000000000..d94f71fe9 --- /dev/null +++ b/167/CH6/EX6.2/ex2.sce @@ -0,0 +1,10 @@ +//ques2
+//Fuel Consumption Rate of a Car
+clear
+clc
+W=65;//power of car engine in hp
+n=0.24;//efficiency of car engine
+Qh=W/n*2545;//heat of reservoir in Btu/h
+r=19000;//output power required in Btu/lbm
+m=Qh/r;//rate of burning of fuel required , in lbm/hour
+printf('To supply energy at this rate, the engine must burn fuel at a rate of = %.1f lbm/h',m);
diff --git a/167/CH6/EX6.3/ex3.sce b/167/CH6/EX6.3/ex3.sce new file mode 100755 index 000000000..2b790b7da --- /dev/null +++ b/167/CH6/EX6.3/ex3.sce @@ -0,0 +1,13 @@ +//ques3
+//Heat Rejection by a Refrigerator
+clear
+clc
+//(a)
+Ql=6;//heat of sink in kJ/s
+W=2;//work done on refrigerator in kW
+COPr=Ql/W;//coefficient of performance of refrigerator
+printf(' (a) The coefficient of performance of the refrigerator is = %.0f \n',COPr);
+
+//(b)
+Qh=Ql+W;//heat of reservoir in kJ/s
+printf(' (b)The rate at which heat is rejected to the room that houses the refrigerator = %.0f kJ/s \n',Qh);
\ No newline at end of file diff --git a/167/CH6/EX6.4/ex4.sce b/167/CH6/EX6.4/ex4.sce new file mode 100755 index 000000000..2e00c0f64 --- /dev/null +++ b/167/CH6/EX6.4/ex4.sce @@ -0,0 +1,12 @@ +//ques4
+//Heating a House by a Heat Pump
+clear
+clc
+//(a)
+Qh=80000;//heat of reservoir in kJ/h
+COPh=2.5;//coefficient of performance of heat engine
+W=Qh/COPh;//work done by heat pump in kJ/h
+printf(' (a) The power consumed by this heat pump = %.0f kJ/h \n',W);
+//(b)
+Ql=Qh-W;//heat of sink/outdoor in kJ/hour
+printf(' (b) The rate of heat transfer from the outdoor = %.0f kJ/h \n',Ql);
\ No newline at end of file diff --git a/167/CH6/EX6.5/ex5.sce b/167/CH6/EX6.5/ex5.sce new file mode 100755 index 000000000..316601ee7 --- /dev/null +++ b/167/CH6/EX6.5/ex5.sce @@ -0,0 +1,15 @@ +//ques5
+//Analysis of a Carnot Heat Engine
+clear
+clc
+//(a) The Carnot heat engine is a reversible heat engine, and so its efficiency can be determined as
+Tl=303;//K temp of sink
+Th=650+273;//K temp of source
+n=1-Tl/Th;//efficiency of heat engine
+printf(' (a) Efficiency = %.3f \n',n);
+
+//(b)
+
+Qh=500;//heat of reservoir in kJ
+Ql=Tl/Th*Qh;//heat of sink in kJ
+printf(' (b) The amount of heat rejected,Ql by this reversible heat engine = %.0f kJ \n',Ql);
\ No newline at end of file diff --git a/167/CH6/EX6.6/ex6.sce b/167/CH6/EX6.6/ex6.sce new file mode 100755 index 000000000..f9e6f067f --- /dev/null +++ b/167/CH6/EX6.6/ex6.sce @@ -0,0 +1,8 @@ +//ques6
+//A Questionable Claim for a Refrigerator
+clear
+clc
+Th=75+460;//temperature of reservior in R
+Tl=35+460;//temperature of sink in R
+COPr=1/((Th/Tl-1));//coefficient of performance of refrigerator
+printf('Coefficient of performance of refrigerator = %.1f ',COPr);
\ No newline at end of file diff --git a/167/CH6/EX6.7/ex7.sce b/167/CH6/EX6.7/ex7.sce new file mode 100755 index 000000000..2faa01634 --- /dev/null +++ b/167/CH6/EX6.7/ex7.sce @@ -0,0 +1,11 @@ +//ques7
+//Heating a House by a Carnot Heat Pump
+clear
+clc
+Tl=-5+273;//temp of sink K
+Th=21+273;//temperature of reservior in K
+COPh=1/(1-Tl/Th);//coefficient of performance of heat engine
+Qh=37.5;//heat of reservoir in kW
+W=Qh/COPh;//work output of heat engine in kW
+printf('The required power input is = %.2f kW',W);
+
diff --git a/167/CH6/EX6.8/ex8.sce b/167/CH6/EX6.8/ex8.sce new file mode 100755 index 000000000..9cdd0097f --- /dev/null +++ b/167/CH6/EX6.8/ex8.sce @@ -0,0 +1,18 @@ +//ques8
+//Malfunction of a Refrigerator Light Switch
+clear
+clc
+COPr=1.3;//coefficient of performance of refrigerator
+Qref=40;//heat load of refrigerator in W
+Wref=Qref/COPr;//power consumed in W
+Wlight=Qref;//power consumed by light in W
+Wtotal=Wlight+Wref;//total additional power consumed in W
+nh=20*30*365/3600;//normal operating hour per yr (h/yr)
+//Then the additional hours the light remains on as a result of the malfunction becomes
+annualh=8760;// total number of annual hour in a year h/yr
+at=annualh-nh;//additional hr in h/yr
+aP=Wtotal*at/1000;//additional power consumption in kWh/yr
+printf('Additional power consumption = %.0f kWh/yr \n',aP);
+uc=0.08;//unit cost 0.08 $/kWh
+APC=aP*uc;//additional power cost in $/yr
+printf(' Additional power cost = $ %.1f/yr ',APC);
\ No newline at end of file diff --git a/167/CH7/EX7.1/ex1.sce b/167/CH7/EX7.1/ex1.sce new file mode 100755 index 000000000..55e4d2eef --- /dev/null +++ b/167/CH7/EX7.1/ex1.sce @@ -0,0 +1,9 @@ +//ques1
+//Entropy Change during an Isothermal Process
+clear
+clc
+//The system undergoes an internally reversible, isothermal process, and thus its entropy change can be determined directly from Eqns
+Q=750//heat in kJ
+Tsys=300//temperature of system in K
+dS=Q/Tsys;//entropy change of process in kJ/K
+printf('Change in entropy = %.2f kJ/K',dS);
diff --git a/167/CH7/EX7.10/ex10.sce b/167/CH7/EX7.10/ex10.sce new file mode 100755 index 000000000..eaf327957 --- /dev/null +++ b/167/CH7/EX7.10/ex10.sce @@ -0,0 +1,14 @@ +//ques10
+//Isentropic Compression of Air in a Car Engine
+clear
+clc
+
+//Using equation (T2/T1)=(v1/v2)^(k-1)
+T1=295//initial temp in K
+t=8//v1/v2 ratio
+k=1.391//isentropic ratio
+T2=T1*(t)^(k-1);//final temp in K
+printf('Final temperature = %.1f K \n',T2);
+printf(' Increase in temperature = %.1f K ',T2-T1);
+
+
diff --git a/167/CH7/EX7.11/ex11.sce b/167/CH7/EX7.11/ex11.sce new file mode 100755 index 000000000..02038a95b --- /dev/null +++ b/167/CH7/EX7.11/ex11.sce @@ -0,0 +1,11 @@ +//ques11
+//Isentropic Compression of an Ideal Gas
+clear
+clc
+//using the equation P2=P1*(T2/T1)^(k/(k-1))
+P1=14;//initial pressure in psia
+T2=780;//final temp in R
+T1=510;//initial temp in R
+k=1.667;//isentropic ratio
+P2=P1*(T2/T1)^(k/(k-1));
+printf('Final pressure = %.1f psia',P2);
diff --git a/167/CH7/EX7.12/ex12.sce b/167/CH7/EX7.12/ex12.sce new file mode 100755 index 000000000..f60bd97c4 --- /dev/null +++ b/167/CH7/EX7.12/ex12.sce @@ -0,0 +1,24 @@ +//ques12
+//Compressing a Substance in the Liquid versus Gas Phases
+clear
+clc
+// (a)steam as a saturated liquid
+v1=0.001043;//=vf(specific volume of fluids) @ 100kPa in m^3/kg
+P2=1000;//final pressure in kPa
+P1=100;//initial pressure in kPa
+w=integrate('v1*P^0','P',P1,P2);//work done in kJ/kg
+printf('(a) Work done is = %.2f kJ/kg \n',w);
+
+//(b)saturated vapor at the inlet state
+//state 1
+P1=100;//pressure at state 1 in kPa
+//table A-6
+h1=2675.0;//enthalpy of heat in kJ/kg
+s1=7.3589;//entropy at in kJ/kg.k
+//state 2
+P2=1;//pressure in MPa
+s2=7.3589;//s2=s1 entropy remains same
+h2=3194.5;//table A-6 enthalpy of heat in kJ/kg
+
+w=h2-h1;//work done in kJ/kg
+printf(' (b) Work done = %.2f kJ/kg ',w);
diff --git a/167/CH7/EX7.13/ex13.sce b/167/CH7/EX7.13/ex13.sce new file mode 100755 index 000000000..4eab3f8cf --- /dev/null +++ b/167/CH7/EX7.13/ex13.sce @@ -0,0 +1,26 @@ +//ques13
+//Work Input for Various Compression Processes
+clear
+clc
+//(a) Isentropic compression with k=1.4
+k=1.4;//isentropic ratio
+R=0.287;//gas constant for water in kJ/K/mol/kg
+T1=300;//initial temp in K
+P2=900;//final pressure in kPa
+P1=100;//initial pressure in kPa
+w=k*R*T1/(k-1)*((P2/P1)^((k-1)/k)-1);//work done in compression in kJ/kg
+printf('(a) Work done in compression = %.1f kJ/kg \n',w);
+
+//(b)Polytropic compression with k=1.3
+w=k*R*T1/(k-1)*((P2/P1)^((k-1)/k)-1);
+printf(' (b) Work done in compression = %.1f kJ/kg \n',w);
+
+//(c) Isothermal compression
+w=R*T1*log(P2/P1);
+printf(' (c) Work done = %.1f kJ/kg \n',w);
+
+//(d) Ideal two stage compression with intercooling with a polytropic exponent of 1.3
+Px=(P1*P2)^(1/2);//pressure in kPa
+//the total compressor work is twice the compression work for a single stage
+w=2*k*R*T1/(k-1)*((Px/P1)^((k-1)/k)-1);
+printf(' (d) Work done = %.2f kJ/kg \n',w);
\ No newline at end of file diff --git a/167/CH7/EX7.14/ex14.sce b/167/CH7/EX7.14/ex14.sce new file mode 100755 index 000000000..df5f0cf38 --- /dev/null +++ b/167/CH7/EX7.14/ex14.sce @@ -0,0 +1,34 @@ +//ques14
+//Isentropic Efficiency of a Steam Turbine
+clear
+clc
+//state 1
+P1=3;//pressure in MPa
+T1=400;//temperature in C
+//from table
+h1=3231.7;//enthalpy of heat in kJ/kg
+s1=6.9235;//enropy in kJ/kg.k
+
+//state 2a
+P2a=50;//pressure in kPa
+T2a=100;//temp in C
+h2a=2682.4;//enthalpy of heat in kJ/kg
+
+//state 2s
+P2s=50;//pressure in kPa
+s2s=6.9235;//s2s=s1 entropy remains same
+//from table
+sf=1.0912;//entropy of fluid state in kJ/kg.k
+sg=7.5931;//entropy of vapor in kJ.kg.k
+//at end,steam exists as a saturated mixture since sf<s2s<sg
+hf=340.54;//enthalpy of heat of fluid state in kJ/kg
+hfg=2304.7;//enthalpy difference of vapor and liquid state in kJ/kg
+x2s=(s2s-sf)/(sg-sf);//x factor
+h2s=hf+x2s*(hfg);//enthalpy of heat in kJ/kg
+//using the equation 7-61 in book we get
+n=(h1-h2a)/(h1-h2s);
+printf('(a) Isentropic efficiency = %.1f percent \n',n*100);
+
+Wout=2000//output power in kJ/s
+ms=Wout/(h1-h2a);//mass flow rate in kg/s
+printf(' (b) The mass flow rate of steam = %.2f kg/s ',ms);//through this turbine from the energy balance for steady-flow systems
diff --git a/167/CH7/EX7.15/ex15.sce b/167/CH7/EX7.15/ex15.sce new file mode 100755 index 000000000..bb96ef003 --- /dev/null +++ b/167/CH7/EX7.15/ex15.sce @@ -0,0 +1,20 @@ +//ques15
+//Effect of Efficiency on Compressor Power Input
+clear
+clc
+T1=285;//initial temperature in K
+h1=285.14;//table A-17 initial heat of enthalpy in kJ/kg
+Pr1=1.1584;//reduced pressure
+P2=800;//final pressure in kPa
+P1=100;//initial pressure in kPa
+Pr2=Pr1*(P2/P1);
+//from table corresponding to Pr2
+h2s=517.05;//enthalpy of heat in kJ/kg
+n=0.80;//efficiency
+//using the formula for efficiency')
+h2a=(h2s-h1)/n+h1;//enthalpy of heat in kJ/kg
+T2a=569.5; //final temp in K from table
+printf('(a) Temperature T2a = %.1f K \n',T2a);
+ms=0.2;//mass flow rate in kg/s
+w=ms*(h2a-h1);//work done in kJ/kg
+printf(' (b) Required power input to compressor as determined from the energy balance equation is = %.2f kJ/kg \n',w);
diff --git a/167/CH7/EX7.16/ex16.sce b/167/CH7/EX7.16/ex16.sce new file mode 100755 index 000000000..c8a4124bb --- /dev/null +++ b/167/CH7/EX7.16/ex16.sce @@ -0,0 +1,25 @@ +//ques16
+//Effect of Efficiency on Nozzle Exit Velocity
+clear
+clc
+//The exit velocity of the air will be a maximum when the process in the nozzle involves no irreversibilities
+T1=950;//initial temp in K
+P2s=80;//pressure in kPa
+P1=200;//initial pressure in kPa
+k=1.354;//isentropic ratio
+T2s=T1*(P2s/P1)^(1-1/k);//temp in K
+//using Ein = Eout we can get V2s
+Cpavg=1.099;//avg specific heat at constant pressure in kJ/kg.k
+V2s=sqrt(2000*Cpavg*(T1-T2s));//velocity in m/s
+printf('(a) The maximum possible exit velocity = %.2f m/s \n',V2s);
+
+//(b) The actual exit temperature of the air is higher than the isentropic exit temperature evaluated above
+n=0.92;//efficiency
+T2a=T1-n*(T1-T2s);//temp in K
+printf(' (b) The exit temperature = %.0f K \n',T2a);
+
+//(c) The actual exit velocity of air can be determined from the definition of isentropic efficiency of a nozzle
+V2a=sqrt(n*V2s^2);//velocity in m/s
+printf(' (c) Exit velocity of air = %.0f m/s ',V2a);
+
+
\ No newline at end of file diff --git a/167/CH7/EX7.17/ex17.sce b/167/CH7/EX7.17/ex17.sce new file mode 100755 index 000000000..31851254a --- /dev/null +++ b/167/CH7/EX7.17/ex17.sce @@ -0,0 +1,16 @@ +//ques17
+//Entropy Generation in a Wall
+clear
+clc
+//Entropy change of wall is 0 during process since the state and thus the entropy of the wall do not change anywhere
+Qout=1035;//W
+Qin=1035;//W
+Tout=278;//K
+Tin=293;//K
+Sgen=Qout/Tout-Qin/Tin;//in W/K
+printf('Entropy of generation = %.3f W/K',Sgen);
+//To determine rate of total entropy generation, we extend the system to include the regions on both sides of the wall that experience a temperature change. Then one side of the system boundary becomes room temperature while the other side becomes the temperature of the outdoors
+Tout=273;//K
+Tin=300;//K
+Sgen=Qout/Tout-Qin/Tin;//in W/K
+printf('\n Entropy of generation = %.3f W/K',Sgen);
\ No newline at end of file diff --git a/167/CH7/EX7.18/ex18.sce b/167/CH7/EX7.18/ex18.sce new file mode 100755 index 000000000..96adbe115 --- /dev/null +++ b/167/CH7/EX7.18/ex18.sce @@ -0,0 +1,17 @@ +//ques18
+//Entropy Generation during a Throttling Process
+clear
+clc
+//state 1
+P1=7;//MPa
+T1=450;//C
+//from table
+h1=3288.3;//kJ/kg
+s1=6.6353;//kJ/kg.K
+
+//state 2
+P2=3;//MPa
+h2=3288.3;//h2=h1
+s2=7.0046;//kJ/kg.K
+sgen=(s2-s1);
+printf('Entropy of generation per unit mass = %.4f kJ/kg.K',sgen);
\ No newline at end of file diff --git a/167/CH7/EX7.19/ex19.sce b/167/CH7/EX7.19/ex19.sce new file mode 100755 index 000000000..87e16c273 --- /dev/null +++ b/167/CH7/EX7.19/ex19.sce @@ -0,0 +1,23 @@ +//ques19
+//Entropy Generated when a Hot Block Is Dropped in a Lake
+clear
+clc
+//(a) The entropy change of the iron block
+m=50;//mass in kg
+Cavg=0.45;//average specific heat in kJ/kg
+T2=285;//final temp in K
+T1=500;//initial temp in K
+Siron=m*Cavg*log(T2/T1);
+printf('(a) Entropy change of iron block = %.2f kJ/K \n',Siron);
+
+//(b)
+//The temperature of the lake water remains constant during this process at 285 K
+Qout=m*Cavg*(T1-T2);//heat transfer from iron to lake in kJ
+S=Qout/T2;//Entropy change of lake in kJ/K
+printf(' (b) Entropy change of the lake = %.2f kJ/K \n',S);
+
+//(c)
+//The entropy generated during this process is determined by applying an entropy balance on the system
+Tb=285;//temp of block in K
+Sgen=Qout/Tb+Siron;//Entropy generation in kJ/K
+printf(' (c) Entropy generated = %.2f kJ/K \n',Sgen);
diff --git a/167/CH7/EX7.2/ex2.sce b/167/CH7/EX7.2/ex2.sce new file mode 100755 index 000000000..cee38c9ba --- /dev/null +++ b/167/CH7/EX7.2/ex2.sce @@ -0,0 +1,23 @@ +//ques2
+//Entropy Generation during Heat Transfer Processes
+clear
+clc
+//(a)Sink at 500K
+Qsource=-2000//heat of source in kJ
+Qsink=2000//heat of sink in kJ
+Tsource=800//temperature of source in K
+Tsink=500//temperature of sink in K
+Ssource=Qsource/Tsource//entropy of source in kJ/K
+Ssink=Qsink/Tsink//entropy of surce in kJ/K
+Sgen=Ssource+Ssink;//entropy of generation of the process in kJ/K
+printf(' (a) Enthalpy of generation = %.1f kJ/K \n', Sgen);
+
+//(b) for sink of T=750 K
+Qsource=-2000//heat of source in kJ
+Qsink=2000//heat of sink in kJ
+Tsource=800//temperature of source in K
+Tsink=750//temperature of sink in K
+Ssource=Qsource/Tsource//entropy of source in kJ/K
+Ssink=Qsink/Tsink//temperature of sink in kJ/K
+Sgen=Ssource+Ssink;//entropy of generation of system in kJ/K
+printf(' (b) Enthalpy of generation = %.1f kJ/K',Sgen);
\ No newline at end of file diff --git a/167/CH7/EX7.21/ex21.sce b/167/CH7/EX7.21/ex21.sce new file mode 100755 index 000000000..402f9f15e --- /dev/null +++ b/167/CH7/EX7.21/ex21.sce @@ -0,0 +1,15 @@ +//ques21
+//Entropy Generation Associated with Heat Transfer
+clear
+clc
+//(a) Water undergoes an internally reversible isothermal process
+Q=-600;//kJ
+Tsys=100+273;//K
+Ssys=Q/Tsys;//kJ/K
+printf('(a) Entropy of system = %.2f kJ/K \n',Ssys);
+
+//(b) The entropy generation is entirely due to irreversible heat transfer through a finite temperature difference
+Qout=600;//heat output in kJ
+Tb=25+273//Temperature in K
+Sgen=Ssys+Qout/Tb;//Entropy generation in kJ/K
+printf(' (b) Entropy of generation = %.2f kJ/K',Sgen);
diff --git a/167/CH7/EX7.22/ex22.sce b/167/CH7/EX7.22/ex22.sce new file mode 100755 index 000000000..1b16140a0 --- /dev/null +++ b/167/CH7/EX7.22/ex22.sce @@ -0,0 +1,26 @@ +//ques22
+//Energy and Cost Savings by Fixing Air Leaks
+clear
+clc
+//The work needed to compress a unit mass of air at 20°C from the atmospheric pressure of 101 kPa to 700+101=801 kPa is
+R=0.287;//gas constant for water
+P2=801;//final pressure in kPa
+P1=101;//initial pressure in kPa
+n=1.4;
+nc=0.8;
+T1=293;//initial temperature in K
+w=n*R*T1/(nc*(n-1))*((P2/P1)^(1-1/n)-1);//work done in kJ/kg
+D=3*10^-3;//diameter in metre
+A=%pi*D^2/4;//area in m^2
+//Line conditions are 297 K and 801 kPa, the mass flow rate of the air leaking through the hole is determined as
+Cdis=0.65;
+k=1.4;//k=n
+R=0.287;//gas constant for water
+Tline= 297;//temperature of line in K
+Pline=801;//pressure of line=P2
+ms=Cdis*(2/(k+1))^(1/(k-1))*Pline/(R*Tline)*A*sqrt(1000*k*R*Tline*2/(k+1));//mass flow in kg/s
+pw=ms*w//power wasted in kW
+Esaving=pw*4200/0.92//in kWh/yr Energy saving=Power saved*operating hr/efficiency of motor
+printf('Energy saving = %.0f kWh/yr \n',Esaving);
+Csaving=Esaving *0.078;//Cost saving in $/yr = Energy saving * unit cost
+printf(' Cost saving = $ %.0f/yr \n',Csaving);
diff --git a/167/CH7/EX7.23/ex23.sce b/167/CH7/EX7.23/ex23.sce new file mode 100755 index 000000000..0108a3efc --- /dev/null +++ b/167/CH7/EX7.23/ex23.sce @@ -0,0 +1,13 @@ +//ques23
+//Reducing the Pressure Setting to Reduce Cost
+clear
+clc
+Preduced=885.6;//reduced pressure
+P1=85.6;//initial pressure in kPa
+P2=985.6;//final pressure in kPa
+n=1.4;
+f=1-((Preduced/P1)^((n-1)/n)-1)/((P2/P1)^(1-1/n)-1);//The fraction of energy saved as a result of reducing the pressure setting
+Cc=12000;//current cost in $/yr
+Csaving=Cc*f;
+printf('Cost saving = $%.0f/yr \n',Csaving);
+
diff --git a/167/CH7/EX7.3/ex3.sce b/167/CH7/EX7.3/ex3.sce new file mode 100755 index 000000000..28833f01c --- /dev/null +++ b/167/CH7/EX7.3/ex3.sce @@ -0,0 +1,30 @@ +//ques3
+//Entropy Change of a Substance in a Tank
+clear
+clc
+//specific volume remains constant during this process
+
+//state 1
+P1=140//initial pressure in kPa
+T1=20 //initial temperature in C
+s1=1.0624//entropy in kJ/Kg.K from table
+v1=0.16544//specific volume in m^3/Kg
+
+//state 2
+P2=100//pressure in kPa
+v2=0.16544//specific volume remains same ie v2=v1
+
+//from table
+vf=0.0007259//specific volume of saturated water in m^3/kg
+vg=0.19254//specific volume of saturated vapor in m^3/kg
+
+//Final state-saturated liquid–vapor mixture
+x2=(v2-vf)/(vg-vf);//x-factor
+sf=0.07188//entropy of saturated water in kJ/Kg.K
+sfg=0.87995//entropy change in kJ/kg.K
+s2=sf+x2*sfg;//entropy at state 2 in kJ/kg.K
+m=5//mass in Kg
+S=m*(s2-s1);//entropy change in process in kJ
+printf('Entropy change = %.3f kJ',S);
+
+
\ No newline at end of file diff --git a/167/CH7/EX7.4/ex4.sce b/167/CH7/EX7.4/ex4.sce new file mode 100755 index 000000000..b7f83bc19 --- /dev/null +++ b/167/CH7/EX7.4/ex4.sce @@ -0,0 +1,22 @@ +//ques4
+//Entropy Change during a Constant-Pressure Process
+clear
+clc
+//approximating the compressed liquid as a saturated liquid
+
+//state 1
+P1=20//pressure in psia
+T1=70//temperature in F
+s1=0.07459//entropy ie sf @ 70F in Btu/lbm.R
+h1=38.08//heat of system in Btu/lbm hf@ 70 F
+
+//state 2
+P2=20//pressure in psia
+//using Qin=m*(h2-h1)
+Qin=3450//input heat in Btu
+m=3//mass in lbm
+h2=Qin/m+h1//heat of system in Btu/lbm
+s2=1.7761//entropy in Btu/lbm/R from table A-6E
+
+S=m*(s2-s1);//change in entropy of system
+printf('Entropy change of water during the process = %.3f Btu/R',S);
diff --git a/167/CH7/EX7.5/ex5.sce b/167/CH7/EX7.5/ex5.sce new file mode 100755 index 000000000..e8146ae63 --- /dev/null +++ b/167/CH7/EX7.5/ex5.sce @@ -0,0 +1,18 @@ +//ques5
+//Isentropic Expansion of Steam in a Turbine
+clear
+clc
+//state 1
+P1=5//pressure in MPa
+T1=450//temperature in C
+h1=3317.2//heat of system in kJ/kg from table
+s1=6.8210//entropy of system in kJ/kg.K from table
+
+//state 2
+P2=1.4//pressure in MPa
+s2=6.8210//entropy of system remains same ie s2=s1
+h2=2967.4//heat of system in kJ/Kg from table
+
+w=h1-h2;//work output of turbine in kJ/kg
+
+printf('The work output of the turbine per unit mass is = %.1f kJ/kg',w);
\ No newline at end of file diff --git a/167/CH7/EX7.7/ex7.sce b/167/CH7/EX7.7/ex7.sce new file mode 100755 index 000000000..edc9062a3 --- /dev/null +++ b/167/CH7/EX7.7/ex7.sce @@ -0,0 +1,24 @@ +//ques7
+//Effect of Density of a Liquid on Entropy
+clear
+clc
+
+//state 1
+P1=1//pressure in MPa
+T1=110//temperature in K
+s1=4.875//entropy in kJ/Kg.K from table
+Cp1=3.471//specific heat at constant pressure in kJ/Kg.K from table
+
+//state 2
+P2=5//pressure in MPa
+T2=120//temperature in K
+s2=5.145//entropy in kJ/Kg.K
+Cp2=3.486//specific heat at constant pressure in kJ/Kg.K
+
+s=s2-s1;//entropy change in kJ/kg.K
+printf('(a) Change in entropy per unit mass = %.3f kJ/kg.K \n',s);
+
+//(b) Approximating liquid methane as an incompressible substance
+c=(Cp1+Cp2)/2;//average specific heat
+s=c*log(T2/T1);//entropy change in kJ/Kg
+printf(' (b) Entropy change per unit mass = %.3f kJ/kg.K',s);
diff --git a/167/CH7/EX7.8/ex8.sce b/167/CH7/EX7.8/ex8.sce new file mode 100755 index 000000000..fa7035d19 --- /dev/null +++ b/167/CH7/EX7.8/ex8.sce @@ -0,0 +1,26 @@ +//ques8
+//Economics of Replacing a Valve by a Turbine
+clear
+clc
+
+//state 1
+P1=5//pressure in MPa
+T1=115//temperature in K
+//from table
+h1=232.3//heat in kJ/kg
+s1=4.9945//entropy in kJ/kg.K
+d1=422.15//density
+
+//state 2
+P2=1//pressure in MPa
+s2=4.9945//entropy s2=s1
+h2=222.8//heat in kJ/kg from table
+Vs=0.280//volume flow rate in m^3
+ms=d1*Vs//mass per second in Kg/sec
+// Ein=Eout so Wsout=ms*(h1-h2)
+Ws=ms*(h1-h2);//power output of turbine in kJ/sec
+printf('The power output of the turbine = %.0f kW \n',Ws);
+APP=Ws*8760//kWh/yr annual power production
+APS=APP*0.075//$/kWh Annual power savings
+printf(' Annual power savings = $ %.0f/yr ',APS);
+
diff --git a/167/CH7/EX7.9/ex9.sce b/167/CH7/EX7.9/ex9.sce new file mode 100755 index 000000000..a583ba5a5 --- /dev/null +++ b/167/CH7/EX7.9/ex9.sce @@ -0,0 +1,20 @@ +//ques9
+//Entropy Change of an Ideal Gas
+clear
+clc
+//(a) From table (Table A–17)
+s2=1.79783;//entropy of substance a state 2 in kJ/Kg.K
+s1=1.66802;//entropy of state 2 in kJ/kg.k
+R=0.287;//gas constant for water
+P2=600//final pressure in kPa
+P1=100//initial pressure in kPa
+dS=s2-s1-R*log(P2/P1);//change in entropy in kJ/kg.k
+printf('(a) s2-s1 = %.4f kJ/Kg.K \n',dS);
+
+//(b) by using a c value at the average temperature 37 C
+Cpavg=1.006//avg specific heat at const pressure in kJ/kg.K
+T2=330//final temp in K
+T1=290//inial temp in K
+dS=Cpavg*log(T2/T1)-R*log(P2/P1);//kJ/kg.k
+printf(' (b) Entropy change = %.4f kJ/kg.K',dS);
+
diff --git a/167/CH8/EX8.1/ex1.sce b/167/CH8/EX8.1/ex1.sce new file mode 100755 index 000000000..8a574e654 --- /dev/null +++ b/167/CH8/EX8.1/ex1.sce @@ -0,0 +1,11 @@ +//example 1
+//maximum power generation by wind turbine
+clear
+clc
+V=10 //Average velocity of wind in m/s
+ke=(V^2/2)/1000 //exegy of the blowing air in kJ/kg
+D=12 //diameter of wind turbine in m
+d=1.18 //density of air in kg/m^3
+M=d*%pi*D^2*V/4 //mass flow rate in kg/s
+p=M*ke //maximum power generated by wind turbine in kW
+printf("\n Hence, the maximum power generated by wind turbine is = %.1f kW. \n",p);
\ No newline at end of file diff --git a/167/CH8/EX8.10/ex10.sce b/167/CH8/EX8.10/ex10.sce new file mode 100755 index 000000000..3db9882b6 --- /dev/null +++ b/167/CH8/EX8.10/ex10.sce @@ -0,0 +1,13 @@ +//example 10
+//exergy destruction during heat conduction
+clear
+clc
+To=273 //temperature of outdoor in K
+Tin=293 //temperature of inner surface of brick wall in K
+Tout=278 //temperature of outer surface of brick wall in K
+Q=1035 //rate of heat transfer through wall in W
+Xdestroyed=Q*(1-To/Tin)-Q*(1-To/Tout) //exergy destruction in wall in W
+Th=300 //temperature of house in K
+Xdestroyedtotal=Q*(1-To/Th)-Q*(1-To/To) //the rate of total exergy destruction during this heat transfer process
+printf("\n Hence, the rate of exergy destruction in the wall is = %.1f W. \n",Xdestroyed);
+printf("\n Hence, rate of total exergy destruction associated with this heat transfer process is=%.1f W. \n",Xdestroyedtotal);
\ No newline at end of file diff --git a/167/CH8/EX8.11/ex11.sce b/167/CH8/EX8.11/ex11.sce new file mode 100755 index 000000000..9ae327890 --- /dev/null +++ b/167/CH8/EX8.11/ex11.sce @@ -0,0 +1,33 @@ +//example 11
+//exergy destruction during expansion of steam
+clear
+clc
+P1=1 //in MPa
+T1=300 //in celsius
+u1=2793.7 //kJ/kg
+v1=0.25799 //m3/kg
+s1=7.1246 //kJ/kg-K
+P2=200 //in kPa
+T2=150 //in °C
+u2=2577.1 //in kJ/kg
+v2=0.95986 //in m3/kg
+s2=7.2810 //in kJ/kg-K
+P0=100 //in kPa
+T0=298//in K
+u0=104.83 //in kJ/kg
+v0=0.00103 //in m3/kg
+s0=0.3672 //in kJ/kg-K
+m=0.05 //in kg
+X1=m*((u1-u0)-T0*(s1-s0)+P0*(v1-v0)) //initial exergy of the system in kJ
+X2=m*((u2-u0)-T0*(s2-s0)+P0*(v2-v0))//final exergy of the system in kJ
+dX=X2-X1 //exergy change for the process in kJ
+Qout=2 //Heat losses from the system to the surroundings in kJ
+Wbout=-Qout-m*(u2-u1) //total boundary work done by the system,including the work done against the atmosphere to push the atmospheric air out of the way during the expansion process in kJ
+Wu=Wbout-P0*m*(v2-v1) //useful work in kJ
+Xdestroyed=X1-X2-Wu //exergy destroyed in kJ
+n=Wu/(X1-X2) //second law efficiency for this process
+printf("\n Hence, the exergy of the steam at the initial state is = %.1f kJ. \n",X1);
+printf("\n Hence, the exergy of the steam at the final state is = %.1f kJ. \n",X2);
+printf("\n Hence, the exergy change of the steam is = %.1f kJ. \n",dX);
+printf("\n Hence, the exergy destroyed is = %.1f kJ. \n",Xdestroyed);
+printf("\n Hence, the exergy destroyed is = %.1f percent. \n",n*100);
diff --git a/167/CH8/EX8.12/ex12.sce b/167/CH8/EX8.12/ex12.sce new file mode 100755 index 000000000..a1b8d6f5c --- /dev/null +++ b/167/CH8/EX8.12/ex12.sce @@ -0,0 +1,13 @@ +//example 12
+//exergy destroyed during stirring of gas
+clear
+clc
+T0=530 //temperature of surrounding air in R
+m=2 //mass of air in insulated rigid tank in lbm
+cv=0.172 //in Btu/lbm-R
+T2=590 //initial temperature of air in R
+T1=530 //final temperature of air in R
+Xdestroyed=T0*m*cv*log(T2/T1) //exergy destroyed in Btu
+Wrevin=m*cv*(T2-T1)-Xdestroyed //minimum work input in Btu
+printf("\n Hence, the exergy destroyed is = %.1f Btu. \n",Xdestroyed);
+printf("\n Hence, the reversible work for this process is = %.1f Btu. \n",Wrevin);
diff --git a/167/CH8/EX8.13/ex13.sce b/167/CH8/EX8.13/ex13.sce new file mode 100755 index 000000000..8a00039c4 --- /dev/null +++ b/167/CH8/EX8.13/ex13.sce @@ -0,0 +1,23 @@ +//example 13
+//dropping of hot iron block in water
+clear
+clc
+miron=5 //mass of iron block in kg
+mwater=100 //mass of water in kg
+ciron=0.45 //specific heat capacity of iron in kJ/kg-C
+cwater=4.18 //specific heat capacity of water in kJ/kg-C
+Tiiron=350 //initial temperature of iron in Celsius
+Tiwater=30 //initial temperature of water in Celsius
+Tf=(miron*ciron*Tiiron+mwater*cwater*Tiwater)/(miron*ciron+mwater*cwater) //final equilbrium temperature in Celsius
+T0=293 //temperature of surroundings in K
+X1iron=miron*ciron*((Tiiron+273)-T0-T0*log((Tiiron+273)/T0)) //initial exergy of iron
+X1water=mwater*cwater*((Tiwater+273)-T0-T0*log((Tiwater+273)/T0)) //initial exergy of water
+X1total=X1iron+X1water //total initial exergy
+X2iron=miron*ciron*((Tf+273)-T0-T0*log((Tf+273)/T0)) //finall exergy of iron
+X2water=mwater*cwater*((Tf+273)-T0-T0*log((Tf+273)/T0)) //final exergy of water
+X2total=X2iron+X2water //total exergy in kJ
+Xdestroyed=X1total-X2total //exergy destroyed in kJ
+printf("\n Hence, the final equilbrium temperature is = %.1f celsius. \n",Tf);
+printf("\n The exergy of the combined system at the initial state is = %.0f kJ. \n",X1total);
+printf("\n The exergy of the combined system at the final state is = %.1f kJ. \n",X2total);
+printf("\n The wasted work potential during this process is = %.1f kJ. \n",Xdestroyed);
\ No newline at end of file diff --git a/167/CH8/EX8.14/ex14.sce b/167/CH8/EX8.14/ex14.sce new file mode 100755 index 000000000..620ad8d70 --- /dev/null +++ b/167/CH8/EX8.14/ex14.sce @@ -0,0 +1,21 @@ +//example 14
+//exergy destruction during heat transfer to a gas
+clear
+clc
+P1=350 //in kPa
+V1=0.01 //in m^3
+V2=0.02 //in m^3
+Wb=P1*V1*log(V2/V1) //quasi equilbrium boundary work in kJ
+P0=100 //atmospheric pressure in kPa
+Wsurr=P0*(V2-V1) //work done against the atmospheric pressure in kJ
+Wu=Wb-Wsurr //useful work in kJ
+Tsys=400 //temperature of system in K
+Tr=1200 //temperature temperature of the boundary in K
+Q=Wb //heat transfer from furnace to system
+Sgen=Q/Tsys-Q/Tr //in kJ/K
+T0=300 //temperature of atmospheric air in K
+Xdestroyed=T0*Sgen //exergy destroyed in kJ
+Wrevout=T0*Q/Tsys-Wsurr+(1-T0/Tr)*Q //reversible work in kJ
+printf("\n The useful work output is = %.2f kJ. \n",Wu);
+printf("\n The exergy destroyed is = %.2f kJ/K. \n",Xdestroyed);
+printf("\n The reversible work for this process is = %.2f kJ. \n",Wrevout);
\ No newline at end of file diff --git a/167/CH8/EX8.15/ex15.sce b/167/CH8/EX8.15/ex15.sce new file mode 100755 index 000000000..239a5c961 --- /dev/null +++ b/167/CH8/EX8.15/ex15.sce @@ -0,0 +1,28 @@ +//example 15
+//second law analysis of steam turbine
+clear
+clc
+P1=3 //in MPa
+T1=450 //in °C
+h1=3344.9 //in kJ/kg
+s1=7.0856 //in kJ/kg-K
+P2=0.2 //in MPa
+T2=150 //in °C
+h2=2769.1 //in kJ/kg
+s2=7.2810 //in kJ/kg-K
+P0=100 //in kPa
+T0=25//in °C
+h0=104.83 //in kJ/kg
+s0=0.3672 //in kJ/kg-K
+m=8 //mass flow rate of turbine in kg/s
+Qout=300 //heat loss to surrounding air in kW
+Wout=m*(h1-h2)-Qout //actual power output of turbine in kW
+Wrevout=m*((h1-h2)-(T0+273)*(s1-s2)) //reversible power in kW
+n=Wout/Wrevout //second law efficiency
+Xdestroyed=Wrevout-Wout //exergy destroyed in kW
+w1=h1-h0-(T0+273)*(s1-s0) //maximum work potential in kJ/kg
+printf("\n Hence,The actual power output is = %.0f kW. \n",Wout);
+printf("\n The maximum possible power output is = %.0f kW. \n",Wrevout);
+printf("\n The second law efficiency is = %.1f percent. \n",n*100);
+printf("\n The exergy destroyed is = %.0f kW. \n",Xdestroyed);
+printf("\n The exergy of the steam at the inlet conditions is =%.0f kJ/kg. \n",w1);
\ No newline at end of file diff --git a/167/CH8/EX8.16/ex16.sce b/167/CH8/EX8.16/ex16.sce new file mode 100755 index 000000000..d62b117e1 --- /dev/null +++ b/167/CH8/EX8.16/ex16.sce @@ -0,0 +1,18 @@ +//example 16
+//exergy destroyed during mixing of fluid streams
+clear
+clc
+m1=300 //in lbm/min
+h1=18.07 //in Btu/lbm
+T0=530 //temperature of atmospheric air in R
+s1=0.03609 //Btu/lbm-R
+m2=22.7 //in lbm/min
+h2=1162.3 //in Btu/lbm
+s2=1.7406 //in Btu/lbm-R
+m3=322.7 //in lbm/min
+h3=97.99 //in Btu/lbm
+s3=0.18174 //in Btu/lbm-R
+Wrevout=m1*(h1-T0*s1)+m2*(h2-T0*s2)-m3*(h3-T0*s3) //reversible power in Btu/min
+Xdestroyed=Wrevout //in Btu/min
+printf("\n The reversible work for the process is = %.0f Btu/min. \n",Wrevout);
+printf("\n The rate of exergy destruction is = %.0f Btu/min. \n",Xdestroyed);
\ No newline at end of file diff --git a/167/CH8/EX8.17/ex17.sce b/167/CH8/EX8.17/ex17.sce new file mode 100755 index 000000000..0228ff83f --- /dev/null +++ b/167/CH8/EX8.17/ex17.sce @@ -0,0 +1,14 @@ +//example 17
+//charging of compressed air storage system
+clear
+clc
+P2=1000 //in kPa
+V=200 //volume of rigid tank in m^3
+R=0.287 //kPa-m^3/kg-K
+T2=300 //in K
+m2=P2*V/(R*T2) //final mass of the air in kg
+P0=100 //atmospheric presssure in kPa
+T0=300 //atmospheric temperature in K
+o2=R*T0*(log(P2/P0)+P0/P2-1) //exergy of the pressurised air in the tank in kJ/kg
+Wrev=m2*o2 //reversible work in kJ
+printf("\n The minimum work requirement for the process is = %.0f MJ. \n",Wrev/1000);
\ No newline at end of file diff --git a/167/CH8/EX8.2/ex2.sce b/167/CH8/EX8.2/ex2.sce new file mode 100755 index 000000000..e5eea5256 --- /dev/null +++ b/167/CH8/EX8.2/ex2.sce @@ -0,0 +1,10 @@ +//example 2
+//exergy transfer from a furnace
+clear
+clc
+T0=537 //environmental temperature in R
+Th=2000 //furnace temperature in R
+nthrev=1-T0/Th //thermal efficiency of reversible heat engine
+Qin=3000 //heat transfer rate from furnace in Btu/s
+Wrev=nthrev*Qin //exergy of the furnace in Btu/s
+printf("\n Hence, the rate of exergy flow associated with this heat transfer is = %.0f Btu/s. \n",Wrev);
\ No newline at end of file diff --git a/167/CH8/EX8.3/ex3.sce b/167/CH8/EX8.3/ex3.sce new file mode 100755 index 000000000..31ff0645f --- /dev/null +++ b/167/CH8/EX8.3/ex3.sce @@ -0,0 +1,13 @@ +//example 3
+//the rate of irreversibility of a heat engine
+clear
+clc
+Tsink=300 //Temp. of sink in K
+Tsource=1200 //Temp. of source in K
+nthrev=1-Tsink/Tsource //efficiency of carnot engine
+Qin=500 //rate at which heat is received from the source in kW
+Wrev=nthrev*Qin //maximum power produced by a heat engine in kW
+Wout=180 //actual power output in kW
+I=Wrev-Wout //irreversibility rate of the process in kW
+printf("\n Hence, the reversible power for this process is = %.0f kW. \n",Wrev);
+printf("\n The irreversibility rate is = %.0f kW. \n",I);
\ No newline at end of file diff --git a/167/CH8/EX8.4/ex4.sce b/167/CH8/EX8.4/ex4.sce new file mode 100755 index 000000000..f2442f24f --- /dev/null +++ b/167/CH8/EX8.4/ex4.sce @@ -0,0 +1,13 @@ +//example 4
+//irreversibility during cooling of an iron block
+clear
+clc
+m=500 //mass of iron block in kg
+cavg=0.45 //kJ/kg-K
+T1=473 //Initial Temp. in K
+T2=300 //Final Temp. in K
+Wrev=m*cavg*((T1-T2)-T2*log(T1/T2)) //reversible work in kJ
+Wu=0
+I=Wrev-Wu //irreversibility of the process in kJ
+printf("\n Hence, the reversible owrk for the pressure ois = %.0f kJ. \n",Wrev);
+printf("\n and irreversibility of the process is = %.0f kJ. \n",I);
\ No newline at end of file diff --git a/167/CH8/EX8.5/ex5.sce b/167/CH8/EX8.5/ex5.sce new file mode 100755 index 000000000..2867b832b --- /dev/null +++ b/167/CH8/EX8.5/ex5.sce @@ -0,0 +1,9 @@ +//example 5
+//heating potential of a hot iron block
+clear
+clc
+Tl=278 //Outdoor temp. in K
+Th=300 //Room temp. in K
+COPhp=1/(1-Tl/Th) //coefficient of performance of heat engine if its assumed to be reversible
+E=38925-8191+13.6*8191 //potential energy of hot iron block in kJ
+printf("\n Hence, the maxuimum amount of heat that can be supplied to the house is = %.0f MJ. \n",E/1000);
\ No newline at end of file diff --git a/167/CH8/EX8.6/ex6.sce b/167/CH8/EX8.6/ex6.sce new file mode 100755 index 000000000..8d79329f3 --- /dev/null +++ b/167/CH8/EX8.6/ex6.sce @@ -0,0 +1,10 @@ +//example 6
+//second law efficiency of resistance heaters
+clear
+clc
+Tl=283 //Outdoor Temp. in K
+Th=294 //Indoor Temp. in K
+COPhp=1/(1-Tl/Th) //coefficient of performance of reversible heat engine
+COP=1 //first law efficiency
+n=COP/COPhp //second law efficiency of resistance heater
+printf("\n Hence, the second law efficiency of the heater is = %.1f percent. \n",n*100);
\ No newline at end of file diff --git a/167/CH8/EX8.7/ex7.sce b/167/CH8/EX8.7/ex7.sce new file mode 100755 index 000000000..f92094e3b --- /dev/null +++ b/167/CH8/EX8.7/ex7.sce @@ -0,0 +1,14 @@ +//example 7
+//work potential of compressed air in tank
+clear
+clc
+To=300 //in K
+T1=To
+R=0.287 //kPa-m^3/kg-K
+V=200 //in m^3
+P1=1000 //kPa
+m1=P1*V/(R*T1) //in kg
+Po=100 //in kPa
+o1=R*To*(log(P1/Po)+Po/P1-1) //kJ/kg
+X1=m1*o1 //exergy content of compressed air in kJ
+printf("\n Hence, the exergy content of compressed air is = %.0f MJ. \n",X1/1000);
\ No newline at end of file diff --git a/167/CH8/EX8.8/ex8.sce b/167/CH8/EX8.8/ex8.sce new file mode 100755 index 000000000..32720a788 --- /dev/null +++ b/167/CH8/EX8.8/ex8.sce @@ -0,0 +1,16 @@ +//example8
+//exergy change during a compression process
+clear
+clc
+P1=0.14 //MPa
+T1=-10 //in celsius
+h1=246.36 //kJ/kg
+s1=0.9724 //kJ/kg-K
+P2=0.8 //MPa
+T2=50 //°C
+h2=286.69 //kJ/kg
+s2=0.9802 //kJ/kg-K
+To=293 //in K
+dw=h2-h1-To*(s2-s1) //exergy change of the refrigerant in kJ/kg
+winmin=dw //the minimum work input that needs to be supplied to the compressor per unit mass of the refrigerant in kJ/kg
+printf("\n Hence, the minimum work input that needs to be supplied to the compressor per unit mass of the refrigerant is = %.1f kJ/kg. \n",winmin);
diff --git a/167/CH9/EX9.10/ex10.sce b/167/CH9/EX9.10/ex10.sce new file mode 100755 index 000000000..179ab6c1f --- /dev/null +++ b/167/CH9/EX9.10/ex10.sce @@ -0,0 +1,39 @@ +//ex10
+//Second-Law Analysis of an Otto Cycle
+clear
+clc
+//In Example 9–2, various quantities of interest were given
+r=8;//constant ratio
+T0=290;//temp in K
+T1=290;//temp at state 1 in K
+T2=652.4;//temp at state 2 in K
+T3=1575.1;//temp at state 3 in K
+P2=179.97;//pressure at state 2 in kPa
+P3=434.5;//pressure at state 3 in kPa
+Qin=800;//heat input in kJ/kg
+Qout=381.83;//heat output in kJ/kg
+Wnet=418.17;//net work done in kJ/kg
+s3o=3.5045;//entropy at state 3
+s2o=2.4975;//entropy at state 2
+R=0.287;//gas constant at kJ/kg/mol/K
+
+s23=s3o-s2o-R*log(P3/P2);//entropy change for state 2 -3 kJ/kg.K
+Qin=800;//heat input in kJ/kg
+Tsource=1700;//source temperature in K
+xdest23=T0*(s23-Qin/Tsource);//irreversibilty for state 2 3
+//For process 4-1,
+s14=-s23;//entropy change at state 1 4
+Qout=381.83;//heat output in kJ/kg
+Tsink=290;//temp of sink in K
+xdest41=T0*(s14+Qout/Tsink);//irreversibility for state 4 1
+xdest12=0;//irreversibilty for state 1 2
+xdest34=0;//irreversibility at state 3 4
+xdestcycle=xdest12+xdest23+xdest34+xdest41;//net irreversibility
+printf('Irreversibility of cycle = %.1f kJ/kg \n',xdestcycle);
+s40=-s14;//entropy change for state 4 0 in kJ/k/kg
+u40=Qout;//internal energy at state 4 0 in kJ/kg
+v40=0;//specific volume at state 40 in m^3/kg
+v41=0;//specific volume at state 41 in m^3/kg
+P0=10;//initial pressure in kPa(junk value as P0 is multiplied by zero in next statement)
+Q=u40-T0*s40+P0*v40;//heat in kJ/kg
+printf(' Exergy distruction = %.1f kJ/kg \n',Q);
diff --git a/167/CH9/EX9.2/ex2.sce b/167/CH9/EX9.2/ex2.sce new file mode 100755 index 000000000..a8f05131c --- /dev/null +++ b/167/CH9/EX9.2/ex2.sce @@ -0,0 +1,52 @@ +//ques2
+//The Ideal Otto Cycle
+clear
+clc
+//the temperature and pressure of air at the end of the isentropic compression process (state 2), using data from Table A–17
+T1=290;//initial temp in K
+u1=206.9;//initial internal energy in kJ/kg
+vr1=676.1;//initial reduced volume
+//Process 1-2 (isentropic compression of an ideal gas)
+//vr2/vr1=v2/v1=1/r
+r=8;//ratio
+vr2=vr1/r;//reduced volume at state 2
+//using table corresponding to vr2
+T2=652.4;//final temp in K
+u2=475.11;//final internal energy in kJ/kg
+P1=100;//initial pressure in kPa
+P2=P1*T2/T1*r;//final pressure in kPa
+//Process 2-3 (constant-volume heat addition)
+Qin=800;//heat input in kJ/kg
+u2=1275.11;// intenal energy at state 2 in kJ/kg
+u3=Qin+u2;//internal energy at state 3 in kJ/kg
+//using tables corresponding to u3
+T3=1575.1;//temperature at state 3 in K
+vr3=6.108;//reduced volume at state 3
+printf('(a) T3,Temperature at state 3 = %.1f K \n',T3);
+vr3=6.108;//reduced volume at state 3
+P3=P2*(T3/T2)*1;//1 for v2/v3
+printf(' Pressure P3 = %.3f MPa \n',P3/1000);
+
+//(b)
+vr3=r*vr3;
+//now from table
+T4=795.6;//temp at state 4 in K
+u4=588.74;//internal energy at state 4 in kJ/kg
+//Process 4-1 (constant-volume heat rejection)
+Qout=u4-u1;//heat output in kJ/kg
+w=Qin-Qout;//work done in kJ/kg
+printf(' (b) Net work done = %.2f kJ/kg \n',w);
+
+//(c)
+nth=w/Qin;//efficiency of heat engine
+k=1.4;//constant
+no=1-r^(1-k);//thermal efficiency
+printf(' (c) The thermal efficiency of the cycle is determined from its definition = %.3f \n',nth);
+printf(' Under the cold-air-standard assumptions thermal efficiency would be = %.3f \n',no);
+
+//(d)
+//The mean effective pressure is determined from its definition
+R=0.287//gas constant for water
+v1=R*T1/P1//specific volume at state 1
+MEP=w/(v1*(1-1/r));//mean effective pressure in kPa
+printf(' (d) Mean effective pressure = %.0f kPa \n',MEP);
diff --git a/167/CH9/EX9.3/ex3.sce b/167/CH9/EX9.3/ex3.sce new file mode 100755 index 000000000..74061727c --- /dev/null +++ b/167/CH9/EX9.3/ex3.sce @@ -0,0 +1,45 @@ +//ques3
+//The Ideal Diesel Cycle
+clear
+clc
+disp('(a)');
+//(a) the temperature and pressure of air at the end of each process
+v1=117;//volume at state 1 in in^3
+r=18;//volume ratio for 1 2 process
+v2=v1/r;//volume at state 2 in in^3
+rc=2;//volume ratio for 2-3 process
+v3=rc*v2;//volume at state 3 in in^3
+v4=v1;//volume state 4 in in^3
+//Process 1-2 (isentropic compression of an ideal gas, constant specific heats)
+T1=540;//temperature at state 1 in R
+k=1.4;//constant
+T2=T1*(v1/v2)^(k-1)//temperature in state 2 in R r=v1/v2
+P1=14.7;//pressure at state 1 in psia
+P2=P1*(v1/v2)^k//pressure at state 2 in psia
+//Process 2-3 (constant-pressure heat addition to an ideal gas)
+P3=P2//pressure at state 3 in psia
+T3=T2*(v3/v2)//temp at state 3 in R rc=v3/v2
+//Process 3-4 (isentropic expansion of an ideal gas, constant specific heats)
+T4=T3*(v3/v4)^(k-1)//temp at state 4 in R
+P4=P3*(v3/v4)^k//pressure at state 4 in psia
+
+//(b)
+R=0.3704//gas constant for given substance in btu/R.lbm
+m=P1*v1/(R*T1)/1728;//mass in lbm
+//Process 2-3 is a constant-pressure heat-addition process, for which the boundary work and du terms can be combined to dh
+Cp=0.240//specific heat at constant pressure in Btu/lbm.R
+
+Qin=m*Cp*(T3-T2);//heat input in Btu
+
+//Process 4-1 is a constant-volume heat-rejection process
+Cv=0.171;//specific heat capacity at constant volume in Btu/lbm.R
+Qout=m*Cv*(T4-T1);//heat output in Btu
+
+w=Qin-Qout;//work done in Btu
+printf(' (b) Net work done = %.3f Btu \n',w);
+nth=w/Qin;//efficiency of heat engine
+printf(' The thermal efficiency = %.3f \n',nth);
+
+//(c)The mean effective pressure
+MEP=w/(v1-v2)*778*12;//mean effective pressure (multiplied by constants for unit conversion to psia)
+printf(' (c) Mean effectve pressure = %.0f psia \n ',MEP);
diff --git a/167/CH9/EX9.5/ex5.sce b/167/CH9/EX9.5/ex5.sce new file mode 100755 index 000000000..901427eea --- /dev/null +++ b/167/CH9/EX9.5/ex5.sce @@ -0,0 +1,33 @@ +//ques5
+//The Simple Ideal Brayton Cycle
+clear
+clc
+//Process 1-2 (isentropic compression of an ideal gas)
+T1=300;//initial temp in K
+//from table
+h1=300.19;//enthalpy of heat at state 1 in kJ/kg
+Pr1=1.386;//reduced pressure at state 1
+r=8;//constant ratio
+Pr2=r*Pr1;//reduced pressure at state 2, r=P2/P1
+//using table corresponding to Pr2
+T2=540;//temperature at state 2 in K
+printf('(a) Temperature at compressor exit T2 = %.0f K \n',T2);
+h2=544.35;//enthalpy of heat at state 2
+//Process 3-4 (isentropic expansion of an ideal gas)
+T3=1300;//temperature at state 3 in K
+h3=1395.97;//enthalpy of heat at state 3 in kJ/kg
+Pr3=330.9;//reduced pressure at state 3
+Pr4=Pr3/r;//reduced pressure at state 4, 1/r=P4/P3
+//from table
+T4=770;//temperature at state 4 in K
+printf(' Temperature at turbine = %.0f K \n',T4);
+h4=789.37;//enthalpy of heat at state 4 in kJ/kg
+//To find the back work ratio
+Win=h2-h1//work input in kJ/kg
+Wout=h3-h4//work output in kJ/kg
+Rbw=Win/Wout;//back work ratio
+printf(' (b) Back work ratio = %.3f \n',Rbw);
+Qin=h3-h2;//heat input in kJ/kg
+Wnet=Wout-Win;//net work
+nth=Wnet/Qin;//thermal efficiency
+printf(' (c) Thermal efficiency = %.3f ',nth);
diff --git a/167/CH9/EX9.6/ex6.sce b/167/CH9/EX9.6/ex6.sce new file mode 100755 index 000000000..e247f28a7 --- /dev/null +++ b/167/CH9/EX9.6/ex6.sce @@ -0,0 +1,25 @@ +//ques6
+//An Actual Gas-Turbine Cycle
+clear
+clc
+ws=244.16;//kJ/kg
+nc=0.80;//compressor efficiency
+Win=ws/nc;//work input in kJ/kg
+nt=0.85;//Turbine efficiency
+ws2=606.60;
+Wout=nt*ws2;//work output in kJ/kg
+Rbw=Win/Wout;//back work ratio
+printf('(a) Back work ratio = %.3f \n',Rbw);
+//(b) now air leaves the compressor at a higher temperature and enthalpy
+h1=300.19;//enthalpy of heat state 1 in kJ/kg
+h2a=h1+Win;//enthalpy of heat(a) in kJ/kg
+h3=1395.97;//enthalpy of heat at state 3 in kJ/kg
+Qin=h3-h2a;//heat input in kJ/kg
+Wnet=Wout-Win;//net work done in kJ/kg
+nth=Wnet/Qin;//thermal efficiency
+printf(' (b) Thermal Efficiency = %.3f \n',nth);
+//The air temperature at the turbine exit is determined from an energy balance on the turbine
+h4a=h3-Wout;//enthalpy of heat(a) at state 4 in kJ/kg
+//Now from table 17
+T4a=853;//temperature(a) at state 4 in K
+printf(' (c) Temperature T4a = %.0f K',T4a);
diff --git a/167/CH9/EX9.7/ex7.sce b/167/CH9/EX9.7/ex7.sce new file mode 100755 index 000000000..015f04ff0 --- /dev/null +++ b/167/CH9/EX9.7/ex7.sce @@ -0,0 +1,16 @@ +//ques7
+//Actual Gas-Turbine Cycle with Regeneration
+clear
+clc
+//The T-s diagram of the cycle is shown in Fig. 9–41 in book
+h2a=605.39;//enthalpy of heat(a) at state 2 in kJ/kg
+h4a=880.36;//enthalpy of heat(a) at state 4 in kJ/kg
+e=0.80;//effectiveness
+h5=e*(h4a-h2a)+h2a;//enthalpy of heat at state 5 in kJ/kg
+h3=1395.6;//enthalpy of heat at state 3 in kJ/kg
+Qin=h3-h5;//heat input in kJ/kg
+//This represents a savings of 220.0 kJ/kg from the heat input requirements. The addition of a regenerator (assumed to be frictionless) does not affect the net work output
+w=210.41;//work dodne in kJ/kg
+nth=w/Qin;//efficiency
+printf(' Thermal efficiency = %.3f ',nth);
+
diff --git a/167/CH9/EX9.8/ex8.sce b/167/CH9/EX9.8/ex8.sce new file mode 100755 index 000000000..1c7bd0336 --- /dev/null +++ b/167/CH9/EX9.8/ex8.sce @@ -0,0 +1,48 @@ +//ques8
+//A Gas Turbine with Reheating and Intercooling
+clear
+clc
+//For two-stage compression and expansion, the work input is minimized and the work output is maximized when both stages of the compressor and the turbine have the same pressure ratio
+
+//P2/P1=P4/P3=P6/P7=P8/P9=sqrt(8)=r
+//At inlets: T1=T3 h1=h3 T6=T8 h6=h8
+//At outlet T2=T4 h2=h4 T7=T9 h7=h9
+
+//In the absence of any regeneration, the back work ratio and the thermal efficiency are determined by using data from Table A–17
+T1=300;//temperature at state 1 in K
+h1=300.19;//enthalpy at state 1 in kJ/kg
+T3=T1;//temperature at state 3 in K
+h3=h1;//enthalpy at state 3
+Pr1=1.386;//reduced pressure at state 1
+r=sqrt(8);//constant ratio
+Pr2=Pr1*r;//here r is for P2/P1
+//from table
+T2=403.3;//temp at state 2 in K
+T4=T2;//temp at state 4 in K
+h2=404.31;//enthalpy at state 2 in kJ/kg
+h4=h2;//enthalpy at state 4
+
+T6=1300;//temperature at state 6 in K
+T8=T6;//temp at state 8
+h6=1395.97;//enthalpy at state 6
+h8=h6;//enthalpy at state 8
+Pr6=330.9;//reduced pressure at state 6
+Pr7=1/r*Pr6;//reduced pressure at state 7
+T7=1006.4;//temperature at state 7 in K
+T9=T7;//temperature at state 9 in K
+h7=1053.33;//enthalpy at state 7 in kJ/kg
+h5=h7;//enthalpy at state 5
+h9=h7;//enthalpy at state 9
+Wcompin=2*(h2-h1);//input work in compression in kJ/kg
+Wturbout=2*(h6-h7);//output turbine work in kJ/kg
+Wnet=Wturbout-Wcompin;//net work done in kJ/kg
+Qin=(h6-h4)+(h8-h7);//input heat in kJ/kg
+Rbw=Wcompin/Wturbout;//back work ratio
+printf('(a) Back work ratio = %.3f \n',Rbw);
+nth=Wnet/Qin;//thermal efficiency
+printf(' (b) Thermal Efficiency = %.3f \n',nth);
+
+//(b)
+qin=(h6-h5)+(h8-h7);//input specific heat in kJ/kg
+nth=Wnet/qin;//thermal efficiency
+printf(' (c) Thermal efficiency in this case = %.3f \n',nth);
diff --git a/167/CH9/EX9.9/ex9.sce b/167/CH9/EX9.9/ex9.sce new file mode 100755 index 000000000..9b970c7f5 --- /dev/null +++ b/167/CH9/EX9.9/ex9.sce @@ -0,0 +1,39 @@ +//ex9
+//The Ideal Jet-Propulsion Cycle
+clear
+clc
+//Process 1-2 (isentropic compression of an ideal gas in a diffuser)
+T1=420;//temp at state 1 in R
+v1=850;//velocity at state 1 in ft/s
+Cp=0.240;//Btu/lbm.R
+T2=T1+v1^2/(2*Cp)/25037;//temp at state 2 (divided by 25037 to convert it into R)
+P1=5;//pressure at state 1 in psia
+k=1.4;//constant ratio
+P2=P1*(T2/T1)^(k/(k-1));//pressure at state 2 in psia
+//Process 2-3 (isentropic compression of an ideal gas in a compressor)
+rp=10;//constant ratio
+P3=rp*P2;//pressure at state 3 in psia
+P4=P3;//pressure at state 4
+T3=T2*(P3/P2)^(1-1/k);//temp at state 3 in R
+//Process 4-5 (isentropic expansion of an ideal gas in a turbine)
+//Wcompin=Wturbout from this we get T5=T4-T3+T2
+T4=2460;//temp at state 4 in R
+T5=T4-T3+T2;//temp at state 5 in R
+P5=P4*(T5/T4)^(k/(k-1));//pressure at state 5 in psia
+printf('(a) T5 = %.0f R \n',T5);
+printf(' P5 = %.1f psia \n',P5 );
+//Process 5-6 (isentropic expansion of an ideal gas in a nozzle)
+P6=5;//pressure at state 6 in psia
+T6=T5*(P6/P5)^(1-1/k);//temp at state 6 in R
+v6=sqrt(-1*2*Cp*(T6-T5)*25037);//velocity at state 6 in ft/s
+printf(' (b) Velocity v6 = %.0f ft/s \n',v6);
+//The propulsive efficiency of a turbojet engine is the ratio of the propulsive power developed Wp to the total heat transfer rate to the working fluid
+ms=100;//mass flow rate in lbm/s
+Vexit=3288;//exit volume in ft^3
+Vinlet=850;//inlet volume in ft^3
+Vaircraft=850;//aircraft volume in ft^3
+
+Wp=ms*(Vexit-Vinlet)*Vaircraft/25037;//power in Btu/s
+Qin=ms*Cp*(T4-T3);//input heat in kJ/kg
+np=Wp/Qin;//efficiency
+printf(' (c) Efficiency = %.3f \n',np);
\ No newline at end of file |