summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb')
-rw-r--r--Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb477
1 files changed, 477 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb
new file mode 100644
index 0000000..e6ce289
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics_by_R_Joel/16-Internal_combustion_engines.ipynb
@@ -0,0 +1,477 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Internal combustion engines"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1: power_output_thermal_efficiency_and_work_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 16.1');\n",
+"\n",
+"// aim : To determine \n",
+"// (a) the net power output of the turbine plant if the turbine is coupled to the compresser\n",
+"// (b) the thermal efficiency of the plant\n",
+"// (c) the work ratio\n",
+"\n",
+"// Given values\n",
+"P1 = 100;// inlet pressure of compressor, [kN/m^2]\n",
+"T1 = 273+18;// inlet temperature, [K]\n",
+"P2 = 8*P1;// outlet pressure of compressor, [kN/m^2]\n",
+"n_com = .85;// isentropic efficiency of compressor\n",
+"T3 = 273+1000;//inlet temperature of turbine, [K]\n",
+"P3 = P2;// inlet pressure of turbine, [kN/m^2]\n",
+"P4 = 100;// outlet pressure of turbine, [kN/m^2]\n",
+"n_tur = .88;// isentropic efficiency of turbine\n",
+"m_dot = 4.5;// air mass flow rate, [kg/s]\n",
+"cp = 1.006;// [kJ/kg K]\n",
+"Gamma = 1.4;// heat capacity ratio\n",
+"\n",
+"// (a)\n",
+"// For the compressor\n",
+"T2_prime = T1*(P2/P1)^((Gamma-1)/Gamma);// [K]\n",
+"T2 = T1+(T2_prime-T1)/n_com;// exit pressure of compressor, [K]\n",
+"\n",
+"// for turbine\n",
+"T4_prime = T3*(P4/P3)^((Gamma-1)/Gamma);// [K]\n",
+"T4 = T3-(T3-T4_prime)*n_tur;// exit temperature of turbine, [K]\n",
+"\n",
+"P_output = m_dot*cp*((T3-T4)-(T2-T1));// [kW]\n",
+"mprintf('\n (a) The net power output is = %f kW\n',P_output);\n",
+"\n",
+"// (b)\n",
+"n_the = ((T3-T4)-(T2-T1))/(T3-T2)*100;// thermal efficiency\n",
+"mprintf('\n (b) The thermal efficiency of the plant is = %f percent\n',n_the);\n",
+"\n",
+"// (c)\n",
+"P_pos = m_dot*cp*(T3-T4);// Positive cycle work, [kW]\n",
+"\n",
+"W_ratio = P_output/P_pos;// work ratio\n",
+"mprintf('\n (c) The work ratio is = %f\n',W_ratio)\n",
+"\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2: pressure_ratio_work_output_thermal_efficiency_work_ratio_and_Carnot_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 16.2');\n",
+"\n",
+"// aim : To determine\n",
+"// (a) the pressure ratiowhich will give the maximum net work output\n",
+"// (b) the maximum net specific work output\n",
+"// (c) the thermal efficiency at maximum work output\n",
+"// (d) the work ratio at maximum work output\n",
+"// (e) the carnot efficiency within the cycle temperature limits\n",
+"\n",
+"// Given values\n",
+"// taking the refrence as Fig.16.35\n",
+"T3 = 273+1080;// [K]\n",
+"T1 = 273+10;// [K]\n",
+"cp = 1.007;// [kJ/kg K]\n",
+"Gamma = 1.41;// heat capacity ratio\n",
+"\n",
+"// (a)\n",
+"r_pmax = (T3/T1)^((Gamma)/(Gamma-1));// maximum pressure ratio\n",
+"// for maximum net work output\n",
+"r_p = sqrt(r_pmax);\n",
+"mprintf('\n (a) The pressure ratio which give the maximum network output is = %f\n',r_p);\n",
+"\n",
+"// (b)\n",
+"T2 = T1*(r_p)^((Gamma-1)/Gamma);// [K]\n",
+"// From equation [23]\n",
+"T4 = T2;\n",
+"W_max = cp*((T3-T4)-(T2-T1));// Maximum net specific work output, [kJ/kg]\n",
+"\n",
+"mprintf('\n (b) The maximum net specific work output is = %f kJ/kg\n',W_max);\n",
+"\n",
+"// (c)\n",
+"W = cp*(T3-T2);\n",
+"n_the = W_max/W;// thermal efficiency\n",
+"mprintf('\n (c) The thermal efficiency at maximum work output is = %f percent\n ',n_the*100);\n",
+"\n",
+"// (d)\n",
+"// From the equation [26]\n",
+"W_ratio = n_the;// Work ratio\n",
+"mprintf('\n (d) The work ratio at maximum work output is = %f\n',W_ratio);\n",
+"\n",
+"// (e)\n",
+"n_carnot = (T3-T1)/T3*100;// carnot efficiency\n",
+"mprintf('\n (e) The carnot efficiency within the cycle temperature limits is = %f percent\n',n_carnot);\n",
+"\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3: power_output_temperature_thermal_efficiency_and_work_ratio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"disp('Example 16.3');\n",
+"\n",
+"// aim : To determine\n",
+"// (a) the net power output of the plant\n",
+"// (b) the exhaust temperature from the heat exchanger\n",
+"// (c) the thermal efficiency of the plant\n",
+"// (d) the thermal efficiency of the plant if there were no heat exchanger\n",
+"// (e) the work ratio\n",
+"\n",
+"// Given values\n",
+"T1 = 273+15;// temperature, [K]\n",
+"P1 = 101;// pressure, [kN/m^2]\n",
+"P2 = 6*P1; // [kN/m^2]\n",
+"eff = .65;// effectiveness of the heat exchanger, \n",
+"T3 = 273+870;// temperature, [K]\n",
+"P4 = 101;// [kN/m^2]\n",
+"n_com = .85;// efficiency of compressor, \n",
+"n_tur = .80;// efficiency of turbine\n",
+"m_dot = 4;// mass flow rate, [kg/s]\n",
+"Gama = 1.4;// heat capacity ratio\n",
+"cp = 1.005;// [kJ/kg K]\n",
+"\n",
+"// solution\n",
+"// (a)\n",
+"// For compressor\n",
+"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// [K]\n",
+"\n",
+"// using n_com = (T2_prim-T1)/(T2-T1)')\n",
+"\n",
+"T2 = T1+(T2_prim-T1)/n_com\n",
+"// For turbine\n",
+"P3 = P2;\n",
+"T4_prim = T3*(P4/P3)^((Gama-1)/Gama);// [K]\n",
+"\n",
+"T4=T3-n_tur*(T3-T4_prim); // [K]\n",
+"P_out = m_dot*cp*((T3-T4)-(T2-T1));// net power output, [kW]\n",
+"mprintf('\n (a) The net power output of the plant is = %f kW\n',P_out);\n",
+"\n",
+"// (b)\n",
+"mtd = T4-T2;// maximum temperature drop for heat transfer, [K]\n",
+"atd = eff*mtd;// actual temperature, [K]\n",
+"et = T4-atd;// Exhaust temperature from heat exchanger, [K]\n",
+"t6 = et-273;// [C]\n",
+"mprintf('\n (b) The exhaust temperature from the heat exchanger is = %f C\n',t6);\n",
+"\n",
+"// (c)\n",
+"T5 = T2+atd;// [K]\n",
+"n_the = ((T3-T4)-(T2-T1))/(T3-T5)*100;// thermal effficiency \n",
+"mprintf('\n (c) The thermal efficiency of the plant is = %f percent\n',n_the);\n",
+"\n",
+"// (d)\n",
+"// with no heat exchanger\n",
+"n_the = ((T3-T4)-(T2-T1))/(T3-T2)*100;// thermal efficiency without heat exchanger\n",
+"mprintf('\n (d) The thermal efficiency of the plant if there wereno heat exchanger is = %f percent\n',n_the);\n",
+"\n",
+"// (e)\n",
+"P_pos = m_dot*cp*(T3-T4);// positive cycle work;// [kW]\n",
+"w_rat = P_out/P_pos;// work ratio\n",
+"mprintf('\n (e) The work ratio is = %f\n',w_rat)\n",
+"\n",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4: EX16_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 16.4');\n",
+"\n",
+"// aim : To determine\n",
+"// (a) the pressure and temperature as the air leaves the compressor turbine\n",
+"// (b) the power output from the free power turbine\n",
+"// (c) the thermal efficiency of the plant\n",
+"// (d) the work ratio\n",
+"// (e) the carnot efficiency within the cycle temperature limits\n",
+"\n",
+"// Given values\n",
+"T1 = 273+19;// temperature, [K]\n",
+"P1 = 100;// pressure, [kN/m^2]\n",
+"P2 = 8*P1; // [kN/m^2]\n",
+"P3 = P2;// [kN/m^2]\n",
+"T3 = 273+980;// temperature, [K]\n",
+"n_com = .85;// efficiency of rotary compressor\n",
+"P5 = 100;// [kN/m^2]\n",
+"n_cum = .88;// isentropic efficiency of combustion chamber compressor, \n",
+"n_tur = .86;// isentropic efficiency of turbine\n",
+"m_dot = 7;// mass flow rate of air, [kg/s]\n",
+"Gama = 1.4;// heat capacity ratio\n",
+"cp = 1.006;// [kJ/kg K]\n",
+"\n",
+"// solution\n",
+"// (a)\n",
+"// For compressor\n",
+"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// [K]\n",
+"\n",
+"T2 = T1+(T2_prim-T1)/n_com;// temperature, [K]\n",
+"\n",
+"// for compressor turbine\n",
+"// T3-T4 = T2-T1,because compressor turbine power=compressor power so\n",
+"T4 = T3-(T2-T1);//turbine exit temperature, [K]\n",
+"T4_prim = T3-(T3-T4)/n_cum;// [K]\n",
+"\n",
+"// For turbine\n",
+"// T4_prim = T3*(P4/P3)^((Gama-1)/Gama)\n",
+"P4 = P3*(T4_prim/T3)^(Gama/(Gama-1));// exit air pressure of air, [kN/m^2]\n",
+"\n",
+"mprintf('\n (a) The temperature as the air leaves the compressor turbine is = %f C\n',T4-273);\n",
+"mprintf('\n The pressure as the air leaves the compressor turbine is = %f kN/m^2\n',P4);\n",
+"\n",
+"// (b)\n",
+"T5_prim = T4*(P5/P4)^((Gama-1)/Gama);// [K]\n",
+"\n",
+"\n",
+"T5 = T4-n_tur*(T4-T5_prim);// temperature, [K]\n",
+"\n",
+"PO = m_dot*cp*(T4-T5);// power output\n",
+"mprintf('\n (b) The power output from the free power turbine is = %f kW\n',PO);\n",
+"\n",
+"// (c)\n",
+"\n",
+"n_the = (T4-T5)/(T3-T2)*100;// thermal effficiency \n",
+"mprintf('\n (c) The thermal efficiency of the plant is = %f percent\n',n_the);\n",
+"\n",
+"// (d)\n",
+"\n",
+"WR = (T4-T5)/(T3-T5);// work ratio\n",
+"mprintf('\n (d) The work ratio is = %f\n',WR);\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",
+"// End"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.5: pressure_temperature_and_power_developed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"disp('Example 16.5');\n",
+"\n",
+"// aim : To determine\n",
+"// (a) the pressure and temperature of the air compression \n",
+"// (b) the power developed by the gas turbine\n",
+"// (c) the temperature and pressure of the airentering the exhaust jet as it leaves the gas turbine \n",
+"\n",
+"// Given values\n",
+"T1 = 273-22.4;// temperature, [K]\n",
+"P1 = 470;// pressure, [bar]\n",
+"P2 = 30*P1; // [kN/m^2]\n",
+"P3 = P2;// [kN/m^2]\n",
+"T3 = 273+960;// temperature, [K]\n",
+"r = 1.25;// ratio of turbine power to compressor power\n",
+"n_tur = .86;// isentropic efficiency of turbine\n",
+"m_dot = 80;// mass flow rate of air, [kg/s]\n",
+"Gama = 1.41;// heat capacity ratio\n",
+"cp = 1.05;// [kJ/kg K]\n",
+"\n",
+"// solution\n",
+"// (a)\n",
+"// For compressor\n",
+"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// [K]\n",
+"// using n_tur=(T2_prim-T1)/(T2-T1)\n",
+"T2 = T1+(T2_prim-T1)/n_tur;// temperature, [K]\n",
+"\n",
+"mprintf('\n (a) The pressure of the air after compression is = %f bar\n',P2);\n",
+"\n",
+"mprintf('\n The temperature of the air after compression is = %f C\n',T2-273);\n",
+"\n",
+"// (b)\n",
+"Td = r*(T2-T1);// temperature drop in turbine, [K]\n",
+"PO = m_dot*cp*Td;// power output, [kW]\n",
+"mprintf('\n (b) The power developed by the gas turbine is = %f MW\n',PO*10^-3);\n",
+"\n",
+"// (c)\n",
+"t3 = T3-273;// [C]\n",
+"t4 = t3-Td;// temeprerature of air leaving turbine,[K]\n",
+"Tdi = Td/n_tur;// isentropic temperature drop, [K]\n",
+"T4_prim = t3-Tdi+273;// temperature, [K]\n",
+"// using T4_prim=T3*(P4/P3)^((Gama-1)/Gama)\n",
+"P4 = P3*(T4_prim/T3)^(Gama/(Gama-1));// exit air pressure of air, [kN/m^2]\n",
+"\n",
+"mprintf('\n (c) The air pressure as it leaves the gas turbine is = %f bar\n',P4);\n",
+"\n",
+"// Result in the book is not matching because they have taken pressure in mbar but in in question it is given in bar \n",
+"\n",
+"// End\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.6: mass_theoretical_output_and_thermal_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"disp('Example 16.6');\n",
+"\n",
+"// aim : To determine\n",
+"// (a) the mass of fuel oil used by the gas turbine\n",
+"// (b) the mass flow of steam from the boiler \n",
+"// (c) the theoretical output from the steam turbine\n",
+"// (d) the overall theoretical thermal efficiency of the plant\n",
+"\n",
+"// given values\n",
+"Po = 150;// generating plant output, [MW]\n",
+"n_the1 = .35;// thermal efficiency\n",
+"CV = 43;// calorific value of fuel, [MJ]\n",
+"me = 400;// flow rate of exhaust gas, [kg/s]\n",
+"T = 90;// boiler exit temperature, [C]\n",
+"T1 = 550;// exhaust gas temperature, [C]\n",
+"P2 = 10;// steam generation pressure, [MN/m^2]\n",
+"T2 = 450;// boiler exit temperature, [C]\n",
+"Tf = 140;// feed water temperature, [C]\n",
+"n_tur = .86;// turbine efficiency\n",
+"P3 = .5;// exhaust temperature, [MN/m^2]\n",
+"n_boi = .92;// boiler thermal efficiency\n",
+"cp = 1.1;// heat capacity, [kJ/kg]\n",
+"\n",
+"\n",
+"// solution\n",
+"// (a)\n",
+"ER = Po*3600/n_the1;// energy requirement from the fuel, [MJ/h]\n",
+"mf = ER/CV*10^-3;// fuel required, [tonne/h]\n",
+"mprintf('\n (a) The mass of fuel oil used by the gas is = %f tonne/h\n',mf);\n",
+"\n",
+"// (b) \n",
+"\n",
+"ET = me*cp*(T1-T)*3600*n_boi;// energy transferred to steam,[kJ/h]\n",
+"// from steam table\n",
+"h1 = 3244;// specific enthalpy, [kJ/kg]\n",
+"hf = 588.5;// specific enthalpy, [kJ/kg]\n",
+"ERR = h1-hf;// energy required to raise steam, [kJ/kg]\n",
+"ms = ET/ERR*10^-3;// mass flow of steam, [tonne/h]\n",
+"mprintf('\n (b) The mass flow rate of steam from the boiler is = %f tonne/h\n',ms);\n",
+"\n",
+"// again from steam table\n",
+"s1 = 6.424;// specific entropy, [kJ/kg K]\n",
+"sf2 = 1.86;// specific entropy, [kJ/kg K\n",
+"sg2 = 6.819;// specific entropy, [kJ/kg K]\n",
+"\n",
+"hf2 = 640.1;// specific enthalpy,[kJ/kg]\n",
+"hg2 = 2747.5;// specific enthalpy, [kJ/kg]\n",
+"// for ths process s1=s2=sf2+x2*(sg2-sf2)\n",
+"s2 = s1;\n",
+"// hence\n",
+"x2 = (s2-sf2)/(sg2-sf2);// dryness fraction\n",
+"\n",
+"h2_prim = hf2+x2*(hg2-hf2);// specific enthalpy of steam, [kJ/kg]\n",
+"\n",
+"TO = n_tur*(h1-h2_prim);//theoretical steam turbine output, [kJ/kg]\n",
+"TOt = TO*ms/3600;// total theoretical steam turbine output, [MW]\n",
+"\n",
+"mprintf('\n (c) The theoretical output from the steam turbine is = %f MW\n',TOt);\n",
+"\n",
+"// (d)\n",
+"n_tho = (Po+TOt)*n_the1/Po;// overall theoretical thermal efficiency\n",
+"mprintf('\n (d) The overall thermal efficiency is = %f percent\n',n_tho*100);\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
+}