diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb')
-rw-r--r-- | Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb | 1218 |
1 files changed, 1218 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb new file mode 100644 index 0000000..511bac3 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/15-Ideal_gas_power_cycles.ipynb @@ -0,0 +1,1218 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Ideal gas power cycles" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.10: maximum_temperature_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10');\n", +"\n", +"// aim : To determine\n", +"// (a) the maximum temperature attained during the cycle\n", +"// (b) the thermal efficiency of the cycle\n", +"\n", +"// given value\n", +"rva =7.5;// volume ratio of adiabatic expansion\n", +"rvc =15;// volume ratio of compression\n", +"P1 = 98;// initial pressure, [kn/m^2]\n", +"T1 = 273+44;// initial temperature, [K]\n", +"P4 = 258;// pressure at the end of the adiabatic expansion, [kN/m^2]\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// by seeing diagram\n", +"// for process 4-1, P4/T4=P1/T1\n", +"T4 = T1*(P4/P1);// [K]\n", +"// for process 3-4\n", +"T3 = T4*(rva)^(Gama-1);\n", +"mprintf('\n (a) The maximum temperature during the cycle is = %f C\n',T3-273);\n", +"\n", +"// (b)\n", +"\n", +"// for process 1-2,\n", +"T2 = T1*(rvc)^(Gama-1);// [K]\n", +"n_the = 1-(T4-T1)/((Gama)*(T3-T2));// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency of the cycle is = %f percent\n',n_the*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.11: thermal_efficiency_and_indicated_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.11');\n", +"\n", +"// aim : To determine\n", +"// (a) the thermal efficiency of the cycle\n", +"// (b) the indicared power of the cycle\n", +"\n", +"// given values\n", +"// taking basis one second\n", +"rv = 11;// volume ratio\n", +"P1 = 96;// initial pressure , [kN/m^2]\n", +"T1 = 273+18;// initial temperature, [K]\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.24\n", +"// (a)\n", +"Beta = 2;// ratio of V3 and V2\n", +"TE = 1-(Beta^(Gama)-1)/((rv^(Gama-1))*Gama*(Beta-1));// thermal efficiency\n", +"mprintf('\n (a) the thermal efficiency of the cycle is = %f percent\n ',TE*100);\n", +"\n", +"// (b) \n", +"// let V1-V2=.05, so\n", +"V2 = .05*.1;// [m^3]\n", +"// from this\n", +"V1 = rv*V2;// [m^3]\n", +"V3 = Beta*V2;// [m^3]\n", +"V4 = V1;// [m^3]\n", +"P2 = P1*(V1/V2)^(Gama);// [kN/m^2]\n", +"P3 = P2;// [kn/m^2]\n", +"P4=P3*(V3/V4)^(Gama);// [kN/m^2]\n", +"// indicated power\n", +"W = P2*(V3-V2)+((P3*V3-P4*V4)-(P2*V2-P1*V1))/(Gama-1);// indicated power, [kW]\n", +"mprintf('\n (c) The indicated power of the cycle is = %f kW\n',W);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.12: pressures_and_temperatures.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.12');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure and temperature at the end of compression\n", +"// (b) the pressure and temperature at the end of the constant volume process\n", +"// (c) the temperature at the end of constant pressure process\n", +"\n", +"// given values\n", +"P1 = 103;// initial pressure, [kN/m^2]\n", +"T1 = 273+22;// initial temperature, [K]\n", +"rv = 16;// volume ratio of the compression\n", +"Q = 244;//heat added, [kJ/kg]\n", +"Gama = 1.4;// heat capacity ratio\n", +"cv = .717;// heat capacity, [kJ/kg k]\n", +"\n", +"// solution\n", +"// taking reference as Fig.15.26\n", +"// (a)\n", +"// for compression\n", +"// rv = V1/V2\n", +"P2 = P1*(rv)^Gama;// pressure at end of compression, [kN/m^2]\n", +"T2 = T1*(rv)^(Gama-1);// temperature at end of compression, [K]\n", +"mprintf('\n (a) The pressure at the end of compression is = %f MN/m^2\n',P2*10^-3);\n", +"mprintf('\n The temperature at the end of compression is = %f C\n',T2-273);\n", +"\n", +"// (b)\n", +"// for constant volume process, \n", +"// Q = cv*(T3-T2), so\n", +"T3 = T2+Q/cv;// temperature at the end of constant volume, [K]\n", +"\n", +"// so for constant volume, P/T=constant, hence\n", +"P3 = P2*(T3/T2);// pressure at the end of constant volume process, [kN/m^2]\n", +"mprintf('\n (b) The pressure at the end of constant volume process is = %f MN/m^2\n ',P3*10^-3);\n", +"mprintf('\n The temperature at the end of constant volume process is = %f C\n',T3-273);\n", +"\n", +"// (c)\n", +"S = rv-1;// stroke\n", +"// assuming \n", +"V3 = 1;// [volume]\n", +"//so\n", +"V4 = V3+S*.03;// [volume]\n", +"// also for constant process V/T=constant, hence\n", +"T4 = T3*(V4/V3);// temperature at the end of constant presure process, [k] \n", +"mprintf('\n (c) The temperature at the end of constant pressure process is = %f C\n',T4-273);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.13: EX15_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.13');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure, volume and temperature at cycle process change points\n", +"// (b) the net work done \n", +"// (c) the thermal efficiency\n", +"// (d) the heat received\n", +"// (e) the work ratio\n", +"// (f) the mean effective pressure\n", +"// (g) the carnot efficiency\n", +"\n", +"\n", +"// given values\n", +"rv = 15;// volume ratio\n", +"P1 = 97*10^-3;// initial pressure , [MN/m^2]\n", +"V1 = .084;// initial volume, [m^3]\n", +"T1 = 273+28;// initial temperature, [K]\n", +"T4 = 273+1320;// maximum temperature, [K]\n", +"P3 = 6.2;// maximum pressure, [MN/m^2]\n", +"cp = 1.005;// specific heat capacity at constant pressure, [kJ/kg K]\n", +"cv = .717;// specific heat capacity at constant volume, [kJ/kg K]\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.27\n", +"// (a)\n", +"R = cp-cv;// gas constant, [kJ/kg K]\n", +"Gama = cp/cv;// heat capacity ratio\n", +"// for process 1-2\n", +"V2 = V1/rv;// volume at stage2, [m^3] \n", +"// using PV^(Gama)=constant for process 1-2\n", +"P2 = P1*(V1/V2)^(Gama);// pressure at stage2,. [MN/m^2]\n", +"T2 = T1*(V1/V2)^(Gama-1);// temperature at stage 2, [K]\n", +"\n", +"// for process 2-3\n", +"// since volumee is constant in process 2-3 , so using P/T=constant, so\n", +"T3 = T2*(P3/P2);// volume at stage 3, [K]\n", +"V3 = V2;// volume at stage 3, [MN/m^2]\n", +"\n", +"// for process 3-4\n", +"P4 = P3;// pressure at stage 4, [m^3]\n", +"// since in stage 3-4 P is constant, so V/T=constant, \n", +"V4 = V3*(T4/T3);// temperature at stage 4,[K]\n", +"\n", +"// for process 4-5\n", +"V5 = V1;// volume at stage 5, [m^3]\n", +"P5 = P4*(V4/V5)^(Gama);// pressure at stage5,. [MN/m^2]\n", +"T5 = T4*(V4/V5)^(Gama-1);// temperature at stage 5, [K]\n", +"\n", +"mprintf('\n (a) P1 = %f kN/m^2, V1 = %f m^3, t1 = %f C,\n P2 = %f MN/m^2, V2 = %f m^3, t2 = %f C,\n P3 = %f MN/m^2, V3 = %f m^3, t3 = %f C,\n P4 = %f MN/m^2, V4 = %f m^3, t4 = %f C,\n P5 = %fkN/m^2, V5 = %fm^3, t5 = %fC\n',P1*10^3,V1,T1-273,P2,V2,T2-273,P3,V3,T3-273,P4,V4,T4-273,P5*10^3,V5,T5-273);\n", +"\n", +"\n", +"// (b)\n", +"W = (P3*(V4-V3)+((P4*V4-P5*V5)-(P2*V2-P1*V1))/(Gama-1))*10^3;// work done, [kJ]\n", +"mprintf('\n (b) The net work done is = %f kJ\n',W);\n", +"\n", +"// (c) \n", +"TE = 1-(T5-T1)/((T3-T2)+Gama*(T4-T3));// thermal efficiency\n", +"mprintf('\n (c) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (d)\n", +"Q = W/TE;// heat received, [kJ]\n", +"mprintf('\n (d) The heat received is = %f kJ\n',Q);\n", +"\n", +"// (e)\n", +"PW = P3*(V4-V3)+(P4*V4-P5*V5)/(Gama-1)\n", +"WR = W*10^-3/PW;// work ratio\n", +"mprintf('\n (f) The work ratio is = %f\n',WR);\n", +"\n", +"// (e)\n", +"Pm = W/(V1-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (e) The mean effective pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// (f)\n", +"CE = (T4-T1)/T4;// carnot efficiency\n", +"mprintf('\n (f) The carnot efficiency is = %f percent\n',CE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.14: thermal_efficiency_heat_work_done_work_ratio_and_mean_effective_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.14');\n", +"\n", +"// aim : To determine\n", +"// (a) the thermal efficiency\n", +"// (b) the heat received\n", +"// (c) the heat rejected\n", +"// (d) the net work \n", +"// (e) the work ratio\n", +"// (f) the mean effective pressure\n", +"// (g) the carnot efficiency\n", +"\n", +"\n", +"// given values\n", +"P1 = 101;// initial pressure , [kN/m^2]\n", +"V1 = 14*10^-3;// initial volume, [m^3]\n", +"T1 = 273+15;// initial temperature, [K]\n", +"P3 = 1850;// maximum pressure, [kN/m^2]\n", +"V2 = 2.8*10^-3;// compressed volume, [m^3]\n", +"Gama = 1.4;// heat capacity\n", +"R = .29;// gas constant, [kJ/kg k]\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.29\n", +"// (a)\n", +"// for process 1-2\n", +"// using PV^(Gama)=constant for process 1-2\n", +"P2 = P1*(V1/V2)^(Gama);// pressure at stage2,. [MN/m^2]\n", +"T2 = T1*(V1/V2)^(Gama-1);// temperature at stage 2, [K]\n", +"\n", +"// for process 2-3\n", +"// since volumee is constant in process 2-3 , so using P/T=constant, so\n", +"T3 = T2*(P3/P2);// volume at stage 3, [K]\n", +"\n", +"// for process 3-4\n", +"P4 = P1;\n", +"T4 = T3*(P4/P3)^((Gama-1)/Gama);// temperature\n", +"\n", +"TE = 1-Gama*(T4-T1)/(T3-T2);// thermal efficiency\n", +"mprintf('\n (a) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (b)\n", +"cv = R/(Gama-1);// heat capacity at copnstant volume, [kJ/kg k]\n", +"m = P1*V1/(R*T1);// mass of gas, [kg]\n", +"Q1 = m*cv*(T3-T2);// heat received, [kJ/cycle]\n", +"mprintf('\n (b) The heat received is = %f kJ/cycle\n',Q1);\n", +"\n", +"// (c)\n", +"cp = Gama*cv;// heat capacity at constant at constant pressure, [kJ/kg K]\n", +"Q2 = m*cp*(T4-T1);// heat rejected, [kJ/cycle]\n", +"mprintf('\n (c) The heat rejected is = %f kJ/cycle\n',Q2);\n", +"\n", +"// (d)\n", +"W = Q1-Q2;// net work , [kJ/cycle]\n", +"mprintf('\n (d) The net work is = %f kJ/cycle\n',W);\n", +"\n", +"// (e)\n", +"// pressure is constant for process 1-4, so V/T=constant\n", +"V4 = V1*(T4/T1);// volume, [m^3]\n", +"V3 = V2;// for process 2-3\n", +"P4 = P1;// for process 1-4\n", +"PW = (P3*V3-P1*V1)/(Gama-1);// positive work done, [kJ/cycle]\n", +"WR = W/PW;// work ratio\n", +"mprintf('\n (e) The work ratio is = %f\n',WR);\n", +"\n", +"// (f)\n", +"Pm = W/(V4-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (f) The mean effefctive pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// (g)\n", +"CE = (T3-T1)/T3;// carnot efficiency\n", +"mprintf('\n (g) The carnot efficiency is = %f percent\n',CE*100);\n", +"\n", +"// there is minor variation in answer reported in the book\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.15: work_done_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.15');\n", +"\n", +"// aim : To determine\n", +"// (a) the net work done\n", +"// (b) the ideal thermal efficiency\n", +"// (c) the thermal efficiency if the process of generation is not included\n", +"\n", +"// given values\n", +"P1 = 110;// initial pressure, [kN/m^2)\n", +"T1 = 273+30;// initial temperature, [K]\n", +"V1 = .05;// initial volume, [m^3]\n", +"V2 = .005;// volume, [m^3]\n", +"T3 = 273+700;// temperature, [m^3]\n", +"R = .289;// gas constant, [kJ/kg K]\n", +"cv = .718;// heat capacity, [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"m = P1*V1/(R*T1);// mass , [kg]\n", +"W = m*R*(T3-T1)*log(V1/V2);// work done, [kJ]\n", +"mprintf('\n (a) The net work done is = %f kJ\n',W);\n", +"\n", +"// (b)\n", +"n_the = (T3-T1)/T3;// ideal thermal efficiency\n", +"mprintf('\n (b) The ideal thermal efficiency is = %f percent\n',n_the*100);\n", +"\n", +"// (c)\n", +"V4 = V1;\n", +"V3 = V2;\n", +"T4 = T3;\n", +"T2 = T1;\n", +"\n", +"Q_rej = m*cv*(T4-T1)+m*R*T1*log(V1/V2);// heat rejected\n", +"Q_rec = m*cv*(T3-T2)+m*R*T3*log(V4/V3);// heat received\n", +"\n", +"n_th = (1-Q_rej/Q_rec);// thermal efficiency\n", +"mprintf('\n (c) the thermal efficiency if the process of regeneration is not included is = %f percent\n',n_th*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.16: maximum_temperature_work_done_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.16');\n", +"\n", +"// aim : To determine\n", +"// (a) the maximum temperature\n", +"// (b) the net work done\n", +"// (c) the ideal thermal efficiency\n", +"// (d) the thermal efficiency if the process of regeneration is not included\n", +"\n", +"// given values\n", +"P1 = 100;// initial pressure, [kN/m^2)\n", +"T1 = 273+20;// initial temperature, [K]\n", +"V1 = .08;// initial volume, [m^3]\n", +"rv = 5;// volume ratio\n", +"R = .287;// gas constant, [kJ/kg K]\n", +"cp = 1.006;// heat capacity, [kJ/kg K]\n", +"V3_by_V2 = 2;\n", +"\n", +"// solution\n", +"// (a)\n", +"// using Fig.15.33\n", +"// process 1-2 is isothermal\n", +"T2 = T1;\n", +"// since process 2-3 isisobaric, so V/T=constant\n", +"T3 = T2*(V3_by_V2);// maximumtemperature, [K]\n", +"mprintf('\n (a) The maximum temperature is = %f C\n',T3-273);\n", +"\n", +"// (b)\n", +"m = P1*V1/(R*T1);// mass , [kg]\n", +"W = m*R*(T3-T1)*log(rv);// work done, [kJ]\n", +"mprintf('\n (b) The net work done is = %f kJ\n',W);\n", +"\n", +"// (c)\n", +"TE = (T3-T1)/T3;// ideal thermal efficiency\n", +"mprintf('\n (c) The ideal thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (d)\n", +"T4 = T3;\n", +"T2 = T1;\n", +"\n", +"Q_rej = m*cp*(T4-T1)+m*R*T1*log(rv);// heat rejected\n", +"Q_rec = m*cp*(T3-T2)+m*R*T3*log(rv);// heat received\n", +"\n", +"n_th = (1-Q_rej/Q_rec);// thermal efficiency\n", +"mprintf('\n (d) the thermal efficiency if the process of regeneration is not included is = %f percent\n',n_th*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.17: work_done_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.17');\n", +"\n", +"// aim : To determine \n", +"// (a) the net work done\n", +"// (b) thethermal efficiency\n", +"\n", +"// given values\n", +"m = 1;// mass of air, [kg]\n", +"T1 = 273+230;// initial temperature, [K]\n", +"P1 = 3450;// initial pressure, [kN/m^2]\n", +"P2 = 2000;// pressure, [kN/m^2]\n", +"P3 = 140;// pressure, [kN/m^2]\n", +"P4 = P3;\n", +"Gama = 1.4; // heat capacity ratio\n", +"cp = 1.006;// heat capacity, [kJ/kg k]\n", +"\n", +"// solution\n", +"T2 =T1;// isothermal process 1-2\n", +"// process 2-3 and 1-4 are adiabatic so\n", +"T3 = T2*(P3/P2)^((Gama-1)/Gama);// temperature, [K] \n", +"T4 = T1*(P4/P1)^((Gama-1)/Gama);// [K]\n", +"R = cp*(Gama-1)/Gama;// gas constant, [kJ/kg K]\n", +"Q1 = m*R*T1*log(P1/P2);// heat received, [kJ]\n", +"Q2 = m*cp*(T3-T4);// heat rejected\n", +"\n", +"//hence\n", +"W = Q1-Q2;// work done\n", +"mprintf('\n (a) The net work done is = %f kJ\n',W);\n", +"\n", +"// (b)\n", +"TE = 1-Q2/Q1;// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.18: thermal_efficiency_and_Carnot_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.18');\n", +"\n", +"// aim : To determine \n", +"// thermal eficiency\n", +"// carnot efficiency\n", +"\n", +"// given values\n", +"rv = 5;// volume ratio\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// under given condition\n", +"\n", +"TE = 1-(1/Gama*(2-1/rv^(Gama-1)))/(1+2*((Gama-1)/Gama)*log(rv/2));// thermal efficiency\n", +"mprintf('\n The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"CE = 1-1/(2*rv^(Gama-1));// carnot efficiency\n", +"mprintf('\n The carnot efficiency is = %f \n',CE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1: thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.1');\n", +"\n", +"// aim : To determine \n", +"// the thermal efficiency of the cycle\n", +"\n", +"// given values\n", +"T1 = 273+400;// temperature limit, [K]\n", +"T3 = 273+70;// temperature limit, [K]\n", +"\n", +"// solution\n", +"// using equation [15] of section 15.3\n", +"n_the = (T1-T3)/T1*100;// thermal efficiency \n", +"mprintf('\n The thermal efficiency of the cycle is = %f percent\n',n_the);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2: volume_ratios_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.2');\n", +"\n", +"// aim : To determine\n", +"// (a) the volume ratios of the isothermal and adiabatic processes\n", +"// (b) the thermal efficiency of the cycle\n", +"\n", +"// given values\n", +"T1 = 273+260;// temperature, [K]\n", +"T3 = 273+21;// temperature, [K]\n", +"er = 15;// expansion ratio\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// (a)\n", +"T2 = T1;\n", +"T4 = T3;\n", +"// for adiabatic process\n", +"rva = (T1/T4)^(1/(Gama-1));// volume ratio of adiabatic\n", +"rvi = er/rva;// volume ratio of isothermal\n", +"mprintf('\n (a) The volume ratio of the adiabatic process is = %f\n',rva);\n", +"mprintf('\n The volume ratio of the isothermal process is = %f\n',rvi);\n", +"\n", +"// (b)\n", +"n_the = (T1-T4)/T1*100;// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency of the cycle is = %f percent\n',n_the);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3: pressure_volume_temperature_thermal_efficiency_work_done_and_work_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure, volume and temperature at each corner of the cycle\n", +"// (b) the thermal efficiency of the cycle\n", +"// (c) the work done per cycle\n", +"// (d) the work ratio\n", +"\n", +"// given values\n", +"m = 1;// mass of air, [kg]\n", +"P1 = 1730;// initial pressure of carnot engine, [kN/m^2]\n", +"T1 = 273+300;// initial temperature, [K]\n", +"R = .29;// [kJ/kg K]\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.15\n", +"// (a)\n", +"// for the isothermal process 1-2\n", +"// using ideal gas law\n", +"V1 = m*R*T1/P1;// initial volume, [m^3]\n", +"T2 = T1;\n", +"V2 = 3*V1;// given condition\n", +"// for isothermal process, P1*V1=P2*V2, so\n", +"P2 = P1*(V1/V2);// [MN/m^2]\n", +"// for the adiabatic process 2-3\n", +"V3 = 6*V1;// given condition\n", +"T3 = T2*(V2/V3)^(Gama-1);\n", +"// also for adiabatic process, P2*V2^Gama=P3*V3^Gama, so\n", +"P3 = P2*(V2/V3)^Gama;\n", +"// for the isothermal process 3-4\n", +"T4 = T3;\n", +"// for both adiabatic processes, the temperataure ratio is same, \n", +"// T1/T4 = T2/T3=(V4/V1)^(Gama-1)=(V3/V2)^(Gama-1), so\n", +"V4 = 2*V1;\n", +"// for isothermal process, 3-4, P3*V3=P4*V4, so\n", +"P4 = P3*(V3/V4);\n", +"disp('(a) At line 1');\n", +"mprintf('\n V1 = %f m^3, t1 = %f C, P1 = %f kN/m^2\n',V1,T1-273,P1);\n", +"\n", +"disp('At line 2');\n", +"mprintf('\n V2 = %f m^3, t2 = %f C, P2 = %f kN/m^2\n',V2,T2-273,P2);\n", +"\n", +"disp('At line 3');\n", +"mprintf('\n V3 = %f m^3, t3 = %f C, P3 = %f kN/m^2\n',V3,T3-273,P3);\n", +"\n", +"\n", +"disp('At line 4');\n", +"mprintf('\n V4 = %f m^3, t4 = %f C, P4 = %f kN/m^2\n',V4,T4-273,P4);\n", +"\n", +"\n", +"// (b)\n", +"n_the = (T1-T3)/T1;// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency of the cycle is = %f percent\n',n_the*100);\n", +"\n", +"// (c)\n", +"W = m*R*T1*log(V2/V1)*n_the;// work done, [J]\n", +"mprintf('\n (c) The work done per cycle is = %f kJ\n',W);\n", +"\n", +"// (d)\n", +"wr = (T1-T3)*log(V2/V1)/(T1*log(V2/V1)+(T1-T3)/(Gama-1));// work ratio\n", +"mprintf('\n (d) The work ratio is = %f\n',wr);\n", +"\n", +"// there is calculation mistake in the book so answer is not matching\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4: EX15_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.4');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure, volume and temperature at cycle state points\n", +"// (b) the heat received\n", +"// (c) the work done \n", +"// (d) the thermal efficiency\n", +"// (e) the carnot efficiency\n", +"// (f) the work ration\n", +"// (g) the mean effective pressure\n", +"\n", +"// given values\n", +"ro = 8;// overall volume ratio;\n", +"rv = 6;// volume ratio of adiabatic compression\n", +"P1 = 100;// initial pressure , [kN/m^2]\n", +"V1 = .084;// initial volume, [m^3]\n", +"T1 = 273+28;// initial temperature, [K]\n", +"Gama = 1.4;// heat capacity ratio\n", +"cp = 1.006;// specific heat capacity, [kJ/kg K]\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.18\n", +"// (a)\n", +"V2 = V1/rv;// volume at stage2, [m^3] \n", +"V4 = ro*V2;// volume at stage 4;[m^3]\n", +"// using PV^(Gama)=constant for process 1-2\n", +"P2 = P1*(V1/V2)^(Gama);// pressure at stage2,. [kN/m^2]\n", +"T2 = T1*(V1/V2)^(Gama-1);// [K]\n", +"\n", +"P3 = P2;// pressure at stage 3, [kN/m^2]\n", +"V3 = V4/rv;// volume at stage 3, [m^3]\n", +"// since pressure is constant in process 2-3 , so using V/T=constant, so\n", +"T3 = T2*(V3/V2);// temperature at stage 3, [K]\n", +"\n", +"// for process 1-4\n", +"T4 = T1*(V4/V1);// temperature at stage4, [K\n", +"P4 = P1;// pressure at stage4, [kN/m^2]\n", +"\n", +"mprintf('\n (a) P1 = %f kN/m^2, V1 = %f m^3, t1 = %f C,\n P2 = %f kN/m^2, V2 = %f m^3, t2 = %f C,\n P3 = %f kN/m^2, V3 = %f m^3, t3 = %f C,\n P4 = %f kN/m^2, V4 = %f m^3, t4 = %f C\n',P1,V1,T1-273,P2,V2,T2-273,P3,V3,T3-273,P4,V4,T4-273);\n", +"\n", +"// (b)\n", +"R = cp*(Gama-1)/Gama;// gas constant, [kJ/kg K]\n", +"m = P1*V1/(R*T1);// mass of gas, [kg]\n", +"Q = m*cp*(T3-T2);// heat received, [kJ]\n", +"mprintf('\n (b) The heat received is = %f kJ\n',Q);\n", +"\n", +"// (c) \n", +"W = P2*(V3-V2)-P1*(V4-V1)+((P3*V3-P4*V4)-(P2*V2-P1*V1))/(Gama-1);// work done, [kJ]\n", +"mprintf('\n (c) The work done is = %f kJ\n',W);\n", +"\n", +"// (d)\n", +"TE = 1-T1/T2;// thermal efficiency\n", +"mprintf('\n (d) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (e)\n", +"CE = (T3-T1)/T3;// carnot efficiency\n", +"mprintf('\n (e) The carnot efficiency is = %f percent\n',CE*100);\n", +"\n", +"// (f)\n", +"PW = P2*(V3-V2)+(P3*V3-P4*V4)/(Gama-1);// positive work done, [kj]\n", +"WR = W/PW;// work ratio\n", +"mprintf('\n (f) The work ratio is = %f\n',WR);\n", +"\n", +"// (g)\n", +"Pm = W/(V4-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (g) The mean effective pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// there is minor variation in answer reported in the book\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5: thermal_efficiency_and_specific_fuel_consumption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.5');\n", +"\n", +"// aim : To determine\n", +"// (a) the actual thermal efficiency of the turbine\n", +"// (b) the specific fuel consumption of the turbine in kg/kWh\n", +"\n", +"// given values\n", +"P2_by_P1 = 8;\n", +"n_tur = .6;// ideal turbine thermal efficiency\n", +"c = 43*10^3;// calorific value of fuel, [kJ/kg]\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// (a)\n", +"rv = P2_by_P1;\n", +"n_tur_ide = 1-1/(P2_by_P1)^((Gama-1)/Gama);// ideal thermal efficiency\n", +"ate = n_tur_ide*n_tur;// actual thermal efficiency\n", +"mprintf('\n (a) The actual thermal efficiency of the turbine is = %f percent\n',ate*100);\n", +"\n", +"// (b)\n", +"ewf = c*ate;// energy to work fuel, [kJ/kg]\n", +"kWh = 3600;// energy equivalent ,[kJ]\n", +"sfc = kWh/ewf;// specific fuel consumption, [kg/kWh]\n", +"mprintf('\n (b) The specific fuel consumption of the turbine is = %f kg/kWh',sfc);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6: relative_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.6');\n", +"\n", +"// aim : To determine\n", +"// the relative efficiency of the engine\n", +"\n", +"// given values\n", +"d = 80;// bore, [mm]\n", +"l = 85;// stroke, [mm]\n", +"V1 = .06*10^6;// clearence volume, [mm^3]\n", +"ate = .22;// actual thermal efficiency of the engine\n", +"Gama = 1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"sv = %pi*d^2/4*l;// stroke volume, [mm^3]\n", +"V2 = sv+V1;// [mm^3]\n", +"rv = V2/V1;\n", +"ite = 1-(1/rv)^(Gama-1);// ideal thermal efficiency\n", +"re = ate/ite;// relative thermal efficiency\n", +"mprintf('\n The relative efficiency of the engine is = %f percent\n',re*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7: EX15_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.7');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure, volume and temperature at each cycle process change points\n", +"// (b) the heat transferred to air\n", +"// (c) the heat rejected by the air\n", +"// (d) the ideal thermal efficiency\n", +"// (e) the work done \n", +"// (f) the mean effective pressure\n", +"\n", +"// given values\n", +"m = 1;// mass of air, [kg]\n", +"rv = 6;// volume ratio of adiabatic compression\n", +"P1 = 103;// initial pressure , [kN/m^2]\n", +"T1 = 273+100;// initial temperature, [K]\n", +"P3 = 3450;// maximum pressure, [kN/m^2]\n", +"Gama = 1.4;// heat capacity ratio\n", +"R = .287;// gas constant, [kJ/kg K]\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.20\n", +"// (a)\n", +"// for point 1\n", +"V1 = m*R*T1/P1;// initial volume, [m^3]\n", +"\n", +"// for point 2\n", +"V2 = V1/rv;// volume at point 2, [m^3] \n", +"// using PV^(Gama)=constant for process 1-2\n", +"P2 = P1*(V1/V2)^(Gama);// pressure at point 2,. [kN/m^2]\n", +"T2 = T1*(V1/V2)^(Gama-1);// temperature at point 2,[K]\n", +"\n", +"// for point 3\n", +"V3 = V2;// volume at point 3, [m^3]\n", +"// since volume is constant in process 2-3 , so using P/T=constant, so\n", +"T3 = T2*(P3/P2);// temperature at stage 3, [K]\n", +"\n", +"// for point 4\n", +"V4 = V1;// volume at point 4, [m^3]\n", +"P4 = P3*(V3/V4)^Gama;// pressure at point 4, [kN/m^2] \n", +"// again since volume is constant in process 4-1 , so using P/T=constant, so\n", +"T4 = T1*(P4/P1);// temperature at point 4, [K]\n", +"\n", +"mprintf('\n (a) P1 = %f kN/m^2, V1 = %f m^3, t1 = %f C,\n P2 = %f kN/m^2, V2 = %f m^3, t2 = %f C,\n P3 = %f kN/m^2, V3 = %f m^3, t3 = %f C,\n P4 = %f kN/m^2, V4 = %f m^3, t4 = %f C\n',P1,V1,T1-273,P2,V2,T2-273,P3,V3,T3-273,P4,V4,T4-273);\n", +"\n", +"// (b)\n", +"cv = R/(Gama-1);// specific heat capacity, [kJ/kg K]\n", +"Q23 = m*cv*(T3-T2);// heat transferred, [kJ]\n", +"mprintf('\n (b) The heat transferred to the air is = %f kJ\n',Q23);\n", +"\n", +"// (c) \n", +"Q34 = m*cv*(T4-T1);// heat rejected by air, [kJ]\n", +"mprintf('\n (c) The heat rejected by the air is = %f kJ\n',Q34);\n", +"\n", +"// (d)\n", +"TE = 1-Q34/Q23;// ideal thermal efficiency\n", +"mprintf('\n (d) The ideal thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (e)\n", +"W = Q23-Q34;// work done ,[kJ]\n", +"mprintf('\n (e) The work done is = %f kJ\n',W);\n", +"\n", +"// (f)\n", +"Pm = W/(V1-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (f) The mean effefctive pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8: EX15_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.8');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure, volume and temperature at cycle state points\n", +"// (b) the thermal efficiency\n", +"// (c) the theoretical output\n", +"// (d) the mean effective pressure\n", +"// (e) the carnot efficiency\n", +"\n", +"// given values\n", +"rv = 9;// volume ratio\n", +"P1 = 101;// initial pressure , [kN/m^2]\n", +"V1 = .003;// initial volume, [m^3]\n", +"T1 = 273+18;// initial temperature, [K]\n", +"P3 = 4500;// maximum pressure, [kN/m^2]\n", +"N = 3000;\n", +"cp = 1.006;// specific heat capacity at constant pressure, [kJ/kg K]\n", +"cv = .716;// specific heat capacity at constant volume, [kJ/kg K]\n", +"\n", +"// solution\n", +"// taking reference Fig. 15.20\n", +"// (a)\n", +"// for process 1-2\n", +"Gama = cp/cv;// heat capacity ratio\n", +"R = cp-cv;// gas constant, [kJ/kg K]\n", +"V2 = V1/rv;// volume at stage2, [m^3] \n", +"// using PV^(Gama)=constant for process 1-2\n", +"P2 = P1*(V1/V2)^(Gama);// pressure at stage2,. [kN/m^2]\n", +"T2 = T1*(V1/V2)^(Gama-1);// [K]\n", +"\n", +"// for process 2-3\n", +"V3 = V2;// volume at stage 3, [m^3]\n", +"// since volume is constant in process 2-3 , so using P/T=constant, so\n", +"T3 = T2*(P3/P2);// temperature at stage 3, [K]\n", +"\n", +"// for process 3-4\n", +"V4 = V1;// volume at stage 4\n", +"// using PV^(Gama)=constant for process 3-4\n", +"P4 = P3*(V3/V4)^(Gama);// pressure at stage2,. [kN/m^2]\n", +"T4 = T3*(V3/V4)^(Gama-1);// temperature at stage 4,[K]\n", +"\n", +"mprintf('\n (a) P1 = %f kN/m^2, V1 = %f m^3, t1 = %f C,\n P2 = %f kN/m^2, V2 = %f m^3, t2 = %f C,\n P3 = %f kN/m^2, V3 = %f m^3, t3 = %f C,\n P4 = %f kN/m^2, V4 = %f m^3, t4 = %f C\n',P1,V1,T1-273,P2,V2,T2-273,P3,V3,T3-273,P4,V4,T4-273);\n", +"\n", +"// (b)\n", +"TE = 1-(T4-T1)/(T3-T2);// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (c)\n", +"m = P1*V1/(R*T1);// mass os gas, [kg] \n", +"W = m*cv*((T3-T2)-(T4-T1));// work done, [kJ]\n", +"Wt = W*N/60;// workdone per minute, [kW]\n", +"mprintf('\n (c) The theoretical output is = %f kW\n',Wt);\n", +"\n", +"// (d)\n", +"Pm = W/(V1-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (g) The mean effefctive pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// (e)\n", +"CE = (T3-T1)/T3;// carnot efficiency\n", +"mprintf('\n (e) The carnot efficiency is = %f percent\n',CE*100);\n", +"\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.9: EX15_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 15.9');\n", +"\n", +"// aim : To determine\n", +"// (a) the pressure and temperature at cycle process change points\n", +"// (b) the work done \n", +"// (c) the thermal efficiency\n", +"// (d) the work ratio\n", +"// (e) the mean effective pressure\n", +"// (f) the carnot efficiency\n", +"\n", +"\n", +"// given values\n", +"rv = 16;// volume ratio of compression\n", +"P1 = 90;// initial pressure , [kN/m^2]\n", +"T1 = 273+40;// initial temperature, [K]\n", +"T3 = 273+1400;// maximum temperature, [K]\n", +"cp = 1.004;// specific heat capacity at constant pressure, [kJ/kg K]\n", +"Gama = 1.4;// heat capacoty ratio\n", +"\n", +"// solution\n", +"cv = cp/Gama;// specific heat capacity at constant volume, [kJ/kg K]\n", +"R = cp-cv;// gas constant, [kJ/kg K]\n", +"// for one kg of gas\n", +"V1 = R*T1/P1;// initial volume, [m^3]\n", +"// taking reference Fig. 15.22\n", +"// (a)\n", +"// for process 1-2\n", +"// using PV^(Gama)=constant for process 1-2\n", +"// also rv = V1/V2\n", +"P2 = P1*(rv)^(Gama);// pressure at stage2,. [kN/m^2]\n", +"T2 = T1*(rv)^(Gama-1);// temperature at stage 2, [K]\n", +"\n", +"// for process 2-3\n", +"P3 = P2;// pressure at stage 3, [kN/m^2]\n", +"V2 = V1/rv;//[m^3]\n", +"// since pressure is constant in process 2-3 , so using V/T=constant, so\n", +"V3 = V2*(T3/T2);// volume at stage 3, [m^3]\n", +"\n", +"// for process 1-4\n", +"V4 = V1;// [m^3]\n", +"P4 = P3*(V3/V4)^(Gama)\n", +"// since in stage 1-4 volume is constant, so P/T=constant, \n", +"T4 = T1*(P4/P1);// temperature at stage 4,[K]\n", +"\n", +"mprintf('\n (a) P1 = %f kN/m^2, t1 = %f C,\n P2 = %f kN/m^2, t2 = %f C,\n P3 = %f kN/m^2, t3 = %f C,\n P4 = %f kN/m^2, t4 = %f C\n',P1,T1-273,P2,T2-273,P3,T3-273,P4,T4-273);\n", +"\n", +"// (b)\n", +"W = cp*(T3-T2)-cv*(T4-T1);// work done, [kJ]\n", +"mprintf('\n (b) The work done is = %f kJ\n',W);\n", +"\n", +"// (c) \n", +"TE = 1-(T4-T1)/((T3-T2)*Gama);// thermal efficiency\n", +"mprintf('\n (c) The thermal efficiency is = %f percent\n',TE*100);\n", +"\n", +"// (d)\n", +"PW = cp*(T3-T2)+R*(T3-T4)/(Gama-1);// positive work done\n", +"WR = W/PW;// work ratio\n", +"mprintf('\n (d) The work ratio is = %f\n',WR);\n", +"\n", +"// (e)\n", +"Pm = W/(V1-V2);// mean effective pressure, [kN/m^2]\n", +"mprintf('\n (e) The mean effefctive pressure is = %f kN/m^2\n',Pm);\n", +"\n", +"// (f)\n", +"CE = (T3-T1)/T3;// carnot efficiency\n", +"mprintf('\n (f) The carnot efficiency is = %f percent\n',CE*100);\n", +"\n", +"// value of t2 printed in the book is incorrect\n", +"\n", +"// End" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |