diff options
Diffstat (limited to '2120')
92 files changed, 1805 insertions, 0 deletions
diff --git a/2120/CH1/EX1.11/ex1_11.sce b/2120/CH1/EX1.11/ex1_11.sce new file mode 100755 index 000000000..14eb6191f --- /dev/null +++ b/2120/CH1/EX1.11/ex1_11.sce @@ -0,0 +1,13 @@ +// Exa 1.11
+clc;
+clear;
+close;
+// Given data
+V = 50;// km per hr
+V = V * (1000/3600);// in m per sec
+F = 900;// in N
+P = F * V;// in watt
+P = P *10^-3;// in kW
+disp(P,"Power of the engine of a car in kW is : ");
+H = P * 60;// in kJ
+disp(H,"Heat equivalent of work per minute in kJ is");
diff --git a/2120/CH1/EX1.12/ex1_12.sce b/2120/CH1/EX1.12/ex1_12.sce new file mode 100755 index 000000000..f7b708ae2 --- /dev/null +++ b/2120/CH1/EX1.12/ex1_12.sce @@ -0,0 +1,11 @@ +// Exa 1.12
+clc;
+clear;
+close;
+// Given data
+E_air = 200-100;// in kJ/kg
+E_lost = 40;// in kJ/kg
+E_total = E_air + E_lost;// in kJ per kg
+M = 0.5;// mass flow rate in kg per s
+P = M * E_total;// in kJ/s
+disp(P,"Power required for an air mass flowin kJ/s is :");
diff --git a/2120/CH1/EX1.13/ex1_13.sce b/2120/CH1/EX1.13/ex1_13.sce new file mode 100755 index 000000000..419fc0010 --- /dev/null +++ b/2120/CH1/EX1.13/ex1_13.sce @@ -0,0 +1,15 @@ +// Exa 1.13
+clc;
+clear;
+close;
+// Given data
+m_b = 1;// in kg
+t_ib = 80;//in degree c
+m_w = 10;// in kg
+t_iw = 25;// in degree c
+del_t = 5;// in degree c
+S_w = 4.18;// in kJ/kg
+t_equ = (t_iw + del_t);// in degree c
+// Heat loss by metal = Heat gained by water
+S_b = m_w * S_w * (t_equ - t_iw)/(m_b * (t_ib - t_equ));// in kJ/kg-K
+disp(S_b,"Specific heat of metal block in kJ/kg-K is");
diff --git a/2120/CH1/EX1.15/ex1_15.sce b/2120/CH1/EX1.15/ex1_15.sce new file mode 100755 index 000000000..5087d3f63 --- /dev/null +++ b/2120/CH1/EX1.15/ex1_15.sce @@ -0,0 +1,25 @@ +// Exa 1.15
+clc;
+clear;
+close;
+// Given data
+P_gauge = 90;// in cm of hg
+P_atm = 760;// in mm of hg
+P_atm = 76;// in cm of hg
+P_abs = P_gauge + P_atm;// in cm of hg
+P_abs = P_abs * (101.32/76);// in kPa
+disp(P_abs,"Reading of pressure in kPa");
+// Part (b)
+P_vacuum = 40;// in cm of hg
+P_abs = P_atm - P_vacuum;// in cm of hg
+P_abs = P_abs * (101.32/76);// in kpa
+disp(P_abs,"Reading of pressure to kpa");
+// Part (c)
+Rho = 1000;// in kg per m^3
+g = 9.81;//
+h = 1.2;// in m
+P_gauge = Rho * g * h;// in N m^2
+P_gauge= P_gauge*10^-3;// in kPa
+P_atm = 101.32;// in kPa
+P_abs = P_gauge + P_atm;// in kpa
+disp(P_abs,"Reading of pressure in kPa");
diff --git a/2120/CH1/EX1.16/ex1_16.sce b/2120/CH1/EX1.16/ex1_16.sce new file mode 100755 index 000000000..074106679 --- /dev/null +++ b/2120/CH1/EX1.16/ex1_16.sce @@ -0,0 +1,12 @@ +// Exa 1.16
+clc;
+clear;
+close;
+// Given data
+g=9.81;// in m/s^2
+P=1.0332*10^5;// in kN/m^2
+v='(2.3*10^4/p)^1/1.4';// given expression
+H= 1/g*(2.3*10^4)^(1/1.4)*integrate('(1/p)^(1/1.4)','p',0,P);// in m
+disp(H*10^-3,"The value of H in km is : ")
+
+// Note: There is the calculation error in the book in this question, so the answer in the book is wrong.
diff --git a/2120/CH1/EX1.2/ex1_2.sce b/2120/CH1/EX1.2/ex1_2.sce new file mode 100755 index 000000000..1a222da33 --- /dev/null +++ b/2120/CH1/EX1.2/ex1_2.sce @@ -0,0 +1,11 @@ +// Exa 1.2
+clc;
+clear;
+close;
+// Given data
+Pvacc = 700;// mm of hg
+Patm = 760;// mm of hg
+Pabs = Patm - Pvacc;// mm of hg
+disp(Pabs/760,"Absolute pressure in in kg/cm^2 is :");// as 1kg/cm^2= 760 mm of Hg
+disp(Pabs*1.01325/760,"Absolute pressure in bar is : ");// as 1.01325 bar = 760 mm of Hg
+disp(Pabs*1.01325/760*10^2,"Absolute pressure in in kPa");// as 1 bar = 10^2 kPa
diff --git a/2120/CH1/EX1.3/ex1_3.sce b/2120/CH1/EX1.3/ex1_3.sce new file mode 100755 index 000000000..157eb10a6 --- /dev/null +++ b/2120/CH1/EX1.3/ex1_3.sce @@ -0,0 +1,16 @@ +//Exa 1.3
+clc;
+clear;
+close;
+// Given data
+Patm = 101;// kpa
+Rho = 13.6 * 10^3;// in kg per m^3
+h = 250;// in cm
+h = h*10^-2;// in m
+g = 9.806;
+p = Rho * g * h;// in N/m^2
+p= p*10^-3;// in kPa
+// Total pressure in tank
+p = p + Patm;// in kpa
+p = p*10^-3;// in Mpa
+disp(p,"Total pressure in tank in Mpa");
diff --git a/2120/CH1/EX1.4/ex1_4.sce b/2120/CH1/EX1.4/ex1_4.sce new file mode 100755 index 000000000..4869238ac --- /dev/null +++ b/2120/CH1/EX1.4/ex1_4.sce @@ -0,0 +1,18 @@ +// Exa 1.4
+clc;
+clear;
+close;
+// Given data
+m = 1.5;// in kg
+pi = 0.1;// in MPa
+pi= pi*10^6;// in Pa
+pf = 0.7;// in MPa
+pf= pf*10^6;// in Pa
+rho_i = 1.16;// kg per m^3
+vi = m/rho_i;// in m^3
+WorkDone= pi*vi*log(pi/pf);// in J
+disp(WorkDone*10^-3,"Work done in kJ is : ")
+if WorkDone<0 then
+disp("The -ve sign indicates work is done on the system, hence");
+disp((WorkDone*10^-3),"The work done by the piston in kJ is : ")
+end
diff --git a/2120/CH1/EX1.5/ex1_5.sce b/2120/CH1/EX1.5/ex1_5.sce new file mode 100755 index 000000000..b1ffabd14 --- /dev/null +++ b/2120/CH1/EX1.5/ex1_5.sce @@ -0,0 +1,12 @@ +// Exav1.5
+clc;
+clear;
+close;
+// Given data
+p = 1.0;// in Mpa
+p = p*10^6;// in N per m^2
+del_v = 1.5;//m^3 per min
+del_v = del_v*60;// m^3 per h
+W = p * del_v;// W stands for work done in J
+W = W*10^-6;// in MJ
+disp(W,"Work done by the pump upon the water in an hour in MJ is : ");
diff --git a/2120/CH1/EX1.6/ex1_6.sce b/2120/CH1/EX1.6/ex1_6.sce new file mode 100755 index 000000000..3ddd6e19a --- /dev/null +++ b/2120/CH1/EX1.6/ex1_6.sce @@ -0,0 +1,19 @@ +// Exa 1.6
+clc;
+clear;
+close;
+// Given data
+// W = 2*g*h
+// due to stirring of water
+g = 9.81;
+J = 4.1868*10^3;
+m = (0.2+10*10^-3)*10^3;// in gm
+s= 1;// in cal per gm°C
+del_T = 2;// in ° C
+H = m * s * del_T;// in cal
+H = H*10^-3;// in kcal
+// W = JH and W= 2*g*h
+h = J*H/(2 * g);// in m
+disp(h,"The height from the mass should be fall in meter is :");
+
+
diff --git a/2120/CH1/EX1.7/ex1_7.sce b/2120/CH1/EX1.7/ex1_7.sce new file mode 100755 index 000000000..283bd9b02 --- /dev/null +++ b/2120/CH1/EX1.7/ex1_7.sce @@ -0,0 +1,21 @@ +// Exa 1.7
+clc;
+clear;
+close;
+// Given data
+// mass of 1 litr of water is 1 kg. so
+m = 5000;// in kg
+h = 10-1;// in m
+g= 9.81;//
+PE = m * g * h;// in N m
+PE = PE*10^-3;// in kj
+Eta = 0.85;
+// Eta = energy output/energy input
+E_input = PE/Eta;// in Kj
+E_input = E_input*10^3;// in J
+t = 45;// time in min
+t = t*60;// in sec
+P = E_input/t;// in J/s
+P = P*10^-3;// in kW
+disp(P,"Power required for the feed pump in kW is :");
+
diff --git a/2120/CH10/EX10.1/ex10_1.sce b/2120/CH10/EX10.1/ex10_1.sce new file mode 100755 index 000000000..ab69cf138 --- /dev/null +++ b/2120/CH10/EX10.1/ex10_1.sce @@ -0,0 +1,17 @@ +//Exa 10.1
+clc;
+clear;
+close;
+// Given data
+p1 = 10;// in bar
+p2 = 0.5;// in bar
+T1 = 179.9;// in °C
+T1 = T1 +273;// in K
+T2 = 81.4;// in °C
+T2 = T2 + 273;// in K
+Eta_carnot = (T1 - T2)/T1*100;// in %
+disp(Eta_carnot,"Carnot efficiency of an engine when the steam is 0.87 dry in % is");
+disp(Eta_carnot,"Carnot efficiency of an engine when the steam is dry saturated in % is");
+T1 = T1 + 50;// in K
+Eta_carnot1 = (T1 - T2) / T1*100;// in %
+disp(Eta_carnot1,"Carnot efficiency of an engine when the steam is superheated in % is");
diff --git a/2120/CH10/EX10.13/ex10_13.sce b/2120/CH10/EX10.13/ex10_13.sce new file mode 100755 index 000000000..d5a3a017d --- /dev/null +++ b/2120/CH10/EX10.13/ex10_13.sce @@ -0,0 +1,26 @@ +// Exa 10.13
+clc;
+clear;
+close;
+// Given data
+Q = 1100;// in kW
+m=1;// in kg
+p1 = 15;// in bar
+p1 = p1 * 10^5;// in Pa
+p1 = p1 * 10^-3;// in kPa
+p2 = 0.05 * 10^2;// in kPa
+v1 = 0.16;// m^3 per kg
+v2 = 26;// in m^3 per kg
+V1 = 110;// in m per s
+V2 = 120;// in m per s
+u1 = 2935;// in kJ per kg
+u2 = 1885;// in kJ per kg
+g = 9.8;
+z1 = 0;
+z2 = 0;
+// Formula Q-W= m*{(u2 - u1) + (p2*v2-p1*v1)+1/2*(V2^2-V1^2)+g*(z2 - z1)}
+W =Q-m*{(u2 - u1) + (p2*v2-p1*v1)+1/2*(V2^2-V1^2)+g*(z2 - z1)};// in kW
+disp(W,"Work output per kg in kW is");
+SteamFlowRate = Q / W;// in kg/sec
+SteamFlowRate = SteamFlowRate * 3600;// in kg per hr
+disp(SteamFlowRate,"Steam flow rate in kg/hr is");
diff --git a/2120/CH10/EX10.14/ex10_14.sce b/2120/CH10/EX10.14/ex10_14.sce new file mode 100755 index 000000000..0d24331cb --- /dev/null +++ b/2120/CH10/EX10.14/ex10_14.sce @@ -0,0 +1,16 @@ +// Exa 10.14
+clc;
+clear;
+close;
+// Given data
+h_sen = 191.9;// in kJ/kg
+L = 2392;// in kJ/kg
+x = 0.95;
+t_o = 35;// in °C
+t_i = 20;// in °C
+C = 4.18;
+H_totalwet = h_sen + (x * L);//in kJ/kg
+// m_steam * (H_totalwet - h_sen) = m_water * C * (t_o - t_i)
+msBYmw = (H_totalwet - h_sen) / ( C * (t_o - t_i));//
+disp(msBYmw,"The Ratio of mass flow rate of cooling water to condensing steam is : ");
+
diff --git a/2120/CH10/EX10.2/ex10_2.sce b/2120/CH10/EX10.2/ex10_2.sce new file mode 100755 index 000000000..f410224b2 --- /dev/null +++ b/2120/CH10/EX10.2/ex10_2.sce @@ -0,0 +1,17 @@ +// Exa 10.2
+clc;
+clear;
+close;
+// Given data
+h1 = 3015;// in kJ/kg
+h2 = 2326;// in kJ/kg
+h3 = 113;// in kJ/kg
+h4 = 114.95;// in kJ/kg
+Q = h1 - h4;// in kJ/kg
+disp(Q,"Heat supplied to the boiler in kJ/kg is");
+W_T = h1 - h2;/// in kJ/kg
+disp(W_T,"Work developed by turbine in kJ/kg is : ");
+W_P = ( h1 - h3) - Q;// in kJ/kg
+disp(W_P,"Work absorbed by pump in kJ/kg is : ");
+Eta = (W_T - W_P)/Q*100;// in %
+disp(Eta,"Efficiency of flow system in % is : ");
diff --git a/2120/CH10/EX10.3/ex10_3.sce b/2120/CH10/EX10.3/ex10_3.sce new file mode 100755 index 000000000..3aff45c6f --- /dev/null +++ b/2120/CH10/EX10.3/ex10_3.sce @@ -0,0 +1,44 @@ +// Exa 10.3
+clc;
+clear;
+close;
+// Given data
+phi_s = 6.583;
+phi_w = 1.091;
+phi_s1 = 6.504;
+C_p = 2.25;
+T_sat =179.9;// in °C
+T_sat = T_sat + 273;// in K
+T_sup = T_sat + 50;// in K
+x2 = (phi_s - phi_w)/phi_s1;
+H1 = 2776.2; // in kJ/kg
+H_w2 = 340.6;// in kJ/kg
+L2 = 2305;
+H2 = H_w2 + (x2 * L2);// in kJ/kg
+Eta_rankine = (H1 - H2)/(H1 - H_w2)*100;// in %
+disp(Eta_rankine,"Rankine efficiency in % is");
+phi_w1 = 2.138;
+x1 = 0.87;
+phi_s1 = 4.445;
+phi_w2 = 1.091;
+phi_s2 = 6.504;
+x2 = (phi_w1 + (x1 * phi_s1) - phi_w2) / phi_s2;
+H1 = 762.6 + (x1 * 2013.6);// in kJ/kg
+H2 = 340.6 + (x2 * 2305);// in kJ/kg
+Eta_rankine1 = (H1 - H2) / (H1 - H_w2)*100;// in %
+PerDropInRankine= (Eta_rankine - Eta_rankine1)/Eta_rankine * 100;// in %
+disp(PerDropInRankine,"Percentage drop in Rankine efficiency in % is : ");
+phi_s1 = 6.583;
+phi_w1 = 1.091;
+phi_s2 = 6.504;
+x2 = (phi_s1 + C_p * log(T_sup/T_sat) - phi_w1)/phi_s2;
+H_s1 = 2776.2;
+H1 = H_s1 + C_p * (T_sup - T_sat);// in kJ/kg
+H2 = 340.6 + (0.88 * 2305);// in kJ/kg
+H_w2 = 340.6;
+Eta_rankine2 = (H1 - H2) / (H1 - H_w2);
+Eta_rankine2 = Eta_rankine2 * 10^2;// in percentage
+PerIncInRank = ((Eta_rankine2 - Eta_rankine)/Eta_rankine2) * 100;// in percentage
+disp(PerIncInRank,"Percentage increase in rankine efficiency in % is :");
+
+
diff --git a/2120/CH10/EX10.4/ex10_4.sce b/2120/CH10/EX10.4/ex10_4.sce new file mode 100755 index 000000000..a6031ed58 --- /dev/null +++ b/2120/CH10/EX10.4/ex10_4.sce @@ -0,0 +1,26 @@ +//Exa 10.4
+clc;
+clear;
+close;
+// Given data
+H2 = 2776.2;// in kJ/kg
+p1 = 10;// in bar
+p_2 = 1;// in bar
+p_3 = 0.25;// in bar
+p_4 = p_3;// in bar
+// w = (H2 - H_2) + ((p_2 - p_3) * v_2);// work done in kJ/kg
+phi_2 = 6.583;
+phi_d2 = 1.303;
+L = 6.057;
+x_2 = (phi_2 - phi_d2) / L;
+H2_desh = 417.5 + (x_2* 2257.9);// in kJ/kg
+v_s = 1.694;
+v_2 = x_2 * v_s;// in m^3 per kg
+w = (H2 - H2_desh) + ((p_2 - p_3) * v_2);// in kJ/kg
+H4 = 282.7;// in kJ/kg
+H_w4 =H4;// in kJ/kg
+HeatSupplied = H2 - H4;// kJ/kg
+Eta_modifiedRankine = w / HeatSupplied*100;// in %
+disp(Eta_modifiedRankine,"Thermal effienciency of the cycle in % is : ");
+HeatRemoved = HeatSupplied - w;// in kJ/kg
+disp(HeatRemoved,"Heat removed in condenser in kJ/kg is : ");
diff --git a/2120/CH11/EX11.1/ex11_1.sce b/2120/CH11/EX11.1/ex11_1.sce new file mode 100755 index 000000000..499008f34 --- /dev/null +++ b/2120/CH11/EX11.1/ex11_1.sce @@ -0,0 +1,17 @@ +// Exa 11.1
+clc;
+clear;
+close;
+// Given data
+n = 3;
+l = 80;// in mm
+d = 76;// in mm
+r = 8.5;
+V_s = (%pi/4) * d * d * l;// in mm^3
+V_s = V_s * 10^-3;// in cm^3
+// r = 1+ (V_s/V_c)
+V_c = (1/(r - 1)) * V_s;// in cm^3
+disp(V_c*10^3,"Clearance volume of cylinder in mm^3 is : ");
+C = V_s * n;// C stands for capacity of engine in cm^3
+C = C * 10^-3;// in litre
+disp(C,"Capacity of the engine in litre is :");
diff --git a/2120/CH2/EX2.1/exa_2_1.sce b/2120/CH2/EX2.1/exa_2_1.sce new file mode 100755 index 000000000..0e178bb87 --- /dev/null +++ b/2120/CH2/EX2.1/exa_2_1.sce @@ -0,0 +1,14 @@ +// Exa 2.1
+clc;
+clear;
+close;
+// Given data
+p1= 2;// in bar
+v1= 30;// in litre
+T1= 27+273;// in K
+T2= -3+273;// in K
+v2= v1;// in litre
+// Gas law p1*v1/T1= p2*v2/T2
+p2= p1*v1*T2/(T1*v2);// in bar
+disp(p2,"The air pressure in the tyre in bar is :")
+
diff --git a/2120/CH2/EX2.12/exa_2_12.sce b/2120/CH2/EX2.12/exa_2_12.sce new file mode 100755 index 000000000..cf190e289 --- /dev/null +++ b/2120/CH2/EX2.12/exa_2_12.sce @@ -0,0 +1,13 @@ +// Exa 2.12
+clc;
+clear;
+close;
+// Given data
+AvogadroNo= 6.023*10^23;
+n= 5/AvogadroNo;// number of moles
+v=10^-6;// in m^3
+T= -270+273;// in K
+R= 0.287;
+p= n*R*T/v;// in kPa
+p= p*10^18;// in aPa
+disp("The pressure in the space is "+string(p)+" aPa");
diff --git a/2120/CH2/EX2.13/exa_2_13.sce b/2120/CH2/EX2.13/exa_2_13.sce new file mode 100755 index 000000000..d34e993fd --- /dev/null +++ b/2120/CH2/EX2.13/exa_2_13.sce @@ -0,0 +1,12 @@ +// Exa 2.13
+clc;
+clear;
+close;
+// Given data
+T1= 300;// in K
+T2= 900;// in K
+m=2;// in kg
+Cp= '40+600/sqrt(T)+7000/T';// in kJ/kg mole K
+delta_H=m* integrate('40-600/sqrt(T)+7000/T','T',T1,T2);// in kJ/kg mole
+delta_H= delta_H/17.03;// in kJ/kg
+disp(delta_H,"Change in enthalpy in kJ/kg is : ")
diff --git a/2120/CH2/EX2.14/exa_2_14.sce b/2120/CH2/EX2.14/exa_2_14.sce new file mode 100755 index 000000000..522088c61 --- /dev/null +++ b/2120/CH2/EX2.14/exa_2_14.sce @@ -0,0 +1,24 @@ +// Exa 2.14
+clc;
+clear;
+close;
+// Given data
+m=12;// in kg mol
+v=723.7;// in m^3
+T=140;// in °C
+T=T+273;// in K
+rho= 0.644;// in kg/m^3
+Ro= 8314;// in J/kg-mole K
+// rho= m/v, where m in Kg , so rho= m*M/v
+M= rho*v/m;
+m= m*M;// in kg
+disp(M,"Molecular weight is : ")
+
+// Part (b)
+R= Ro/M;// in J/kg K
+disp(R*10^-3,"Gas constant in kJ/kg K")
+
+// Part(c)
+p= m*R*T/v;// in N/m^2
+p=p*10^-5;// in bar
+disp(p,"The pressure of the gas in bar is : ")
diff --git a/2120/CH2/EX2.15/exa_2_15.sce b/2120/CH2/EX2.15/exa_2_15.sce new file mode 100755 index 000000000..07a7c0212 --- /dev/null +++ b/2120/CH2/EX2.15/exa_2_15.sce @@ -0,0 +1,16 @@ +// Exa 2.15
+clc;
+clear;
+close;
+// Given data
+p= 0.98;// in bar
+p= p*10^5;// in N/m^2
+v=1000;// in m^3
+T= 27+273;// in K
+g= 9.8;
+M=2;
+Ro= 8314;// in J/kg-mole K
+R=Ro/M;// in kg K
+m= p*v/(R*T);// in kg
+W= m*g;// in N
+disp(W,"The load that can be lifted with the air of aerostat in N is : ")
diff --git a/2120/CH2/EX2.16/exa_2_16.sce b/2120/CH2/EX2.16/exa_2_16.sce new file mode 100755 index 000000000..aad52a47d --- /dev/null +++ b/2120/CH2/EX2.16/exa_2_16.sce @@ -0,0 +1,11 @@ +// Exa 2.16
+clc;
+clear;
+close;
+// Given data
+T1= 500;// in K
+T2= 2000;// in K
+m=1;// in kg
+Cp= '11.515-172/sqrt(T)-1530/T';// in kcal/kg mole K
+delta_H=m* integrate('11.515-172/sqrt(T)-1530/T','T',T1,T2);// in kcal/kg mole
+disp(delta_H,"Change in enthalpy in kcal/kg mole is : ")
diff --git a/2120/CH2/EX2.17/exa_2_17.sce b/2120/CH2/EX2.17/exa_2_17.sce new file mode 100755 index 000000000..5e7a65551 --- /dev/null +++ b/2120/CH2/EX2.17/exa_2_17.sce @@ -0,0 +1,15 @@ +// Exa 2.17
+clc;
+clear;
+close;
+// Given data
+u='196+0.718*t';
+pv= '0.278*(t+273)';
+duBydt= 0.718;
+Cv= duBydt;// in kJ/kg-K
+h= u+pv;
+h='273.351+1.005*t';
+dhBydt= 1.005;// in kJ/kg-K
+Cp= dhBydt;// in kJ/kg-K
+disp(Cv,"The value of Cv in kJ/kg-K is : ")
+disp(Cp,"The value of Cp in kJ/kg-K is : ")
diff --git a/2120/CH2/EX2.2/exa_2_2.sce b/2120/CH2/EX2.2/exa_2_2.sce new file mode 100755 index 000000000..39de168ba --- /dev/null +++ b/2120/CH2/EX2.2/exa_2_2.sce @@ -0,0 +1,34 @@ +// Exa 2.2
+clc;
+clear;
+close;
+// Given data
+p= 12;// in bar
+p=p*10^5;// in N/m^2
+v= 25;// in m^3
+T= 30+273;// in K
+// Part (a) Mass of each gas
+//Formula p*v=m*R*T
+R_U= 8314;// in J/kg-mole K
+M_N2= 28.016;// in mole
+M_O2= 32;// in mole
+M_CO2= 44;// in mole
+R_N2= R_U/M_N2;// in J/kg K
+R_O2= R_U/M_O2;// in J/kg K
+R_CO2= R_U/M_CO2;// in J/kg K
+m_of_N2= p*v/(R_N2*T);// in kg
+m_of_O2= p*v/(R_O2*T);// in kg
+m_of_CO2= p*v/(R_CO2*T);// in kg
+disp(m_of_N2,"The mass of Nitrogen gas stored in the vessel in kg is : ")
+disp(m_of_O2,"The mass of Oxygen gas stored in the vessel in kg is : ")
+disp(round(m_of_CO2),"The mass of Carbon dioxide gas stored in the vessel in kg is : ")
+
+// Part (b) Molar Volume
+// Formula v_molar= M*R*T/p= R_U*T/p
+v_molar= R_U*T/p;// in m^3
+disp(v_molar,"Molar volume of the gas mixture in m^3 is : ")
+
+// Part (c) Average density
+// rho_avg= total mass/total volume
+rho_avg= (m_of_N2+m_of_O2+m_of_CO2)/v;// in kg/m^3
+disp(rho_avg,"Average density of the gas mixture in kg/m^3 is : ")
diff --git a/2120/CH2/EX2.3/exa_2_3.sce b/2120/CH2/EX2.3/exa_2_3.sce new file mode 100755 index 000000000..062db4c22 --- /dev/null +++ b/2120/CH2/EX2.3/exa_2_3.sce @@ -0,0 +1,19 @@ +// Exa 2.3
+clc;
+clear;
+close;
+// Given data
+Qp= 1230; // kJ/kg
+Qv= 795; // kJ/kg
+t1= 16;// in °C
+t2= 96;// in °C
+R_U= 8.314;
+delta_T= t2-t1;// in °C
+Cp= Qp/delta_T;// in kJ/kg °C
+disp(Cp,"The value of Cp in kJ/kg°C")
+Cv= Qv/delta_T;// in kJ/kg °C
+disp(Cv,"The value of Cv in kJ/kg°C")
+R= Cp-Cv;// in kJ/kg °C
+disp(R,"The value of R in kJ/kg°C")
+molecular_weight= R_U/R;
+disp(molecular_weight,"Molecular weight of the gas is : ")
diff --git a/2120/CH2/EX2.4/exa_2_4.sce b/2120/CH2/EX2.4/exa_2_4.sce new file mode 100755 index 000000000..b0a65f69e --- /dev/null +++ b/2120/CH2/EX2.4/exa_2_4.sce @@ -0,0 +1,17 @@ +// Exa 2.4
+clc;
+clear;
+close;
+// Given data
+a= 0.85;
+b= 0.00004;
+c= 5*10^-5;
+T1= 300;// in K
+T2= 2300;// in K
+gama= 1.5;// the ratio of specific heats
+m=1;// in kg
+delta_H= m*integrate('a+b*T+c*T^2','T',T1,T2);// in kJ
+disp(delta_H*10^-3,"Change in enthalpy in MJ is : ")
+// Formula delta_U= integration of m*Cv = integration of m*Cp/gama= delta_H/gama
+delta_U= delta_H/gama;// in kJ
+disp(delta_U*10^-3,"The change in internal energy in MJ is : ")
diff --git a/2120/CH2/EX2.5/exa_2_5.sce b/2120/CH2/EX2.5/exa_2_5.sce new file mode 100755 index 000000000..b30a45489 --- /dev/null +++ b/2120/CH2/EX2.5/exa_2_5.sce @@ -0,0 +1,20 @@ +// Exa 2.5
+clc;
+clear;
+close;
+// Given data
+v= 0.9/3;// in m^3/kg
+v= 2*v;// in m^3/kg mole (as M_hydrogen = 2)
+T=120+273;// in K
+R=8314;// in J/kg mole K
+a=2.51*10^4;// in Nm^4/(kg mole)^2
+b= 0.0262;
+// Part (a)
+p= R*T/v;// in N/m^2
+p= p*10^-5;// in bar
+disp(p,"Using perfect gas law the pressure for unit mass of hydrogen in bar is : ")
+
+// Part (b)
+p= R*T/(v-b)-a/v^2;// N/m^2
+p= p*10^-5;// in bar
+disp(p,"Using Van der waals equation, the pressure in bar is : ")
diff --git a/2120/CH2/EX2.6/exa_2_6.sce b/2120/CH2/EX2.6/exa_2_6.sce new file mode 100755 index 000000000..d4902d050 --- /dev/null +++ b/2120/CH2/EX2.6/exa_2_6.sce @@ -0,0 +1,12 @@ +// Exa 2.6
+clc;
+clear;
+close;
+// Given data
+p1= 0.98;// in bar
+p2= 0.6;// in bar
+v1= 0.45;// in m^3/kg
+// Applying Boyle's law
+v2= p1*v1/p2;// in m^3/kg
+rho2= 1/v2;// in kg/m^3
+disp(rho2,"The density of the gas under the changed condition in kg/m^3 is : ")
diff --git a/2120/CH2/EX2.7/exa_2_7.sce b/2120/CH2/EX2.7/exa_2_7.sce new file mode 100755 index 000000000..93220b4d3 --- /dev/null +++ b/2120/CH2/EX2.7/exa_2_7.sce @@ -0,0 +1,23 @@ +// Exa 2.7
+clc;
+clear;
+close;
+// Given data
+r=5;// in cm
+R_U= 8314
+T= 27+273;// in K
+V= 4/3*%pi*r^3;// volume of balloon in cm^3
+// atmPressure= 75 cm off mercury = 75/76*1.01325
+atmPressure= round(75/76*1.01325) ;// in bar
+p= atmPressure;// pressure of hydrogen in balloon in bar
+p=p*10^5;// in N/m^2
+R= R_U/2;// in J/kg K
+m1= p*V/(R*T);// in kg
+// The volume of air displaced = the volume of balloon, so
+R=287;
+T=20+273;// in K
+m2= p*V/(R*T);// in kg
+payload= m2-m1;// in kg
+disp(payload,"Payload that can be lifted along with the balloon in kg is : ")
+
+
diff --git a/2120/CH3/EX3.1/ex3_1.sce b/2120/CH3/EX3.1/ex3_1.sce new file mode 100755 index 000000000..1772f7bcf --- /dev/null +++ b/2120/CH3/EX3.1/ex3_1.sce @@ -0,0 +1,10 @@ +// Exa 3.1
+clc;
+clear;
+close;
+// Given data
+t_c = 303-273;// in °C
+t_f = 9/5* t_c+32;// in °F
+disp(t_f,"When the temperature is 303 K then the thermometer reading in °F is : ");
+T_R = 460 + t_f;// °R
+disp(T_R,"The absolute value of the temperature in Rankine scale in °R is :");
diff --git a/2120/CH3/EX3.10/ex3_10.sce b/2120/CH3/EX3.10/ex3_10.sce new file mode 100755 index 000000000..5d9e1ed67 --- /dev/null +++ b/2120/CH3/EX3.10/ex3_10.sce @@ -0,0 +1,24 @@ +// Exa 3.10
+clc;
+clear;
+close;
+// Given data
+Tp= 'a+b*Tq+lamda*Tq^2';// relation between Tp and Tq
+Tp0=0;//in °C (at ice point)
+Tq0=0;//in °C (at ice point)
+// Putting these values in relation, we get
+a=0;
+Tp100=100;//in °C ( at steam point)
+Tq100=100;//in °C ( at steam point)
+// Tp100= b*Tq100+lamda*Tq100^2 (i)
+Tp=45;// in °C (in oil path)
+Tq=43;// in °C (in oil path)
+// Tp= b*Tq+lamda*Tq^2 (ii)
+b= (Tp100-Tp*Tq100^2/Tq^2)/(Tq100-Tq100^2/Tq);// From eq (i) and (ii)
+lamda= (Tp-b*Tq)/Tq^2;
+Tp=20;
+//lamda*Tq^2+b*Tq-Tp=0
+P= [lamda b -Tp];
+Tq= roots(P);// in °C
+disp(Tq,"When P reads 20°C, then the readings of Q in °C are")
+disp(Tq(2),"The realistic value of Tq in °C is : ")
diff --git a/2120/CH3/EX3.2/ex3_2.sce b/2120/CH3/EX3.2/ex3_2.sce new file mode 100755 index 000000000..52a8323e9 --- /dev/null +++ b/2120/CH3/EX3.2/ex3_2.sce @@ -0,0 +1,18 @@ +// Exa 3.2
+clc;
+clear;
+close;
+// Given data
+T_K= '273.15+t_C';
+T_R= '459.67+t_F';
+// t_C= t_F or T_K-T_R= -186.52 (i)
+// T_R/T_K = 1.68 (ii)
+// From eq (i) and (ii)
+T_K= -186.52/(1-1.68);// temp. in kelvin in K
+T_R= 1.68*T_K;// in temp. in rankine in °R
+t_C= T_K-273.15;// in °C
+t_F= T_R-459.67;// in °F
+disp(T_K,"Temperature in kelvin is : ")
+disp(T_R,"Temperature in °R is ")
+disp(t_C,"Temperature in °C is ")
+disp(t_F,"Temperature in °F is ")
diff --git a/2120/CH3/EX3.9/ex3_9.sce b/2120/CH3/EX3.9/ex3_9.sce new file mode 100755 index 000000000..a29a623e8 --- /dev/null +++ b/2120/CH3/EX3.9/ex3_9.sce @@ -0,0 +1,18 @@ +// Exa 3.9
+clc;
+clear;
+close;
+// Given data
+p0 = 1.86;
+p100 = 6.81;
+T1=32;
+T2= 212;
+// Relation of T in terms of p for ice point T1= a*log(p0)+b (i)
+// Relation of T in terms of p for steam point T2= a*log(p100)+b (ii)
+// From eq(i) and (ii)
+a= (T2-T1)/log(p100/p0);
+b= T1-a*log(p0);
+// The temp at
+p=2.5;
+T= a*log(p)+b;// in °unit
+disp(T,"The temperature at p=2.5 in °unit is :")
diff --git a/2120/CH4/EX4.1/ex4_1.sce b/2120/CH4/EX4.1/ex4_1.sce new file mode 100755 index 000000000..3352f8ca0 --- /dev/null +++ b/2120/CH4/EX4.1/ex4_1.sce @@ -0,0 +1,12 @@ +// Exa 4.1
+clc;
+clear;
+close;
+// Given data
+p = 1.0;// in MPa
+p = p * 10^6;// in N per m^2
+del_v = 1.5;// in m^3 per min
+del_v = del_v * 60;// in m^3 per h
+W = p * del_v;// in J
+W = W * 10^-6;// in MJ
+disp(W,"Work done by the pump upon the water in MJ");
diff --git a/2120/CH4/EX4.10/ex4_10.sce b/2120/CH4/EX4.10/ex4_10.sce new file mode 100755 index 000000000..2af0611d0 --- /dev/null +++ b/2120/CH4/EX4.10/ex4_10.sce @@ -0,0 +1,12 @@ +// Exa 4.10
+clc;
+clear;
+close;
+// Given data
+a= 1160;// in kN/m^2
+b= -800;// in kN/m^2
+v= -a/(2*b)
+Umax= 1.5*(a*v+b*v^2)-85;// in kJ/kg
+// For 1.5 kg mass of gas it is
+Umax= Umax*1.5;// in kJ/kg
+disp(Umax,"The maximum internal energy of the gas in kJ/kg is : ")
diff --git a/2120/CH4/EX4.11/ex4_11.sce b/2120/CH4/EX4.11/ex4_11.sce new file mode 100755 index 000000000..b8a28c798 --- /dev/null +++ b/2120/CH4/EX4.11/ex4_11.sce @@ -0,0 +1,29 @@ +// Exa 4.11
+clc;
+clear;
+close;
+// Given data
+T1 = 127;// in °C
+T1 = T1 + 273;// in K
+R = 287;
+V1 = 300;// in m/s
+p1 = 2;// in MPa
+p2 = 0.5;// in MPa
+p1 = p1 * 10^6;// in Pa
+p2 = p2 * 10^6;// in Pa
+C_P = 1.005*10^3;// in J/ kg-K
+Gamma = 1.4;
+V2 = sqrt(2 * C_P *T1 *{1-(p2/p1)^((Gamma-1)/Gamma)} + V1^2);// in m/s
+disp(V2,"The exit velocity of air in m/s is : ");
+m = 600;// in kg/hr
+m = m / 3600;// in kg/sec
+v1 = (R * T1)/p1;// in m^3 per kg
+// m = (A1*V1)/v1 = (A2* V2)/v2
+A1 = (m * v1)/V1;// in m^2
+A1 = A1 * 10^6;// in mm^2
+disp(A1,"Inlet area of the nozzle in square milimeter is : ");
+T2 = T1*(p2/p1)^((Gamma-1)/Gamma);// in K
+v2 = (R * T2)/(p2);// in m^3/kg
+A2 = (m * v2)/V2;// in m^2
+A2 = A2 * 10^6;// in mm^2
+disp(A2,"Exit area of nozzel in square milimeter is : ");
diff --git a/2120/CH4/EX4.17/ex4_17.sce b/2120/CH4/EX4.17/ex4_17.sce new file mode 100755 index 000000000..2786311bc --- /dev/null +++ b/2120/CH4/EX4.17/ex4_17.sce @@ -0,0 +1,12 @@ +// Exa 4.17
+clc;
+clear;
+close;
+// Given data
+W = -1;// in kWh
+W = W * 10^3 * 3600;// in J
+del_U = -5000;// in kj
+del_U = del_U * 10^3;// in J
+Q = del_U + W;// in J
+Q = Q * 10^-6;// in MJ
+disp(Q,"Net heat transfer for the system in MJ is : ");
diff --git a/2120/CH4/EX4.2/ex4_2.sce b/2120/CH4/EX4.2/ex4_2.sce new file mode 100755 index 000000000..5cd74760c --- /dev/null +++ b/2120/CH4/EX4.2/ex4_2.sce @@ -0,0 +1,16 @@ +// Exa 4.2
+clc;
+clear;
+close;
+// Given data
+// w = 2*g*h
+g = 9.81;
+m =(0.2+10/1000)*10^3 ;// in gm
+s = 1;// in cal/gm°C
+del_T = 2;// in °C
+H = m * s * del_T;// in cal
+H = H * 10^-3;// kcal
+J = 4.1868 * 1000;
+// W= 2*g*h= J*H
+h = J*H/(2 * g);// in m
+disp(h,"Height from which the mass should fall in meter is : ");
diff --git a/2120/CH4/EX4.20/ex4_20.sce b/2120/CH4/EX4.20/ex4_20.sce new file mode 100755 index 000000000..aa2ed244e --- /dev/null +++ b/2120/CH4/EX4.20/ex4_20.sce @@ -0,0 +1,29 @@ +//Exa 4.20
+clc;
+clear;
+close;
+// Given data
+Q_acb = 84;//in kJ
+W_acb = 32;// in kJ
+//Formula Q_acb = del_U+W_acb where del_U = U_b - U_a;
+del_U = Q_acb - W_acb;// in kJ
+// Part (a) Path a b d
+W_abd = 10.5;// in kJ
+Q_abd = del_U + W_abd;// in kJ
+disp(Q_abd,"Heat flows into the system along the path a b d in kJ is : ");
+// Part (b) curved path b a
+W_ba = -(21);// in kJ
+Q_ba = -(del_U) + W_ba;// in kJ
+disp(abs(Q_ba),"Heat liberated by the system in kJ is : ");
+// Part (c) process a b and d b
+W_ad = 10.5;// in kJ
+del_U1 = 42;// in kJ
+Q_ad = del_U1 + W_ad;// in kJ
+disp(Q_ad,"Heat absorbed in processes a d in kJ is : ");
+W_db = -(42);// in kJ
+del_U2 = 52;// in kJ
+Q_bd = del_U2 + W_db;// in kJ
+disp(Q_bd,"Heat absorbed in processes b d in kJ is : ");
+W_db = 0;
+W_abd = W_ad + W_db;// in kJ
+disp(W_abd,"Heat absorbed in processes in a d and d b in kJ is : ");
diff --git a/2120/CH4/EX4.21/ex4_21.sce b/2120/CH4/EX4.21/ex4_21.sce new file mode 100755 index 000000000..e36b2fdd3 --- /dev/null +++ b/2120/CH4/EX4.21/ex4_21.sce @@ -0,0 +1,21 @@ +//Exa 4.21
+clc;
+clear;
+close;
+// Given data
+v1 = 5;// in m^3
+p1 = 2;// in bar
+p2 = 6;// in bar
+p3 = 2;// in bar
+p1 = p1 * 10^5;// in N/m^2
+p2 = p2 * 10^5;// in N/m^2
+p3 = p3 * 10^5;// in N/m^2
+n = 1.3;
+v2 = v1 * ((p1/p2)^(1/1.3));// in m^3
+W1_2 = ((p2 * v2)-(p1 * v1))/(1-n);// in J
+Gamma = 1.4;
+v3 = v2 * ((p2/p3)^(1/Gamma));// in m^3
+W2_3 = ((p3 * v3) - (p2 * v2))/(1-Gamma);// in J
+W_net = W1_2 + W2_3;// in J
+W_net = W_net * 10^-3;// in kJ
+disp(W_net,"net work done in kJ is : ");
diff --git a/2120/CH4/EX4.3/ex4_3.sce b/2120/CH4/EX4.3/ex4_3.sce new file mode 100755 index 000000000..7cf605fee --- /dev/null +++ b/2120/CH4/EX4.3/ex4_3.sce @@ -0,0 +1,15 @@ +// Exa 4.3
+clc;
+clear;
+close;
+// Given data
+W1 = -25;// in kJ
+W2 = 45;// in kJ
+Q1 = 65;// in kJ
+Q2 = -40;// in kJ
+// del_U = Q - W and but for a cycle del_U = 0, So
+// Q = W
+// Q1 + Q2 +Q3 = W1 +W2
+Q3 = W1 + W2 - Q1 - Q2;// in kJ
+disp(Q3,"Third Heat transfer in kJ is ");
+disp("That is Third Heat transfer is of "+string(abs(Q3))+" kJ from the fluid");
diff --git a/2120/CH4/EX4.5/ex4_5.sce b/2120/CH4/EX4.5/ex4_5.sce new file mode 100755 index 000000000..6134cda90 --- /dev/null +++ b/2120/CH4/EX4.5/ex4_5.sce @@ -0,0 +1,16 @@ +// Exa 4.5
+clc;
+clear;
+close;
+// Given data
+m = 1.5;// in kg
+T1 = 90;// in °C
+T1 = T1 + 273;//in K
+T2 = 225;// in °C
+T2 = T2 + 273;// in K
+C_p = 0.24;
+C_v = 0.17;
+Q = (m * C_p * (T2-T1));// in kcal
+del_U = (m * C_v * (T2-T1));// in kcal
+W = Q - del_U;// in kcal
+disp(W,"The external work done in kcal is");
diff --git a/2120/CH4/EX4.7/ex4_7.sce b/2120/CH4/EX4.7/ex4_7.sce new file mode 100755 index 000000000..3327a842a --- /dev/null +++ b/2120/CH4/EX4.7/ex4_7.sce @@ -0,0 +1,45 @@ +//Exa 4.7
+clc;
+clear;
+close;
+// Given data
+v1 = 0.5;// in m^3
+v2 = 0.125;// in m^3
+p1 = 1.5;// in bar
+p1 = p1 * 10^5;// in N per m^2
+p2 = 9;//in bar
+p2 = p2 * 10^5;// in N per m^2
+T1 = 100;// in °C
+T1 = T1 + 273;// in K
+R = 8.31;
+// Formula p1*v1= n*R*T1
+n= p1*v1/(R*T1);// in mole
+disp(n,"Mass of gas in mole is :");
+// Part (b)
+// Formula p1*v1/T1 = p2*v2/T2
+T2 = (p2 * v2 * T1)/(p1 * v1);// in K
+disp(T2-273,"Temperature at the end of compression in °C is :");
+// Part (c)
+// Formula p1*v1^n = p2*v2^n
+n1= log(p2/p1)/log(v1/v2)
+disp(n1,"Value of index n of compression is :");
+// Part (d)
+F = 3;
+C_v =1/2*R*F;
+del_U = (n * C_v * (T2-T1));// in J
+disp(del_U*10^-3,"Increase in internal energy of gas in kJ is : ");
+// Part(e)
+Gamma = 1.67;
+Q_12 = n*(Gamma-n1)/(1-n1)*R*(T2-T1)/(Gamma-1);// in J
+Q_12 = Q_12 * 10^-3;// in kJ
+disp(Q_12,"Heat interaction in kJ is : ");
+if Q_12<0 then
+ disp("The -ve sign indicates heat rejection during the process")
+end
+
+// Note: There is some difference between the answer of book and coding . Both the answer is right but accurate answer is of coding.
+// Because in the book, the taken values are appox. and in the coding the values are accurate
+
+
+
+
diff --git a/2120/CH4/EX4.8/ex4_8.sce b/2120/CH4/EX4.8/ex4_8.sce new file mode 100755 index 000000000..631f80e32 --- /dev/null +++ b/2120/CH4/EX4.8/ex4_8.sce @@ -0,0 +1,25 @@ +//Exa 4.8
+clc;
+clear;
+close;
+// Given data
+p1 = 0.01;// in N/mm^2
+p1 = p1 * 10^3;// in kN/m^2
+p2 = 50;// in kN/m^2
+v1 = 5;// in m^3
+v2 = 1.5;// in m^3
+Gamma = 1.4;
+// Formula p1*v1^n = p2*v2^n
+n= log(p2/p1)/log(v1/v2);
+disp(n,"Part (a) The value of n is : ")
+disp("The process followed during air compression is POLYTROPIC");
+// Part (b)
+disp("Part (b) The law of the process is p*v^"+string(n)+" = constant");
+// Part (c)
+W= (p1*v1-p2*v2)/(n-1);// in kNm or (kJ)
+disp(W,"Part (c) Work done during the process in kJ is : ");
+disp("The -ve sign indicates that the work has been done on the system")
+// Part (d)
+Q = ((Gamma - n)/(Gamma - 1) * W);// in kJ
+disp(Q,"Part (d) Heat transfer during the process in kJ is :");
+disp("The -ve sign indicates that the heat is rejected from the system")
diff --git a/2120/CH4/EX4.9/ex4_9.sce b/2120/CH4/EX4.9/ex4_9.sce new file mode 100755 index 000000000..45678b50f --- /dev/null +++ b/2120/CH4/EX4.9/ex4_9.sce @@ -0,0 +1,30 @@ +// Exa 4.9
+clc;
+clear;
+close;
+// Given data
+// Relation of specific internal energy of the gas
+// U= 1.5*p*v-85 kJ/kg
+p1 = 1000;// in kpa
+p2 = 200;// in pa
+v1 = 0.20;// in m^3
+v2 = 1.20;// in m^3
+m = 1.5;// in kg
+U1= 1.5*p1*v1-85;// kJ/kg
+U2= 1.5*p2*v2-85;// kJ/kg
+delU= U2-U1;// in kJ
+disp(delU,"Change in internal energy in kJ is");
+// p1= a+b*v1 (i)
+// p2= a+b*v2 (ii)
+// From eq(i) and (ii)
+b= (p1-p2)/(v1-v2);// in kN/m^2
+a= p1-b*v1;// in kN/m^2
+disp(a,"The value of a in kN/m^2 is ")
+disp(b,"The value of b in kN/m^2 is ")
+// Part (c)
+// Work done = integration of p w.r.t. v and p = a+b*v1
+W= integrate('a+b*v','v',v1,v2);// in kJ
+disp(W,"Work done in kJ is :")
+// Part (d)
+Q= delU+W;// in kJ
+disp(Q,"The net heat transfer in kJ is : ")
diff --git a/2120/CH5/EX5.1/ex5_1.sce b/2120/CH5/EX5.1/ex5_1.sce new file mode 100755 index 000000000..f063e4923 --- /dev/null +++ b/2120/CH5/EX5.1/ex5_1.sce @@ -0,0 +1,31 @@ +// Exa 5.1
+clc;
+clear;
+close;
+// Given data
+v1_total = 7;// in m^3/min
+v_s1 = 0.35;// in m^3/kg
+v_s2 = 0.12;// in m^3/kg
+p1 = 1;// in bar
+p1 = p1 * 10^5;// in N/m^2
+p2 = 6;// in bar
+p2 = p2 * 10^5;// in N/m^2
+D1 = 110;// in mm
+D1 = D1 * 10^-3;// in m
+D2 = 65;// in mm
+D2 = D2 * 10^-3;// in m
+Af1 = %pi/4*D1^2;// in m^2
+Af2 = %pi/4*D2^2;// in m^2
+// v1_total = m1 * v_s1
+m1 = v1_total / v_s1;//in kg/min
+disp(m1,"The mass flow rate of air in kg/min is :");
+m2 = m1;// in kg/min
+v2_total = m2 * v_s2;// in m^3/min
+del_W_flow = (p2 * v2_total) - (p1 * v1_total);// in J/min
+disp(del_W_flow*10^-3,"The change in the work flow in kJ/min is : ");
+v_f1 = v1_total/Af1;// in m/min
+v_f2 = v2_total /Af2;//in m/min
+del_v = v_f2 - v_f1;// in m/min
+disp(del_v,"Change in velocity of the air flow in m/min is :");
+
+
diff --git a/2120/CH5/EX5.2/ex5_2.sce b/2120/CH5/EX5.2/ex5_2.sce new file mode 100755 index 000000000..8dfcf1c5a --- /dev/null +++ b/2120/CH5/EX5.2/ex5_2.sce @@ -0,0 +1,13 @@ +//Exa 5.2
+clc;
+clear;
+close;
+// Given data
+m = 2;// in kg per min
+m = m / 60;// in kg per sec
+W = 20;// in kW
+h1 = 1400;// in kJ/kg
+h2 = 1300;// in kJ/kg
+Q = (m * (h2 - h1)) + W;// in kJ/s
+disp(Q,"Rate of heat transfer to the water jacket in kJ/sec");
+
diff --git a/2120/CH5/EX5.3/ex5_3.sce b/2120/CH5/EX5.3/ex5_3.sce new file mode 100755 index 000000000..33c854e77 --- /dev/null +++ b/2120/CH5/EX5.3/ex5_3.sce @@ -0,0 +1,30 @@ +// Exa 5.3
+clc;
+clear;
+close;
+// Given data
+g= 9.81;
+p1 = 3;// in Mpa
+p2 = 10;// in kPa
+T1 = 350;// in °C
+T1 = T1 + 273;// in K
+m = 1;// in kg per sec
+v1 = 50;// in m per sec
+v2 = 120;// in m per sec
+z1 = 2;// in m
+z2 = 5;// in m
+C_p = 1.005;// in kJ per sec
+Q = 5;// in kJ per sec
+Q = -(Q) * 10^3;// in J per sec
+T2 = (p2 * T1)/p1;// in K
+del_h = C_p * (T2-T1);// in kJ
+del_h = del_h * 10^3;// in J
+t = m * ( del_h +(v2^2-v1^2)/2 + (g * (z2 - z1)));// t is variable taken for calculation
+W_s = Q - t;// in J per sec
+W_s = W_s * 10^-6;// in MW
+disp(W_s,"The power output of the turbine in MW");
+// If kinetic and potential energy are ignored then
+W_s2 = Q -(m * del_h);// in J per sec
+W_s2 = W_s2 * 10^-6;// in MW
+errorIntroduced= (abs(W_s)-abs(W_s2))/abs(W_s)*100;// in %
+disp(errorIntroduced,"Total error introduced in % is :");
diff --git a/2120/CH5/EX5.4/ex5_4.sce b/2120/CH5/EX5.4/ex5_4.sce new file mode 100755 index 000000000..12fbac87e --- /dev/null +++ b/2120/CH5/EX5.4/ex5_4.sce @@ -0,0 +1,14 @@ +//Exa 5.4
+clc;
+clear;
+close;
+//Given data
+h1 = 246.6;// in kJ/kg
+h2 = 198.55;// in kJ/kg
+W = 0;
+g= 9.8;
+Q= -(105000);// in kJ per hr
+// m * (h1 + ((v1*^2)/(2*1000)) + ((g * z1)/1000)) + Q = m * (h2 + ((v2^2)/(2*1000)) + ((g * z2)/1000)) + W
+// v1 and v2 is change in velocity is neglected and z2 = z1 + 10
+m = Q/( (h2-h1) + ((g * 10)/1000) );// kg per hr
+disp(m,"Quantity of water circulated through the pipe in kg/hr is");
diff --git a/2120/CH5/EX5.5/ex5_5.sce b/2120/CH5/EX5.5/ex5_5.sce new file mode 100755 index 000000000..5c80e1192 --- /dev/null +++ b/2120/CH5/EX5.5/ex5_5.sce @@ -0,0 +1,29 @@ +//Exa 5.5
+clc;
+clear;
+close;
+//Given data
+m=15;// in kg/min
+m= m/60;// in kg/sec
+H1= 5;// in kJ/kg
+H1= H1*10^3;// in J/kg
+H2= 173;// in kJ/kg
+H2= H2*10^3;// in J/kg
+V1= 5;// in m/s
+V2= 7.5;// in m/s
+Q= 760;// in kJ/min
+Q= Q*10^3/60;// in J/s
+// Formula (H1+V1^2/2)+(-Q)= (H2+V2^2/2)+W
+W= (H1+V1^2/2)+(-Q)-(H2+V2^2/2);// in W/kg
+W= W*10^-3;// in kW/kg
+// The work done will be
+W= m*W;// in kW
+P= abs(W);// in kW
+disp(P,"Power of the motor required to drive the compressor in kW is : ")
+// Part (b)
+v1= 0.5;// in m^3/kg
+v2= 0.15;// in m^3/kg
+// A1/A2= rho2*V2/(rho1*V1) = v1*V2/(v2*V1)
+ratioOFA1andA2= v1*V2/(v2*V1);
+radioOFd1andd2= sqrt(ratioOFA1andA2);
+disp(radioOFd1andd2,"Ratio of inlet pipe diameter to outlet pipe diameter is : ")
diff --git a/2120/CH6/EX6.1/ex6_1.sce b/2120/CH6/EX6.1/ex6_1.sce new file mode 100755 index 000000000..381ee47dd --- /dev/null +++ b/2120/CH6/EX6.1/ex6_1.sce @@ -0,0 +1,12 @@ +//Exa 6.1
+clc;
+clear;
+close;
+//Given data
+// In first case (T1-T2)/T1=1/6 or T1= 1.2*T2 (i)
+// In seond case (T1-(T2-62))/T1= 2/6 or 2*T1 -3*(T2-62)=0 (ii)
+// From eq (i) and (ii)
+T2= 186/0.6;// in K
+T1= 1.2*T2;// in K
+disp(T2-273,"Temperature of the source in °C is : ")
+disp(T1-273,"Temperature of the sink in °C is : ")
diff --git a/2120/CH6/EX6.16/ex6_16.sce b/2120/CH6/EX6.16/ex6_16.sce new file mode 100755 index 000000000..8535601a6 --- /dev/null +++ b/2120/CH6/EX6.16/ex6_16.sce @@ -0,0 +1,15 @@ +//Exa 6.16
+clc;
+clear;
+close;
+// Given data
+Wnet_compresser= 3;// in kW
+Wnet_compresser=Wnet_compresser*3600;// in kJ/h
+Qabsorbed= 50;// in MJ/h
+Qabsorbed=Qabsorbed*10^3;// in kJ/h
+T1 = 46+273;// in K
+T2 = 1+273;// in K
+Qrejected= Wnet_compresser+Qabsorbed;// in kJ/h
+disp(Qrejected*10^-3,"The heat rejected in MJ/h is : ")
+I= -(-Qrejected/T1+Qabsorbed/T2);// in kJ/h
+disp(I,"Irreversibility in kJ/h is : ")
diff --git a/2120/CH6/EX6.17/ex6_17.sce b/2120/CH6/EX6.17/ex6_17.sce new file mode 100755 index 000000000..04796f092 --- /dev/null +++ b/2120/CH6/EX6.17/ex6_17.sce @@ -0,0 +1,21 @@ +//Exa 6.17
+clc;
+clear;
+close;
+// Given data
+T1 = 12;// in °C
+T2 = 92;// in °C
+T1 = T1 + 273;// in K
+T2 = T2 + 273;// in K
+del_T = T2 - T1;// in K
+m = 20;// in kg
+C_v = 4.187;
+s= 1;
+Q = m * s * del_T;// in cal
+Q = Q * 4.18;// in J
+H = 2;// heat given by the heater in kw
+H = H * 10^3;// in J/sec
+t = Q/H;//time taken by the heater to raise the temp. in sec
+disp(t,"Time taken by the heater to raise the temperature in sec is");
+del_phi = m * C_v * log(T2/T1);// in kJ/K
+disp(del_phi,"Entrophy generated during the process in kJ/K");
diff --git a/2120/CH6/EX6.18/ex6_18.sce b/2120/CH6/EX6.18/ex6_18.sce new file mode 100755 index 000000000..be1d0eda6 --- /dev/null +++ b/2120/CH6/EX6.18/ex6_18.sce @@ -0,0 +1,18 @@ +// Exa 6.18
+clc;
+clear;
+close;
+// Given data
+Q1 = 1000;// in kW
+Q2 = 492;// in kW
+T1 = 285;// in °C
+T1 = T1 + 273;// in K
+T2 = 5;// in °C
+T2 = T2 + 273;// in K
+Eta_carnot = (T1-T2)/T1*100;// in percentage
+disp(Eta_carnot,"Carnot efficiency in % is : ")
+Eta_heat = (Q1 - Q2)/Q1*100;// in percentage
+disp(Eta_heat,"Efficiency of the heat engine in % is : ")
+if Eta_heat>Eta_carnot then
+ disp("As the efficiency of heat engine cannot be more than Carnot efficiency, Hence engine cannot execute irreversible cycle.So engine will execute Carnot Cycle which is a reversible cycle too")
+end
diff --git a/2120/CH6/EX6.19/ex6_19.sce b/2120/CH6/EX6.19/ex6_19.sce new file mode 100755 index 000000000..6372e7abc --- /dev/null +++ b/2120/CH6/EX6.19/ex6_19.sce @@ -0,0 +1,18 @@ +// Exa 6.19
+clc;
+clear;
+close;
+// Given data
+n = 1080;// in cycle/min
+Q_s = 57;// in J/cycle
+T1 = 12;// in °C
+T1 = T1 + 273;// in K
+T2 = 2;// in °C
+T2 = T2 + 273;// in K
+// 1-(Q_r/Q_s) = 1- (T2/T1)
+Q_r = (T2/T1)*Q_s;// in J/cycle
+W = Q_s - Q_r;// in J/cycle
+P_o = W * n;// in J/min
+P_o = P_o/60;// in W
+disp(P_o,"The output of the engine in watt is");
+
diff --git a/2120/CH6/EX6.2/ex6_2.sce b/2120/CH6/EX6.2/ex6_2.sce new file mode 100755 index 000000000..9b3cba13c --- /dev/null +++ b/2120/CH6/EX6.2/ex6_2.sce @@ -0,0 +1,24 @@ +// Exa 6.2
+clc;
+clear;
+close;
+// Given data
+T1 = 25;// in °C
+T2 = 1;// in °C
+T1 = T1 + 273;// in K
+T2 = T2 + 273;// in K
+HT= 2;// heat transfer across the wall and the roof in MJ/hr
+HT= HT*10^6;// in J/hr
+Q = HT* (T1-T2);// in J/hr
+COP_heat = T1/(T1-T2);
+W_net = Q/COP_heat;// in J/hr
+disp(W_net*10^-3/3600,"Power rquired for operating the pump in kW");
+// Part (b)
+T2= 25;// in °C
+T2=T2+273;// in K
+// COP= T2/(T1-T2) (i)
+// COP= HT*(T1-T2)/W_net (ii)
+// From (i) and (ii)
+T1= sqrt(W_net*T2/HT)+T2;// in K
+T1= T1-273;// in °C
+disp(T1,"The value of T1 in °C is : ")
diff --git a/2120/CH6/EX6.20/ex6_20.sce b/2120/CH6/EX6.20/ex6_20.sce new file mode 100755 index 000000000..a9924f090 --- /dev/null +++ b/2120/CH6/EX6.20/ex6_20.sce @@ -0,0 +1,14 @@ +// Exa 6.20
+clc;
+clear;
+close;
+// Given data
+Q2 = 10^5;// in kJ/hr
+T1 = -3;// in °C
+T1 = T1 + 273;// in K
+T2 = 22;// in °C
+T2 = T2 + 273;// in K
+COP_heat = 1/(1-T1/T2);
+W = Q2/COP_heat;// in kJ/hr
+W = W/3600;// in kW
+disp(W,"Minimum power required in kW is");
diff --git a/2120/CH6/EX6.21/ex6_21.sce b/2120/CH6/EX6.21/ex6_21.sce new file mode 100755 index 000000000..5a3342515 --- /dev/null +++ b/2120/CH6/EX6.21/ex6_21.sce @@ -0,0 +1,15 @@ +//Exa 6.21
+clc;
+clear;
+close;
+// Given data
+T_A= 927+273;// in K
+T_B= 127+273;// in K
+T_C= T_B;// in K
+// Q_A= Q_B+Q_C+W = 2*Q_B+W (since Q_B=Q_C) (i)
+// Q_A/T_A= Q_B/T_B+Q_C/T_C or
+// Q_A= 2*Q_B*T_A/T_B (ii)
+// From eq (i) and (ii)W= 2*Q_B*(T_A/T_B-1) (iii)
+// Dividing (iii) by (ii)
+WbyQ_A= (T_A/T_B-1)/(T_A/T_B);
+disp(WbyQ_A*100,"The engine efficiency in % is : ")
diff --git a/2120/CH6/EX6.22/ex6_22.sce b/2120/CH6/EX6.22/ex6_22.sce new file mode 100755 index 000000000..a6779c93f --- /dev/null +++ b/2120/CH6/EX6.22/ex6_22.sce @@ -0,0 +1,17 @@ +//Exa 6.22
+clc;
+clear;
+close;
+// Given data
+T_A= 700;// in K
+T_B= 600;// in K
+T_C= 500;// in K
+Q_A= 1200;// in kJ
+// Q_B+Q_C= Q_A-200 (i)
+// Q_A/T_A = Q_B/T_B+Q_C/T_C (ii)
+// From eq(i) and (ii)
+Q_B= (Q_A*(1/T_B-1/T_A)-200/T_B)/(1/T_B-1/T_C);// in kJ
+Q_C= Q_A-Q_B-200;// in kJ
+disp(Q_B,"The heat rejected at B in kJ is : ")
+disp(Q_C,"The heat rejected at C in kJ is : ")
+
diff --git a/2120/CH6/EX6.23/ex6_23.sce b/2120/CH6/EX6.23/ex6_23.sce new file mode 100755 index 000000000..2c270c5e8 --- /dev/null +++ b/2120/CH6/EX6.23/ex6_23.sce @@ -0,0 +1,16 @@ +//Exa 6.23
+clc;
+clear;
+close;
+// Given data
+T1= 180+273;// in K
+T2= 20+273;// in K
+// W_A/Q1= 1-T3/T1 (i)
+// W_B/QB= 1-T2/T3 (ii)
+// W_A= W_B (iii)
+// Q1= Q_B+W_A (iv)
+// From eq(i),(ii),(iii) and (iv)
+T3= (T1+T2)/2;// in K
+disp(T3-273,"The intermediate temperature in °C is : ")
+
+
diff --git a/2120/CH6/EX6.24/ex6_24.sce b/2120/CH6/EX6.24/ex6_24.sce new file mode 100755 index 000000000..aa6cade2b --- /dev/null +++ b/2120/CH6/EX6.24/ex6_24.sce @@ -0,0 +1,14 @@ +//Exa 6.24
+clc;
+clear;
+close;
+// Given data
+Q2 = 1.75;// in kJ/sec
+T1 = -15;// in °C
+T1 = T1 + 273;// in K
+T2 = 30;// in °C
+T2 = T2 + 273;// in K
+del_T = T2 - T1;// in K
+// Q2/W_net = T2/(del_T)
+W_net = Q2 * del_T/T1;// in kW
+disp(W_net,"Least power required in kW is");
diff --git a/2120/CH6/EX6.3/ex6_3.sce b/2120/CH6/EX6.3/ex6_3.sce new file mode 100755 index 000000000..7282b5a68 --- /dev/null +++ b/2120/CH6/EX6.3/ex6_3.sce @@ -0,0 +1,14 @@ +//Exa 6.3
+clc;
+clear;
+close;
+//Given data
+heatEngineEffi= 32/100;// heat engine efficiency
+COP= 5;// COP of heat pump
+// heat engine efficiency = Wnet/Q1 = (Q1-Q2)/Q1
+Q1byWnet= 1/heatEngineEffi;
+Q2byWnet= (1-heatEngineEffi)*Q1byWnet;
+// COP = Q4/Wnet = Q4/(Q4-Q3)
+Q4byWnet= COP;
+ratio= (Q2byWnet+Q4byWnet)/Q1byWnet;// ratio of heat transferred to the circulating water to heat trasferred to the engine
+disp(ratio,"Ratio of heat trasferred to the circulating water to heat trasferred to the engine is : ")
diff --git a/2120/CH6/EX6.4/ex6_4.sce b/2120/CH6/EX6.4/ex6_4.sce new file mode 100755 index 000000000..f86320aab --- /dev/null +++ b/2120/CH6/EX6.4/ex6_4.sce @@ -0,0 +1,18 @@ +//Exa 6.4
+clc;
+clear;
+close;
+//Given data
+Q = 88;// in MJ
+Q=Q*10^3;// in kJ
+T1 = 190;// in °C
+T1 = T1 + 273;// in K
+T3 = -15;// in °C
+T3 = T3 + 273;// in K
+Eta_carnot = (T1 - T3)/T1;
+Wnet= Eta_carnot * Q;// in kJ
+CarnotPower= Wnet/3600;// in kWh
+disp(CarnotPower,"The value of Carnot Power in kWh is : ")
+disp("As the actual power produced by the invented engine is more than the Carnot Power, ");
+disp("so inverter claim is ")
+disp(" not true")
diff --git a/2120/CH6/EX6.5/ex6_5.sce b/2120/CH6/EX6.5/ex6_5.sce new file mode 100755 index 000000000..e9df72dc6 --- /dev/null +++ b/2120/CH6/EX6.5/ex6_5.sce @@ -0,0 +1,19 @@ +//Exa 6.5
+clc;
+clear;
+close;
+// Given data
+T1 = 24;// in °C
+T1 = T1 + 273;// in K
+T2 = 2;// in °C
+T2 = T2 + 273;// in K
+Q = 100;//in MJ/h
+Q = Q * 10^3;//in kJ/h
+COP_heatPump = T1/(T1-T2);
+W = Q/COP_heatPump;//in kJ/h
+W = W/3600;// in kW
+disp(W,"The theoretical minimum power required to drive the heat pump in kW is : ")
+COP_refrigerator = T2/(T1-T2);
+W = Q/COP_refrigerator;// in kJ/h
+W = W/3600;// in kW
+disp(W,"The theoretical power required to drive the heat pump when it is used as a refrigerator in kW is : ");
diff --git a/2120/CH6/EX6.6/ex6_6.sce b/2120/CH6/EX6.6/ex6_6.sce new file mode 100755 index 000000000..45d5d60c8 --- /dev/null +++ b/2120/CH6/EX6.6/ex6_6.sce @@ -0,0 +1,47 @@ +//Exa 6.6
+clc;
+clear;
+close;
+//Given data
+Q1= 278;// in kJ/s
+T1= 283+273;// in K
+T2= 50+273;// in K
+// Let integrate of delta Q by T is V
+disp("Part (a)")
+Q2= 208;// in kJ/s
+// By Clausius inequality
+V= Q1/T1-Q2/T2;
+if V<0 then
+ disp("The cycle is irreversible")
+else
+ if V>0 then
+ disp("Reversible or irreversible cycle is not possible and the result is impossible")
+ else
+ disp("The cycle is reversible")
+ end
+end
+disp("Part (b)")
+Q2= 139;// in kJ/s
+V= Q1/T1-Q2/T2;
+if V<0 then
+ disp("The cycle is irreversible")
+else
+ if V>0 then
+ disp("Reversible or irreversible cycle is not possible and the result is impossible")
+ else
+ disp("The cycle is reversible")
+ end
+end
+disp("Part (c)")
+Q2= 161.5;// in kJ/s
+V= Q1/T1-Q2/T2;
+if V<0 then
+ disp("The cycle is irreversible")
+else
+ if V>0 then
+ disp("Reversible or irreversible cycle is not possible and the result is impossible")
+ else
+ disp("The cycle is reversible")
+ end
+end
+
diff --git a/2120/CH7/EX7.11/ex7_11.sce b/2120/CH7/EX7.11/ex7_11.sce new file mode 100755 index 000000000..9762759a0 --- /dev/null +++ b/2120/CH7/EX7.11/ex7_11.sce @@ -0,0 +1,21 @@ +//Exa 7.11
+clc;
+clear;
+close;
+// Given data
+p1 = 1 * 10^5;// in N/m^2
+C_p = 1.005;// in kJ/kg k
+R = 287;// in j/kg k
+T1 = 290;// in K
+T2 = 580;// in K
+v1 = 1;// in m^3
+m = (p1 * v1)/(R * T1);// in kg
+Q = m * R * (T2-T1);// in J
+Q = Q * 10^-3;// in kJ
+del_phi = m * C_p * (log(T2/T1));// in kJ per K
+R = R * 10^-3;// in kJ/kg K
+C_v = C_p - R;// in kJ/kg k
+del1_phi = m * C_v * (log(T1/T2));// in kJ/K
+net_phi = del_phi + del1_phi;// in kJ/K
+disp(net_phi,"Over all change in entrophy in kJ/K");
+
diff --git a/2120/CH7/EX7.2/ex7_2.sce b/2120/CH7/EX7.2/ex7_2.sce new file mode 100755 index 000000000..adf0362d3 --- /dev/null +++ b/2120/CH7/EX7.2/ex7_2.sce @@ -0,0 +1,17 @@ +//Exa 7.2
+clc;
+clear;
+close;
+// Given data
+v1 = 0.05;// in m^3
+v2 = 8 * v1;// in m^3
+T1 = 280;// in °C
+T1 = T1 + 273;// in K
+T2 = 25;// in °C
+T2 = T2 + 273;// in K
+p1 = 8;// in bar
+C_p = 1.005;// in kJ/kgK
+C_v = 0.712;// in kJ/kgK
+R = C_p - C_v;// in kJ/kgK
+del_phi = (R * ( log(v2/v1)) ) + (C_v * (log(T2/T1)) );// in kJ/kgK
+disp(del_phi,"The change in entrophy of air during the process in kJ/kgKis");
diff --git a/2120/CH7/EX7.3/ex7_3.sce b/2120/CH7/EX7.3/ex7_3.sce new file mode 100755 index 000000000..76fd2756a --- /dev/null +++ b/2120/CH7/EX7.3/ex7_3.sce @@ -0,0 +1,18 @@ +// Exa 7.3
+clc;
+clear;
+close;
+// Given data
+m = 5;// in kg
+T1 = 50;// in °C
+T1 = T1 + 273;// in K
+T2 = 250;// in °C
+T2 = T2 + 273;// in K
+C_p = 1.0;
+C_v = 0.72;
+T3 = 50;// in °C
+T3 = T3 + 273;// in K
+del_phi = m * C_p * (log(T2/T1));// in kJ/ K (this is increase in entrophy)
+del_phi1 = m * C_v * (log(T3/T2));// in kJ/K (this is decrease in entrophy)
+phi_net = del_phi - abs(del_phi1);// in kJ/K
+disp(phi_net,"The net change in entrophy in kJ/K is");
diff --git a/2120/CH7/EX7.6/ex7_6.sce b/2120/CH7/EX7.6/ex7_6.sce new file mode 100755 index 000000000..6519a9cd5 --- /dev/null +++ b/2120/CH7/EX7.6/ex7_6.sce @@ -0,0 +1,14 @@ +// Exa 7.6
+clc;
+clear;
+close;
+// Given data
+Q1 = 1600;// in kJ
+Q2 = 1600;// in kJ
+T1 = 800;// in K
+T2 = 127;// in °C
+T2 = T2 + 273;// in K
+d1_phi = Q1/T1;// in kJ per K
+d2_phi = Q2/T2;// in kJ per K
+net_phi = d2_phi - d1_phi;// in kJ per K
+disp(net_phi,"Total entrophy generated during the process in kJ/K is : ");
diff --git a/2120/CH7/EX7.8/ex7_8.sce b/2120/CH7/EX7.8/ex7_8.sce new file mode 100755 index 000000000..74b987881 --- /dev/null +++ b/2120/CH7/EX7.8/ex7_8.sce @@ -0,0 +1,17 @@ +// Exa 7.8
+clc;
+clear;
+close;
+// Given data
+T_A= 50+273;// in K
+T_B= 13+273;// in K
+P_A= 130;// in kPa
+P_B= 100;// in kPa
+Cp= 1.005;// in kJ/kg-K
+pvByT= 0.287;// p in kPa, v in m^3/kg, T in K
+del_S_system= Cp*log(T_B/T_A)-pvByT*log(P_B/P_A);// in kJ/kg-K
+del_S_surrounding=0;
+del_S_universe= del_S_system+del_S_surrounding;// in kJ/kg-K
+disp(del_S_universe,"The change in entropy in kJ/kg-K is : ")
+disp("But a negative change in entropy is not possible,");
+disp("hence the flow of air must be from B to A")
diff --git a/2120/CH7/EX7.9/ex7_9.sce b/2120/CH7/EX7.9/ex7_9.sce new file mode 100755 index 000000000..25824ee10 --- /dev/null +++ b/2120/CH7/EX7.9/ex7_9.sce @@ -0,0 +1,18 @@ +// Exa 7.9
+clc;
+clear;
+close;
+// Given data
+m = 5;// in kg
+s= 4.18;
+T1 = 0;// in °C
+T2 = 20;// in °C
+dt = T2 - T1;// in °C
+Q = m * s * dt;// in kJ
+L = 335;// in kJ/kg
+// Q = m_i * l
+m_i = Q/L;// in kg
+T1 = T1 + 273;// in K
+T2 = T2 + 273;// in K
+del_S = ((m_i * L)/T1) - (m * s * (log(T1/T2)));// in kJ per K
+disp(del_S,"Change in entrophy of the adiabatic in kJ/K is");
diff --git a/2120/CH8/EX8.1/ex8_1.sce b/2120/CH8/EX8.1/ex8_1.sce new file mode 100755 index 000000000..3ca155597 --- /dev/null +++ b/2120/CH8/EX8.1/ex8_1.sce @@ -0,0 +1,16 @@ +//Exa 8.1
+clc;
+clear;
+close;
+// Given data
+Q = 16;// in MJ
+Q = Q * 10^3;// in kJ
+T_H = 227;// in °C
+T_H = T_H + 273;// in K
+T_L = 15;// in °C
+T_L = T_L + 273;// in K
+del_S = Q/T_H;// in kJ/K
+A = Q - (T_L * del_S);// in kJ
+disp(A,"The available part of heat in kJ is ");
+U_P_ofHeat = T_L * del_S;// unavailable part of heat in kJ
+disp(U_P_ofHeat,"The unavailable part of heat in kJ is :");
diff --git a/2120/CH8/EX8.2/ex8_2.sce b/2120/CH8/EX8.2/ex8_2.sce new file mode 100755 index 000000000..a1e45e326 --- /dev/null +++ b/2120/CH8/EX8.2/ex8_2.sce @@ -0,0 +1,13 @@ +//Exa 8.2
+clc;
+clear;
+close;
+// Given data
+Q = 12000;// in kJ
+T_H = 600;// in K
+T_L = 300;// in K
+dS = Q / T_H;//in kJ/K
+A = Q - (T_L * dS);//available work in kJ
+disp(A,"Available work is in kJ");
+UA = T_L * dS;//unavailable work in kJ
+disp(UA,"Anavailable work is in kJ");
diff --git a/2120/CH8/EX8.3/ex8_3.sce b/2120/CH8/EX8.3/ex8_3.sce new file mode 100755 index 000000000..9c5e9ab98 --- /dev/null +++ b/2120/CH8/EX8.3/ex8_3.sce @@ -0,0 +1,19 @@ +// Exa 8.3
+clc;
+clear;
+close;
+// Given data
+m = 800;// in kg
+C_p = 0.5;// in kJ/kg K
+T2 = 500;// in K
+T1 = 1250;// in K
+T_o = 300;// in K
+del_t = T1 - T2;// in K
+Q = m * C_p * del_t;// in kJ
+dS = abs(m * C_p * log(T2/T1));// in kJ/K
+availableEnergy = Q - (T_o * dS);//in kJ
+disp(round(availableEnergy*10^-3),"Available energy in MJ is :");
+unavailableEnergy = T_o * dS;// UA stands for unavailable energy in kJ
+disp(round(unavailableEnergy*10^-3),"Unavailable energy in MJ is :");
+
+
diff --git a/2120/CH8/EX8.4/ex8_4.sce b/2120/CH8/EX8.4/ex8_4.sce new file mode 100755 index 000000000..8d7878530 --- /dev/null +++ b/2120/CH8/EX8.4/ex8_4.sce @@ -0,0 +1,22 @@ +//Exa 8.4
+clc;
+clear;
+close;
+// Given data
+h_i = 726.1;
+h_o = 25.03;
+T_o = 298;// in K
+s_i = 1.582;
+s_o = 0.087;
+h2 = 669;
+s2 = 1.677;
+h3 = 52.17 + (0.9 * 567.7);
+s3 = 0.1748 + (0.9 * 1.7448);
+sai_i = (h_i - h_o) - (T_o * (s_i - s_o));// in kcl/kg
+disp(sai_i,"The availablibity per kg of steam entering in kcl/kg is :");
+sai_e = (0.25 * ((h2 - h_o) - (T_o * (s2 - s_o)))) + (0.75 * ((h3 - h_o) - (T_o * (s3 - s_o)))) ;// in kcl/kg
+disp(sai_e,"The availablibity per kg of steam leaving in kcl/kg is :");
+w_rev = sai_i - sai_e;// in kcl/kg
+disp(w_rev,"reveseble work per kg of steam in kcl/kg");
+
+// Note: There is calculation error in evaluating the value of availability per kg of steam leaving in kcl/kg . so the answer in the book is wrong and coding is right.
diff --git a/2120/CH8/EX8.5/ex8_5.sce b/2120/CH8/EX8.5/ex8_5.sce new file mode 100755 index 000000000..5b68599bd --- /dev/null +++ b/2120/CH8/EX8.5/ex8_5.sce @@ -0,0 +1,19 @@ +// Exa 8.5
+clc;
+clear;
+close;
+// Given data
+T_o = 298;// in K
+m2 = 25000;
+s2 = 16775;
+m3 = 75000;
+s3 = 17448;
+m1 = 1000000;
+s1 = 1582;
+Q = -16;// in MJ
+Q = Q * 10^3;// in kJ
+I = (T_o * ((m2 * s2) + (m3 * s3) - (m1 * s1))) - Q;// in cal/hr
+I=I*10^-3;// in kcal/hr
+disp(I,"The irreversiblity in kcal/hr");
+
+// Note: There is calculation error in evaluating the value of the irreversibility in kcal/hr. so the answer in the book is wrong and coding is right.
diff --git a/2120/CH8/EX8.6/ex8_6.sce b/2120/CH8/EX8.6/ex8_6.sce new file mode 100755 index 000000000..1257b7773 --- /dev/null +++ b/2120/CH8/EX8.6/ex8_6.sce @@ -0,0 +1,23 @@ +// Exa 8.6
+clc;
+clear;
+close;
+// Given data
+h_i = 749.2;
+h_o = 25.03;
+T_o = 298;// in K
+s_i = 1.6202;
+s_o = 0.0877;
+phi_i = (h_i - h_o)- (T_o * (s_i - s_o));// kcal/kg
+disp(phi_i,"The availablibity before adiabatic throttling in kcal/kg is : ");
+h_e = 749.2;
+s_e = 1.6936;
+phi_e = (h_e - h_o) - (T_o * (s_e - s_o));// in kcal/kg
+disp(phi_e,"The availablibity before adiabatic throttling in kcal/kg is : ");
+Wrev = phi_i - phi_e;// in kcal/kg
+disp(Wrev,"Reversible work in kcal/kg is : ");
+Wactual = 0;
+i = Wrev-Wactual;// in kcal/kg
+disp(i,"Irreversibility per kg of steam in kcal/kg is : ");
+
+
diff --git a/2120/CH8/EX8.7/ex8_7.sce b/2120/CH8/EX8.7/ex8_7.sce new file mode 100755 index 000000000..2485e6552 --- /dev/null +++ b/2120/CH8/EX8.7/ex8_7.sce @@ -0,0 +1,15 @@ +//Exa 8.7
+clc;
+clear;
+close;
+// Given data
+// del_W = T * ds - del_Q
+T = 600;// in K
+p_i = 7;//kgf/cm^2
+p_e = 1.5;//kgf/cm^2
+T_o = 298;// in K
+R = 29.27/427;
+del_W_lost = T * ( R *log(p_i/p_e));// in kcal/kg
+disp(del_W_lost,"Lost work in kcal/kg is");
+i = T_o * (R * (log(p_i/p_e)));// in kcal/kg
+disp(i,"Irreversebility per kg of air flow in kcal/kg is");
diff --git a/2120/CH9/EX9.1/ex9_1.sce b/2120/CH9/EX9.1/ex9_1.sce new file mode 100755 index 000000000..c0da2ec5e --- /dev/null +++ b/2120/CH9/EX9.1/ex9_1.sce @@ -0,0 +1,42 @@ +// Exa 9.1
+clc;
+clear;
+close;
+// Given data
+disp("Part (i) : For dry saturated steam at 17.8 bar")
+p= 17.8;// in bar
+p1= 17.5;// in bar
+p2= 18.0;// in bar
+Vs1= 0.1135;// in litre/kg
+Vs2= 0.1104;// in litre/kg
+Hs1= 2796.1;// in kJ/kg
+Hs2= 2796.4;// in kJ/kg
+L1= 1918;// in kJ/kg
+L2= 1912;// in kJ/kg
+phi_s1= 6.389;// in kJ/kg K
+phi_s2= 6.379;// in kJ/kg K
+Vs= Vs1-(Vs2-Vs1)/(p2-p1)*(p-p1);// in litre/kg
+Hs= Hs1+(Hs2-Hs1)/(p2-p1)*(p-p1);// in kJ/kg
+L= L1- (L1-L2)/(p2-p1)*(p-p1);// in kJ/kg
+phi_s= phi_s1- (phi_s1-phi_s2)/(p2-p1)*(p-p1);// in kJ/kg K
+disp("Part (i) : For dry saturated steam at 17.8 bar")
+disp(Vs,"The specific volume in litre/kg is : ");
+disp(Hs,"The enthalpy in kJ/kg is : ");
+disp(L,"The latent heat in kJ/kg is : ");
+disp(phi_s,"The entropy in kJ/kg K")
+disp("Part (ii) : For superheated steam at 16 bar and 340°C")
+T= 340;// in K
+T1= 300;// in K
+T2= 350;// in K
+Vsup1= 0.1585;// in m^3/kg
+Vsup2= 0.1743;// in m^3/kg
+Hsup1= 3030;// in kJ/kg
+Hsup2= 3142;// in kJ/kg
+phi_sup1= 6.877;// in kJ/kg K
+phi_sup2= 7.063;// in kJ/kg K
+Vsup= Vsup1+(Vsup2-Vsup1)/(T2-T1)*(T-T1);// in m^3/kg
+Hsup= Hsup1+(Hsup2-Hsup1)/(T2-T1)*(T-T1);// in kJ/kg
+phi_sup= phi_sup1+(phi_sup2-phi_sup1)/(T2-T1)*(T-T1);// in kJ/kg
+disp(Vsup,"The specific volume in m^3/kg is : ");
+disp(Hsup,"The enthalpy in kJ/kg is : ");
+disp(phi_sup,"The entropy in kJ/kg K is : ")
diff --git a/2120/CH9/EX9.10/ex9_10.sce b/2120/CH9/EX9.10/ex9_10.sce new file mode 100755 index 000000000..726dcc9fe --- /dev/null +++ b/2120/CH9/EX9.10/ex9_10.sce @@ -0,0 +1,21 @@ +// Exa 9.10
+clc;
+clear;
+close;
+// Given data
+T_sat = 179.88;// in degree c
+T_sat = T_sat + 273;// in k
+T_sup = 200;// in degree c
+T_sup = T_sup + 273;// in k
+L = 2013.6;// in kJ/kg
+C_ps = 2.326;
+C_pw = 1;
+x = 0.8;
+phi_wet = C_pw *log(T_sat/273) + ( (x * L)/T_sat);// in kJ/kg-K
+disp(phi_wet,"Entropy of wet steam in kJ/kg-K is");
+// Part (b)
+phi_dry =C_pw * log(T_sat/273)+L/T_sat;// in kJ/kg
+disp(phi_dry,"Entropy of dry and saturated steam in kJ/kg-K is");
+// Part (c)
+phi_sup = phi_dry+C_ps *log(T_sup/T_sat);// in kJ/kg
+disp(phi_sup,"Entropy at 200°C in kJ/kg-K is :");
diff --git a/2120/CH9/EX9.11/ex9_11.sce b/2120/CH9/EX9.11/ex9_11.sce new file mode 100755 index 000000000..3b2988dbc --- /dev/null +++ b/2120/CH9/EX9.11/ex9_11.sce @@ -0,0 +1,39 @@ +// Exa 9.11
+clc;
+clear;
+close;
+// Given data
+m = 1;// in kg
+x = 0.9;
+p = 1;// N/mm^2
+p = p * 10^1;// in bar
+p = p * 10^2;// in kPa
+h_sen = 762.61;// in kJ/kg
+L = 2013.6;// in kJ/kg
+v_s = 0.1944;// in m^3 per kg
+H_totalwet = h_sen + x*L;// in kJ/kg
+U_wet = H_totalwet - (p * x * v_s);// in kJ/kg
+I = U_wet / H_totalwet;// internal energy as a fraction of total heat
+I = I * 10^2;// in %
+disp(I,"The internal energy in % is");
+// Part (b)
+v_s = 0.1542;// in m^3/kg
+h_sen = 815;// in kJ/kg
+L = 1972;// in kJ/kg
+H_totaldry = 2787;// in kJ/kg
+C_ps = 2.199;
+t_sup = 250;// in °C
+t_sup = t_sup + 273;// in K
+t_sat = 190.74;// in °C
+t_sat = t_sat + 273;// in K
+p1 = 13 * 10^2;// in kPa
+v_ssup = v_s*t_sup/t_sat;// in m^3/kg
+disp(v_ssup,"The volume of superheated steam in m^3/kg is");
+// Part (c)
+t_sat = t_sat - 273;// in °C
+t_sup = t_sup - 273;// in °C
+U_sup =h_sen+L+C_ps*(t_sup-t_sat)-p1*v_ssup;// in kJ
+del_U = U_sup - U_wet;// in kJ
+disp(del_U,"Change in internal energy in kJ is :");
+
+
diff --git a/2120/CH9/EX9.12/ex9_12.sce b/2120/CH9/EX9.12/ex9_12.sce new file mode 100755 index 000000000..9d7bd5c14 --- /dev/null +++ b/2120/CH9/EX9.12/ex9_12.sce @@ -0,0 +1,17 @@ +// Exa 9.12
+clc;
+clear;
+close;
+// Given data
+m = 0.5;// in kg
+M = 6.6;// in kg
+x1 = M / (M+m);
+h_dry = 2683;//in kJ/kg
+C_p = 2.1;
+h_sen = 814.5;//in kJ/kg
+L = 1973;// in kJ/kg
+t_sup = 120;// in °C
+t_sat = 104.8;// in °C
+x2 =(h_dry+C_p*(t_sup - t_sat)-h_sen)/ L;
+x = x2 * x1;
+disp(x,"the dryness fraction of steam is");
diff --git a/2120/CH9/EX9.2/ex9_2.sce b/2120/CH9/EX9.2/ex9_2.sce new file mode 100755 index 000000000..08cecedb1 --- /dev/null +++ b/2120/CH9/EX9.2/ex9_2.sce @@ -0,0 +1,19 @@ +// Exa 9.2
+clc;
+clear;
+close;
+// Given data
+h_sen = 798.43;// in kJ/kg
+L = 1984.3;// in kJ/kg
+H_total_wet = 2665.7;
+// H_total_wet= h_sen+x*L
+x = (H_total_wet - h_sen)/L;
+disp(x,"The value of x is :");
+// Part (b)
+h_total_sup= 2961;// in kJ/kg
+Cps= 2.112;// in kJ/kg
+H_total_dry= 2782.7;// in kJ/kg
+// Let deltaT= T_sup-T_sat
+// h_total_sup = h_sen+L+h_sup = H_total_dry +Cps*deltaT
+deltaT= (h_total_sup-H_total_dry)/Cps;// in °C
+disp(deltaT,"Degree of superheat in °C is :")
diff --git a/2120/CH9/EX9.3/ex9_3.sce b/2120/CH9/EX9.3/ex9_3.sce new file mode 100755 index 000000000..2d21a2036 --- /dev/null +++ b/2120/CH9/EX9.3/ex9_3.sce @@ -0,0 +1,14 @@ +// Exa 9.3
+clc;
+clear;
+close;
+// Given data
+H2 = 3055;// in kj per kg
+H3 = 2550;// in kj per kg
+fie_1 = 7.15;// kj per kg k
+fie_2 = 7.57;// kj per kg k
+d_fie= fie_2 - fie_1;// in kj per kg k
+disp(d_fie,"Change in entropy during throttling process in kJ/kg-K is :");
+dH = H2 - H3;// in kj per kg
+disp(dH,"Change in enthalpy during isentropic process in kJ/kg is : ");
+
diff --git a/2120/CH9/EX9.4/ex9_4.sce b/2120/CH9/EX9.4/ex9_4.sce new file mode 100755 index 000000000..fa1efa9da --- /dev/null +++ b/2120/CH9/EX9.4/ex9_4.sce @@ -0,0 +1,31 @@ +// Exa 9.4
+clc;
+clear;
+close;
+// Given data
+H_w = 670.4;// in kJ/kg
+L = 2085;// kJ per kg
+T_sat = 158.8;// in degree c
+m = 4;// in kg
+x = 0.5;
+h_sen = 670.4;// in kJ/kg
+H_totalwet = m * ( h_sen + (x *L));// in kJ
+x1 = 0.95
+H_totalwet1 = m *( h_sen + (x1 *L));// in kJ
+Q1 = H_totalwet1 - H_totalwet;// in kJ
+disp(Q1,"Part (i) The quantity of heat in case first in kJ is : ");
+// Part (b)
+x2 = 1;
+H_totaldry = m *( h_sen + (x2 *L));// in kJ
+Q2 = H_totaldry - H_totalwet;// in kJ
+disp(Q2,"Part (ii) The quantity of heat in case second in kJ is : ");
+// Part (c)
+H_totalsup = 3062.3;// in kJ per kg
+H_totalsup = m * H_totalsup;// in kJ
+Q3 = H_totalsup - H_totalwet;// in kJ
+disp(Q3,"Part (iii) The quantity of heat in case third in kJ is : ");
+// Part (d)
+H_totalsup = 2950.4;// in kj per kg
+H_totalsup = m * H_totalsup;// in kj
+Q4 = H_totalsup - H_totalwet;// in kj
+disp(Q4,"Part (iv) The quantity of heat in case forth in kJ is : ");
diff --git a/2120/CH9/EX9.5/ex9_5.sce b/2120/CH9/EX9.5/ex9_5.sce new file mode 100755 index 000000000..d3505d721 --- /dev/null +++ b/2120/CH9/EX9.5/ex9_5.sce @@ -0,0 +1,21 @@ +// Exa 9.5
+clc;
+clear;
+close;
+// Given data
+p1 = 2.5;// Mpa
+p1 = p1 * 10^6;// in pa
+p1 = p1 * 10^-5;// in bar
+p2 = 10;// in kpa
+p2 = p2 * 10^3;// in pa
+p2 = p2 * 10^-5;// in bar
+H1 = 2878;// in kJ/kg at 25 bar and 250°C
+H2 = 2583.9;// in kJ/kg at 0.1 bar for dry saturated steam
+AHD= H1-H2;// actual heat drop in kJ/kg
+H2_desh = 2110;// in kj per kg
+IHD = H1 - H2_desh;// Isentropic heat drop in kJ/ kg
+Eta_Isentropic = (AHD/IHD) * 100;// in %
+disp(Eta_Isentropic,"Isentropic efficiency in % is");
+// H1 + v1^2/2 + g*z1 + Q = H2 + v2^2/2 + g*z2 + W
+W = H1 - H2;// in kJ/kg (as v1=v2, z1= z2 and Q=0)
+disp(W,"Turbine work is in kJ/kg is :");
diff --git a/2120/CH9/EX9.6/ex9_6.sce b/2120/CH9/EX9.6/ex9_6.sce new file mode 100755 index 000000000..e82228124 --- /dev/null +++ b/2120/CH9/EX9.6/ex9_6.sce @@ -0,0 +1,20 @@ +//Exa 9.6
+clc;
+clear;
+close;
+// Given data
+p1 = 11;// in bar
+p2 = 1.2;// in bar
+H_w1 = 781.1;//in kJ/kg
+L1 = 2000;// in kJ/kg
+t1 = 120;// in degree c
+t1 = t1 + 273;// in K
+t2 = 104.81;// in degree c
+t2 = t2 + 273;// in K
+H_dry2 = 2683.4;// in kJ/kg
+C_p = 2.607;// in kJ/kgK
+// From Hw1+x*L1 = H_dry2+Cp*(t1-t2)
+x = (H_dry2 + (C_p * (t1 - t2)) - H_w1) / L1;
+disp(x,"Dryness fraction of steam is :");
+x1 = (H_dry2 - H_w1)/L1;
+disp(x1,"Maximum dryness fraction of steam is :");
diff --git a/2120/CH9/EX9.7/ex9_7.sce b/2120/CH9/EX9.7/ex9_7.sce new file mode 100755 index 000000000..5b73f8cc3 --- /dev/null +++ b/2120/CH9/EX9.7/ex9_7.sce @@ -0,0 +1,19 @@ +//Exa 9.7
+clc;
+clear;
+close;
+// Given data
+W = 21;// in kg
+w_wp = 2;// in kg
+h1 = 781.15;// in kJ/kg
+L1 = 1998.5;// in kJ/kg
+m = 2;// in kg
+h2 = 420.5;// in kJ/kg
+L = 2255.9;// in kJ/kg
+t_sat = 100.4;// in degree c
+t1 = 110;// in degree c
+C_ps = 2;// in kJ/kgK
+x1 = W / (W + w_wp);
+x2 = (h2 + L + m * (t1-t_sat) - h1)/ L1;
+x = x1 * x2;
+disp(x,"The dryness fraction for sample steam is");
diff --git a/2120/CH9/EX9.8/ex9_8.sce b/2120/CH9/EX9.8/ex9_8.sce new file mode 100755 index 000000000..5e214fb93 --- /dev/null +++ b/2120/CH9/EX9.8/ex9_8.sce @@ -0,0 +1,13 @@ +//Exa 9.8
+clc;
+clear;
+close;
+// Given data
+h_sen = 417.4;// in kJ/kg
+h_totaldry = 2675.4;// in kJ/kg
+L = 2258;// in kJ/kg
+v = 5;// in m^3
+v_v = 4.95;// in m^3
+x = v_v/v;
+Q = h_totaldry -(h_sen +x*L);// in kJ/kg
+disp(Q,"Heat transfered per kg in kJ/kg is : ");
diff --git a/2120/CH9/EX9.9/ex9_9.sce b/2120/CH9/EX9.9/ex9_9.sce new file mode 100755 index 000000000..1fb84af9f --- /dev/null +++ b/2120/CH9/EX9.9/ex9_9.sce @@ -0,0 +1,20 @@ +// Exa 9.9
+clc;
+clear;
+close;
+// Given data
+m = 1;// in kg
+p = 10;// in bar
+p = p * 10^2;// in kpa
+x = 0.94;
+h_sen = 762.61;// in kJ/kg
+L = 2013.6;// in kJ/kg
+v_s = 0.1942;// in m^3 per kg
+w_ext = p * x * v_s * m;// in kJ/kg
+disp(w_ext,"The work done during evaporation in kJ/kg is");
+// Part (b)
+L_internal = (x * L) - w_ext;// in kJ/kg
+disp(L_internal,"Internal latent heat in kJ/kg is");
+// Part (c)
+U_wet = h_sen+x*L-p*x*v_s;// in kJ/kg
+disp(U_wet,"Internal energy in kJ/kg is");
|