diff options
Diffstat (limited to 'Basic_Engineering_Thermodynamics_by_R_Joel')
17 files changed, 10423 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb new file mode 100644 index 0000000..2b7f6cd --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/1-General_Introduction.ipynb @@ -0,0 +1,489 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: General Introduction" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.10');\n", +"// Given values\n", +"m_dot = 3.045; // use of coal, [tonne/h]\n", +"c = 28; // calorific value of the coal, [MJ/kg]\n", +"P_out = 4.1; // output of turbine, [MW]\n", +"// solution\n", +"m_dot = m_dot*10^3/3600; // [kg/s]\n", +"P_in = m_dot*c; // power input by coal, [MW]\n", +"n = P_out/P_in; // thermal efficiency formula\n", +"mprintf('\n Thermal efficiency of the plant is = %f \n',n);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Power_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.11');\n", +"// Given values\n", +"v = 50; // speed, [km/h]\n", +"F = 900; // Resistance to the motion of a car\n", +"// solution\n", +"v = v*10^3/3600; // [m/s]\n", +" Power = F*v; // Power formula, [W]\n", +"mprintf('\n The power output of the engine is = %f kW\n',Power*10^-3);\n", +" \n", +" // End\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Power_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.12');\n", +"// Given values\n", +"V = 230; // volatage, [volts]\n", +"I = 60; // current, [amps]\n", +"n_gen = .95; // efficiency of generator\n", +"n_eng = .92; // efficiency of engine\n", +"// solution\n", +"P_gen = V*I; // Power delivered by generator, [W]\n", +"P_gen=P_gen*10^-3; // [kW]\n", +"P_in_eng=P_gen/n_gen;//Power input from engine,[kW]\n", +"P_out_eng=P_in_eng/n_eng;//Power output from engine,[kW]\n", +"mprintf('\n The power output from the engine is = %f kW\n',P_out_eng);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: Current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.13');\n", +"// Given values\n", +"V = 230; // Voltage, [volts]\n", +"W = 4; // Power of heater, [kW]\n", +"// solution\n", +"// using equation P=VI\n", +"I = W/V; // current, [K amps]\n", +"mprintf('\n The current taken by heater is = %f amps \n',I*10^3);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Mass_of_coal_burnt.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.14');\n", +"// Given values\n", +"P_out = 500; // output of power station, [MW]\n", +"c = 29.5; // calorific value of coal, [MJ/kg]\n", +"r=.28; \n", +"// solution\n", +"// since P represents only 28 percent of energy available from coal\n", +"P_coal = P_out/r; // [MW]\n", +" \n", +"m_coal = P_coal/c; // Mass of coal used, [kg/s]\n", +"m_coal = m_coal*3600; // [kg/h]\n", +"//After one hour\n", +"m_coal = m_coal*1*10^-3; // [tonne]\n", +"mprintf('\n Mass of coal burnt by the power station in 1 hour is = %f tonne \n',m_coal);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear ;\n", +"clc;\n", +"disp('Example 1.1');\n", +"// Given values\n", +"P = 700; //pressure,[kN/m^2]\n", +"V1 = .28; //initial volume,[m^3]\n", +"V2 = 1.68; //final volume,[m^3]\n", +"//solution\n", +"W = P*(V2-V1);// // Formula for work done at constant pressure is, [kJ]\n", +"mprintf('\n The Work done is = %f MJ\n',W*10^-3);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Volume_of_the_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.2');\n", +"//Given values\n", +"P1 = 138; // initial pressure,[kN/m^2]\n", +"V1 = .112; //initial volume,[m^3]\n", +"P2 = 690; // final pressure,[kN/m^2]\n", +"Gama=1.4; // heat capacity ratio\n", +"// solution\n", +"// since gas is following, PV^1.4=constant,hence\n", +"V2 =V1*(P1/P2)^(1/Gama); // final volume, [m^3] \n", +"mprintf('\n The new volume of the gas is = %f m^3\n',V2)\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.3');\n", +"// Given values\n", +"P1 = 2070; // initial pressure, [kN/m^2]\n", +"V1 = .014; // initial volume, [m^3]\n", +"P2 = 207; // final pressure, [kN/m^2]\n", +"n=1.35; // polytropic index\n", +"// solution\n", +"// since gas is following PV^n=constant\n", +"// hence \n", +"V2 = V1*(P1/P2)^(1/n); // final volume, [m^3]\n", +"// calculation of workdone\n", +"W=(P1*V1-P2*V2)/(1.35-1); // using work done formula for polytropic process, [kJ]\n", +"mprintf('\n The Work done by gas during expansion is = %f kJ\n',W);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Final_Pressure_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.4');\n", +"// Given values\n", +"P1 = 100; // initial pressure, [kN/m^2]\n", +"V1 = .056; // initial volume, [m^3]\n", +"V2 = .007; // final volume, [m^3]\n", +"// To know P2\n", +"// since process is hyperbolic so, PV=constant\n", +"// hence\n", +"P2 = P1*V1/V2; // final pressure, [kN/m^2]\n", +"mprintf('\n The final pressure is = %f kN/m^2\n',P2);\n", +"// calculation of workdone\n", +"W = P1*V1*log(V2/V1); // formula for work done in this process, [kJ]\n", +"mprintf('\n Work done on the gas is = %f kJ\n',W);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.5');\n", +"// Given values\n", +"m = 5; // mass, [kg]\n", +"t1 = 15; // inital temperature, [C]\n", +"t2 = 100; // final temperature, [C]\n", +"c = 450; // specific heat capacity, [J/kg K]\n", +"// solution\n", +"// using heat transfer equation,[1]\n", +"Q = m*c*(t2-t1); // [J]\n", +"mprintf('\n The heat required is = %f kJ\n',Q*10^-3);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.6');\n", +"// Given values\n", +"m_cop = 2; // mass of copper vessel, [kg]\n", +"m_wat = 6; // mass of water, [kg]\n", +"c_wat = 4.19; // specific heat capacity of water, [kJ/kg K]\n", +"t1 = 20; // initial temperature, [C]\n", +"t2 = 90; // final temperature, [C]\n", +"// From the table of average specific heat capacities\n", +"c_cop = .390; // specific heat capacity of copper,[kJ/kg k]\n", +"// solution\n", +"Q_cop = m_cop*c_cop*(t2-t1); // heat required by copper vessel, [kJ]\n", +"Q_wat = m_wat*c_wat*(t2-t1); // heat required by water, [kJ]\n", +"// since there is no heat loss,so total heat transfer is sum of both\n", +"Q_total = Q_cop+Q_wat ; // [kJ]\n", +"mprintf(' \n Required heat transfer to accomplish the change = %f kJ\n',Q_total);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.7');\n", +"// Given values\n", +"m = 10; // mass of iron casting, [kg]\n", +"t1 = 200; // initial temperature, [C]\n", +"Q = -715.5; // [kJ], since heat is lost in this process\n", +"// From the table of average specific heat capacities\n", +"c = .50; // specific heat capacity of casting iron, [kJ/kg K]\n", +"// solution\n", +"// using heat equation\n", +"// Q = m*c*(t2-t1)\n", +"t2 = t1+Q/(m*c); // [C]\n", +"mprintf('\n The final temperature is t2 = %f C\n',t2);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Specific_heat_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.8');\n", +" \n", +"// Given values\n", +"m = 4; // mass of the liquid, [kg]\n", +"t1 = 15; // initial temperature, [C]\n", +"t2 = 100; // final temperature, [C]\n", +"Q = 714; // [kJ],required heat to accomplish this change\n", +"// solution\n", +"// using heat equation\n", +"// Q=m*c*(t2-t1)\n", +"// calculation of c\n", +"c=Q/(m*(t2-t1)); // heat capacity, [kJ/kg K] \n", +"mprintf('\n The specific heat capacity of the liquid is c = %f kJ/kg K\n',c);\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Power_output_and_energy_rejected.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 1.9');\n", +"// Given values\n", +"m_dot = 20.4; // mass flowrate of petrol, [kg/h]\n", +"c = 43; // calorific value of petrol, [MJ/kg]\n", +"n = .2; // Thermal efficiency of engine\n", +"// solution\n", +"m_dot = 20.4/3600; // [kg/s]\n", +"c = 43*10^6; // [J/kg]\n", +"// power output\n", +"P_out = n*m_dot*c; // [W]\n", +"mprintf('\n The power output of the engine is = %f kJ\n',P_out*10^-3);\n", +" \n", +"// power rejected\n", +"P_rej = m_dot*c*(1-n); // [W]\n", +"P_rej = P_rej*60*10^-6; // [MJ/min]\n", +"mprintf('\n The energy rejected by the engine is = %f MJ/min \n',P_rej);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/10-Steam_plant.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/10-Steam_plant.ipynb new file mode 100644 index 0000000..b888739 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/10-Steam_plant.ipynb @@ -0,0 +1,695 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Steam plant" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: mass_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.10');\n", +"\n", +"// aim : To determine\n", +"// (a) the mass of steam bled to each feed heater in kg/kg of supply steam\n", +"// (b) the thermal efficiency of the arrangement\n", +"\n", +"// given values\n", +"P1 = 7;// steam initial pressure, [MN/m^2]\n", +"T1 = 273+500;// steam initil temperature, [K]\n", +"P2 = 2;// pressure at stage 1, [MN/m^2]\n", +"P3 = .5;// pressure at stage 2, [MN/m^2]\n", +"P4 = .05;// condenser pressure,[MN/m^2]\n", +"SE = .82;// stage efficiency of turbine\n", +"\n", +"// solution\n", +"// from the enthalpy-entropy chart(Fig10.23) values of specific enthalpies are\n", +"h1 = 3410;// [kJ/kg]\n", +"h2_prim = 3045;// [kJ/kg]\n", +"// h1-h2=SE*(h1-h2_prim), so\n", +"h2 = h1-SE*(h1-h2_prim);// [kJ/kg]\n", +"\n", +"h3_prim = 2790;// [kJ/kg]\n", +"// h2-h3=SE*(h2-h3_prim), so\n", +"h3 = h2-SE*(h2-h3_prim);// [kJ/kg]\n", +"\n", +"h4_prim = 2450;// [kJ/kg]\n", +"// h3-h4 = SE*(h3-h4_prim), so\n", +"h4 = h3-SE*(h3-h4_prim);// [kJ/kg]\n", +"\n", +"// from steam table\n", +"// @ 2 MN/m^2\n", +"hf2 = 908.6;// [kJ/kg]\n", +"// @ .5 MN/m^2\n", +"hf3 = 640.1;// [kJ/kg] \n", +"// @ .05 MN/m^2\n", +"hf4 = 340.6;// [kJ/kg]\n", +"\n", +"// (a) \n", +"// for feed heater1\n", +"m1 = (hf2-hf3)/(h2-hf3);// mass of bled steam, [kg/kg supplied steam]\n", +"// for feed heater2\n", +"m2 = (1-m1)*(hf3-hf4)/(h3-hf4);// \n", +"mprintf('\n (a) The mass of steam bled in feed heater 1 is = %f kg/kg supply steam\n',m1);\n", +"mprintf('\n The mass of steam bled in feed heater 2 is = %f kg/kg supply steam\n',m2);\n", +"\n", +"// (b)\n", +"W = (h1-h2)+(1-m1)*(h2-h3)+(1-m1-m2)*(h3-h4);// theoretical work done, [kJ/kg]\n", +"Eb = h1-hf2;// energy input in the boiler, [kJ/kg]\n", +"TE1 = W/Eb;// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency of the arrangement is = %f percent\n',TE1*100);\n", +"\n", +"// If there is no feed heating\n", +"hf5 = hf4;\n", +"h5_prim = 2370;// [kJ/kg]\n", +"// h1-h5 = SE*(h1-h5_prim), so\n", +"h5 = h1-SE*(h1-h5_prim);// [kJ/kg]\n", +"Ei = h1-hf5;//energy input, [kJ/kg]\n", +"W = h1-h5;// theoretical work, [kJ/kg]\n", +"TE2 = W/Ei;// thermal efficiency\n", +"mprintf('\n The thermal efficiency if there is no feed heating is = %f percent\n',TE2*100);\n", +"\n", +"// End " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: equivalent_evaporation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.1');\n", +"\n", +"// aim : To determine\n", +"// the equivalent evaporation\n", +"\n", +"// Given\n", +"P = 1.4;// [MN/m^2]\n", +"m = 8;// mass of water,[kg]\n", +"T1 = 39;// entering temperature,[C]\n", +"T2 = 100;// [C]\n", +"x = .95;//dryness fraction \n", +"\n", +"// solution\n", +"hf = 830.1;// [kJ/kg]\n", +"hfg = 1957.7;// [kJ/kg]\n", +"// steam is wet so specific enthalpy of steam is\n", +"h = hf+x*hfg;// [kJ/kg]\n", +"\n", +"// at 39 C\n", +"h1 = 163.4;// [kJ/kg]\n", +"// hence\n", +"q = h-h1;// [kJ/kg]\n", +"Q = m*q;// [kJ]\n", +"\n", +"evap = Q/2256.9;// equivalent evaporation[kg steam/(kg coal)]\n", +"\n", +"mprintf('\n The equivalent evaporation, from and at 100 C is = %f kg steam/kg coal\n ',evap);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: mass_fraction_of_enthalpy_drop_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.2');\n", +"\n", +"// aim : To determine \n", +"// the mass of oil used per hour and the fraction of enthalpy drop through the turbine\n", +"// heat transfer available per kilogram of exhaust steam\n", +"\n", +"// Given values\n", +"ms_dot = 5000;// generation of steam, [kg/h]\n", +"P1 = 1.8;// generated steam pressure, [MN/m^2]\n", +"T1 = 273+325;// generated steam temperature, [K]\n", +"Tf = 273+49.4;// feed temperature, [K]\n", +"neta = .8;// efficiency of boiler plant \n", +"c = 45500;// calorific value, [kJ/kg]\n", +"P = 500;// turbine generated power, [kW]\n", +"Pt = .18;// turbine exhaust pressure, [MN/m^2]\n", +"x = .98;// dryness farction of steam\n", +"\n", +"// solution\n", +"// using steam table at 1.8 MN/m^2\n", +"hf1 = 3106;// [kJ/kg]\n", +"hg1 = 3080;// [kJ/kg]\n", +"// so\n", +"h1 = hf1-neta*(hf1-hg1);// [kJ/kg]\n", +"// again using steam table specific enthalpy of feed water is\n", +"hwf = 206.9;// [kJ/kg]\n", +"h_rais = ms_dot*(h1-hwf);// energy to raise steam, [kJ]\n", +"\n", +"h_fue = h_rais/neta;// energy from fuel per hour, [kJ]\n", +"m_oil = h_fue/c;// mass of fuel per hour, [kg]\n", +"\n", +"// from steam table at exhaust\n", +"hf = 490.7;// [kJ/kg]\n", +"hfg = 2210.8;// [kJ/kg]\n", +"// hence\n", +"h = hf+x*hfg;// [kJ/kg]\n", +"// now\n", +"h_drop = (h1-h)*ms_dot/3600;// specific enthalpy drop in turbine [kJ]\n", +"f = P/h_drop;// fraction ofenthalpy drop converted into work\n", +"// heat transfer available in exhaust is\n", +"Q = h-hwf;// [kJ/kg]\n", +"mprintf('\n The mass of oil used per hour is = %f kg\n',m_oil);\n", +"mprintf('\n The fraction of the enthalpy drop through the turbine that is converted into useful work is = %f\n',f);\n", +"mprintf('\n The heat transfer available in exhaust steam above 49.4 C is = %f kJ/kg\n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: efficiency_equivalent_evaporation_and_coal_consumption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the thermal efficiency of the boiler\n", +"// (b) the equivalent evaporation of the boiler\n", +"// (c) the new coal consumption \n", +"\n", +"// given values\n", +"ms_dot = 5400;// steam feed rate, [kg/h]\n", +"P = 750;// steam pressure, [kN/m^2]\n", +"x = .98;// steam dryness fraction\n", +"Tf1 = 41.5;// feed water temperature, [C]\n", +"CV = 31000;// calorific value of coal used in the boiler, [kJ/kg]\n", +"mc1 = 670;// rate of burning of coal/h, [kg]\n", +"Tf2 = 100;// increased water temperature, [C]\n", +"\n", +"// solution\n", +"// (a)\n", +"SRC = ms_dot/mc1;// steam raised/kg coal, [kg]\n", +"hf = 709.3;// [kJ/kg]\n", +"hfg = 2055.5;// [kJ/kg]\n", +"h1 = hf+x*hfg;// specific enthalpy of steam raised, [kJ/kg]\n", +"// from steam table \n", +"hfw = 173.9;// specific enthalpy of feed water, [kJ/kg]\n", +"EOB = SRC*(h1-hfw)/CV;// efficiency of boiler\n", +"mprintf('\n (a) The thermal efficiency of the boiler is = %f percent\n',EOB*100);\n", +"\n", +"// (b)\n", +"he = 2256.9;// specific enthalpy of evaporation, [kJ/kg]\n", +"Ee = SRC*(h1-hfw)/he;// equivalent evaporation[kg/kg coal]\n", +"mprintf('\n (b) The equivalent evaporation of boiler is = %f kg/kg coal\n',Ee);\n", +"\n", +"// (c)\n", +"hw = 419.1;// specific enthalpy of feed water at 100 C, [kJ/kg]\n", +"Eos = ms_dot*(h1-hw);// energy of steam under new condition, [kJ/h]\n", +"neb = EOB+.05;// given condition new efficiency of boiler if 5%more than previous\n", +"Ec = Eos/neb;// energy from coal, [kJ/h]\n", +"mc2 = Ec/CV;// mass of coal used per hour in new condition, [kg]\n", +"mprintf('\n (c) Mass of coal used in new condition is = %f kg\n',mc2);\n", +"mprintf('\n The saving in coal per hour is = %f kg\n',mc1-mc2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: heat_transfer_and_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.4');\n", +"\n", +"// aim : To determine the\n", +"// (a) Heat transfer in the boiler\n", +"// (b) Heat transfer in the superheater\n", +"// (c) Gas used\n", +"\n", +"// given values\n", +"P = 100;// boiler operating pressure, [bar]\n", +"Tf = 256;// feed water temperature, [C]\n", +"x = .9;// steam dryness fraction.\n", +"Th = 450;// superheater exit temperature, [C]\n", +"m = 1200;// steam generation/h, [tonne]\n", +"TE = .92;// thermal efficiency\n", +"CV = 38;// calorific value of fuel, [MJ/m^3]\n", +"\n", +"// solution\n", +"// (a)\n", +"// from steam table\n", +"hw = 1115.4;// specific enthalpy of feed water, [kJ/kg]\n", +"// for wet steam\n", +"hf = 1408;// specific enthalpy, [kJ/kg]\n", +"hg = 2727.7;// specific enthalpy, [kJ/kg]\n", +"// so\n", +"h = hf+x*(hg-hf);// total specific enthalpy of wet steam, [kJ/kg]\n", +"// hence\n", +"Qb = m*(h-hw);// heat transfer/h for wet steam, [MJ]\n", +"mprintf('\n (a) The heat transfer/h in producing wet steam in the boiler is = %f MJ\n',Qb);\n", +"\n", +"// (b)\n", +"// again from steam table\n", +"// specific enthalpy of superheated stem at given condition is,\n", +"hs = 3244;// [kJ/kg]\n", +"\n", +"Qs = m*(hs-h);// heat transfer/h in superheater, [MJ]\n", +"mprintf('\n (b) The heat transfer/h in superheater is = %f MJ\n',Qs);\n", +"\n", +"// (c)\n", +"V = (Qb+Qs)/(TE*CV);// volume of gs used/h, [m^3]\n", +"mprintf('\n (c) The volume of gas used/h is = %f m^3\n',V);\n", +"\n", +"// There is calculation mistake in the book so our answer is not matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.5');\n", +"\n", +"//aim : To determine \n", +"// the flow rate of cooling water\n", +"\n", +"//Given values\n", +"P=24;//pressure, [kN/m^2]\n", +"ms_dot=1.8;//steam condense rate,[tonne/h]\n", +"x=.98;//dryness fraction\n", +"T1=21;//entrance temperature of cooling water,[C]\n", +"T2=57;//outlet temperature of cooling water,[C]\n", +"\n", +"//solution\n", +"//at 24 kN/m^2, for steam\n", +"hfg=2616.8;//[kJ/kg]\n", +"hf1=268.2;//[kJ/kg]\n", +"//hence\n", +"h1=hf1+x*(hfg-hf1);//[kJ/kg]\n", +"\n", +"//for cooling water\n", +"hf3=238.6;//[kJ/kg]\n", +"hf2=88.1;//[kJ/kg]\n", +"\n", +"//using equation [3]\n", +"//ms_dot*(hf3-hf2)=mw_dot*(h1-hf1),so\n", +"mw_dot=ms_dot*(h1-hf1)/(hf3-hf2);//[tonne/h]\n", +"disp('tonne/h',mw_dot,'The flow rate of the cooling water is =')\n", +"\n", +"//End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: energy_supplied_dryness_fraction_and_Rankine_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.6');\n", +"\n", +"// aim : To determine\n", +"// (a) the energy supplied in the boiler\n", +"// (b) the dryness fraction of the steam entering the condenser\n", +"// (c) the rankine efficiency\n", +"\n", +"// given values\n", +"P1 = 3.5;// steam entering pressure, [MN/m^2]\n", +"T1 = 273+350;// entering temperature, [K]\n", +"P2 = 10;//steam exhaust pressure, [kN/m^2]\n", +"\n", +"// solution\n", +"// (a)\n", +"// from steam table, at P1 is,\n", +"hf1 = 3139;// [kJ/kg]\n", +"hg1 = 3095;// [kJ/kg]\n", +"h1 = hf1-1.5/2*(hf1-hg1);\n", +"// at Point 3\n", +"h3 = 191.8;// [kJ/kg]\n", +"Es = h1-h3;// energy supplied, [kJ/kg]\n", +"mprintf('\n (a) The energy supplied in boiler/kg steam is = %f kJ/kg\n',Es);\n", +"\n", +"// (b)\n", +"// at P1\n", +"sf1 = 6.960;// [kJ/kg K]\n", +"sg1 = 6.587;// [kJ/kg K]\n", +"s1 = sf1-1.5/2*(sf1-sg1);// [kJ/kg K]\n", +"// at P2\n", +"sf2 = .649;// [kJ/kg K] \n", +" sg2 = 8.151;// [kJ/kg K]\n", +" // s2=sf2+x2(sg2-sf2)\n", +" // theoretically expansion through turbine is isentropic so s1=s2\n", +" // hence\n", +" s2 = s1;\n", +" x2 = (s2-sf2)/(sg2-sf2);// dryness fraction\n", +" mprintf('\n (b) The dryness fraction of steam entering the condenser is = %f \n',x2);\n", +" \n", +" // (c)\n", +" // at point 2\n", +" hf2 = 191.8;// [kJ/kg]\n", +" hfg2 = 2392.9;// [kJ/kg]\n", +" h2 = hf2+x2*hfg2;// [kJ/kg]\n", +" Re = (h1-h2)/(h1-h3);// rankine efficiency\n", +" mprintf('\n (c) The Rankine efficiency is = %f percent\n',Re*100);\n", +" \n", +" // End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: Rankine_efficiency_and_specific_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.7');\n", +"\n", +"// aim : To determine\n", +"// the specific work done and compare this with that obtained when determining the rankine effficiency\n", +"\n", +"// given values\n", +"P1 = 1000;// steam entering pressure, [kN/m^2]\n", +"x1 = .97;// steam entering dryness fraction\n", +"P2 = 15;//steam exhaust pressure, [kN/m^2]\n", +"n = 1.135;// polytropic index\n", +"\n", +"// solution\n", +"// (a)\n", +"// from steam table, at P1 is\n", +"hf1 = 762.6;// [kJ/kg]\n", +"hfg1 = 2013.6;// [kJ/kg]\n", +"h1 = hf1+hfg1; // [kJ/kg]\n", +"\n", +"sf1 = 2.138;// [kJ/kg K]\n", +"sg1 = 6.583;// [kJ/kg K]\n", +"s1 = sf1+x1*(sg1-sf1);// [kJ/kg K]\n", +"\n", +"// at P2\n", +"sf2 = .755;// [kJ/kg K] \n", +" sg2 = 8.009;// [kJ/kg K]\n", +"// s2 = sf2+x2(sg2-sf2)\n", +"// since expansion through turbine is isentropic so s1=s2\n", +" // hence\n", +" s2 = s1;\n", +" x2 = (s2-sf2)/(sg2-sf2);// dryness fraction\n", +" \n", +" // at point 2\n", +" hf2 = 226.0;// [kJ/kg]\n", +" hfg2 = 2373.2;// [kJ/kg]\n", +" h2 = hf2+x2*hfg2;// [kJ/kg]\n", +" \n", +"// at Point 3\n", +"h3 = 226.0;// [kJ/kg]\n", +"\n", +"// (a)\n", +" Re = (h1-h2)/(h1-h3);// rankine efficiency\n", +" mprintf('\n (a) The Rankine efficiency is = %f percent\n',Re*100);\n", +" \n", +"// (b)\n", +"vg1 = .1943;// specific volume at P1, [m^3/kg]\n", +"vg2 = 10.02;// specific volume at P2, [m^3/kg]\n", +"V1 = x1*vg1;// [m^3/kg]\n", +"V2 = x2*vg2;// [m^3/kg]\n", +"\n", +"W1 = n/(n-1)*(P1*V1-P2*V2);// specific work done, [kJ/kg]\n", +"\n", +"// from rankine cycle\n", +"W2 = h1-h2;// [kJ/kg]\n", +"mprintf('\n (b) The specific work done is = %f kJ/kg\n',W1);\n", +"mprintf('\n The specific work done (from rankine) is = %f kJ/kg\n',W2);\n", +"\n", +"// there is calculation mistake in the book so our answer is not matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: Rankine_efficiency_steam_consumption_and_Carnot_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.8');\n", +"\n", +"// aim : To determine\n", +"// (a) the rankine fficiency\n", +"// (b) the specific steam consumption\n", +"// (c) the carnot efficiency of the cycle\n", +"\n", +"// given values\n", +"P1 = 1100;// steam entering pressure, [kN/m^2]\n", +"T1 = 273+250;// steam entering temperature, [K]\n", +"P2 = 280;// pressure at point 2, [kN/m^2]\n", +"P3 = 35;// pressure at point 3, [kN/m^2]\n", +"\n", +"// solution\n", +"// (a)\n", +"// from steam table, at P1 and T1 is\n", +"hf1 = 2943;// [kJ/kg]\n", +"hg1 = 2902;// [kJ/kg]\n", +"h1 = hf1-.1*(hf1-hg1); // [kJ/kg]\n", +"\n", +"sf1 = 6.926;// [kJ/kg K]\n", +"sg1 = 6.545;// [kJ/kg K]\n", +"s1 = sf1-.1*(sf1-sg1);// [kJ/kg K]\n", +"\n", +"// at P2\n", +"sf2 = 1.647;// [kJ/kg K] \n", +" sg2 = 7.014;// [kJ/kg K]\n", +"// s2=sf2+x2(sg2-sf2)\n", +"// since expansion through turbine is isentropic so s1=s2\n", +" // hence\n", +" s2 = s1;\n", +" x2 = (s2-sf2)/(sg2-sf2);// dryness fraction\n", +" \n", +" // at point 2\n", +" hf2 = 551.4;// [kJ/kg]\n", +" hfg2 = 2170.1;// [kJ/kg]\n", +" h2 = hf2+x2*hfg2;// [kJ/kg]\n", +" vg2 = .646;// [m^3/kg]\n", +" v2 = x2*vg2;// [m^3/kg]\n", +" \n", +" // by Fig10.20.\n", +" A6125 = h1-h2;// area of 6125, [kJ/kg]\n", +" A5234 = v2*(P2-P3);// area 5234, [kJ/kg]\n", +" W = A6125+A5234;// work done \n", +" hf = 304.3;// specific enthalpy of water at condenser pressuer, [kJ/kg]\n", +" ER = h1-hf;// energy received, [kJ/kg]\n", +" Re = W/ER;// rankine efficiency\n", +" mprintf('\n (a) The rankine efficiency is = %f percent\n',Re*100);\n", +" \n", +" // (b)\n", +" kWh = 3600;// [kJ]\n", +" SSC = kWh/W;// specific steam consumption, [kJ/kWh]\n", +" mprintf('\n (b) The specific steam consumption is = %f kJ/kWh\n',SSC);\n", +" \n", +" // (c)\n", +" // from steam table \n", +"T3 = 273+72.7;// temperature at point 3\n", +"CE = (T1-T3)/T1;// carnot efficiency\n", +"mprintf('\n (c) The carnot efficiency of the cycle is = %f percent\n',CE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: power_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 10.9');\n", +"\n", +"// aim : To determine\n", +"// (a) the theoretical power of steam passing through the turbine\n", +"// (b) the thermal efficiency of the cycle\n", +"// (c) the thermal efficiency of the cycle assuming there is no reheat\n", +"\n", +"// given values\n", +"P1 = 6;// initial pressure, [MN/m^2]\n", +"T1 = 450;// initial temperature, [C]\n", +"P2 = 1;// pressure at stage 1, [MN/m^2]\n", +"P3 = 1;// pressure at stage 2, [MN/m^2]\n", +"T3 = 370;// temperature, [C]\n", +"P4 = .02;// pressure at stage 3, [MN/m^2]\n", +"P5 = .02;// pressure at stage 4, [MN/m^2]\n", +"T5 = 320;// temperature, [C]\n", +"P6 = .02;// pressure at stage 5, [MN/m^2]\n", +"P7 = .02;// final pressure , [MN/m^2]\n", +"\n", +"// solution\n", +"// (a) \n", +"// using Fig 10.21\n", +"h1 = 3305;// specific enthalpy, [kJ/kg]\n", +"h2 = 2850;// specific enthalpy, [kJ/kg]\n", +"h3 = 3202;// specific enthalpy, [kJ/kg]\n", +"h4 = 2810;// specific enthalpy, [kJ/kg]\n", +"h5 = 3115;// specific enthalpy, [kJ/kg]\n", +"h6 = 2630;// specific enthalpy, [kJ/kg]\n", +"h7 = 2215;// specific enthalpy, [kJ/kg]\n", +"W = (h1-h2)+(h3-h4)+(h5-h6);// specific work through the turbine, [kJ/kg]\n", +"mprintf('\n (a) The theoretical power/kg steam/s is = %f kW\n',W);\n", +"\n", +"// (b)\n", +"// from steam table\n", +"hf6 = 251.5;// [kJ/kg]\n", +"\n", +"TE1 = ((h1-h2)+(h3-h4)+(h5-h6))/((h1-hf6)+(h3-h2)+(h5-h4));// thermal efficiency\n", +"mprintf('\n (b) The thermal efficiency of the cycle is = %f percent\n',TE1*100);\n", +"\n", +"// (c)\n", +"// if there is no heat\n", +"hf7 = hf6;\n", +"TE2 = (h1-h7)/(h1-hf7);// thermal efficiency\n", +"mprintf('\n (c) The thermal efficiency of the cycle if there is no heat is = %f percent\n',TE2*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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/11-The_steam_engine.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/11-The_steam_engine.ipynb new file mode 100644 index 0000000..703f063 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/11-The_steam_engine.ipynb @@ -0,0 +1,586 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: The steam engine" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: bore_stroke_and_speed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.1')\n", +"\n", +"// aim : To determine the \n", +"// (a) bore of the cylinder\n", +"// (b) piston stroke\n", +"// (c) speed of the engine\n", +"\n", +"// Given values\n", +"P_req = 60;// power required to develop, [kW]\n", +"P = 1.25;// boiler pressure, [MN/m^2]\n", +"Pb = .13;// back pressure, [MN/m^2]\n", +"cut_off = .3;// [stroke]\n", +"k = .82;// diagram factor\n", +"n = .78;// mechanical efficiency\n", +"LN = 3;// mean piston speed, [m/s]\n", +"\n", +"// solution\n", +"// (a)\n", +"r = 1/cut_off;// expansion ratio\n", +"Pm = P/r*(1+log(r))-Pb;// mean effective pressure, [MN/m^2]\n", +"P_ind = P_req/n;// Actual indicated power developed, [kW]\n", +"P_the = P_ind/k;// Theoretical indicated power developed, [kW]\n", +"\n", +"// using indicated_power=Pm*LN*A\n", +"// Hence\n", +"A = P_the/(Pm*LN)*10^-3;// piston area,[m^2]\n", +"d = sqrt(4*A/%pi)*10^3;// bore ,[mm]\n", +"mprintf('\n (a) The bore of the cylinder is = %f mm\n',d);\n", +"\n", +"// (b)\n", +"// given that stroke is 1.25 times bore\n", +"L = 1.25*d;// [mm]\n", +"mprintf('\n (b) The piston stroke is = %f mm\n',L);\n", +"\n", +"// (c)\n", +"// LN=mean piston speed, where L is stroke in meter and N is 2*rev/s,(since engine is double_acting)\n", +"// hence\n", +"rev_per_sec = LN/(2*L*10^-3);// [rev/s]\n", +"\n", +"rev_per_min = rev_per_sec*60;// [rev/min]\n", +"mprintf('\n (c) The speed of the engine is = %f rev/min\n',rev_per_min);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: diameter_and_stroke.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.2')\n", +"\n", +"// aim : To determine the \n", +"// (a) the diameter of the cylinder\n", +"// (b) piston stroke\n", +"// (c) actual steam consumption and indicated thermal efficiency\n", +"\n", +"// Given values\n", +"P = 900;// inlet pressure, [kN/m^2]\n", +"Pb = 140;// exhaust pressure, [kN/m^2]\n", +"cut_off =.4;// [stroke]\n", +"k = .8;// diagram factor\n", +"rs = 1.2;// stroke to bore ratio\n", +"N = 4;// engine speed, [rev/s]\n", +"ip = 22.5;// power output from the engine, [kW]\n", +"\n", +"// solution\n", +"// (a)\n", +"r = 1/cut_off;// expansion ratio\n", +"Pm = P/r*(1+log(r))-Pb;// mean effective pressure, [kN/m^2]\n", +"Pm = Pm*k;// actual mean effective pressure, [kN/m^2]\n", +"\n", +"// using ip=Pm*L*A*N\n", +"// and L=r*d; where L is stroke and d is bore\n", +"d = (ip/(Pm*rs*%pi/4*2*N))^(1/3);// diameter of the cylinder, [m]\n", +"\n", +"mprintf('\n (a) The diameter of the cylinder is = %f mm\n',d*1000);\n", +"\n", +"// (b)\n", +"L = rs*d;// stroke, [m]\n", +"mprintf('\n (b) The piston stroke is = %f mm\n',L*1000);\n", +"\n", +"// (c)\n", +"SV = %pi/4*d^2*L;// stroke volume, [m^3]\n", +"V = SV*cut_off*2*240*60;// volume of steam consumed per hour, [m^3]\n", +"v = .2148;// specific volume at 900 kN/m^2, [m^3/kg]\n", +"SC = V/v;// steam consumed/h, [kg]\n", +"ASC = 1.5*SC;// actual steam consumption/h, [kg]\n", +"mprintf('\n (c) The actual steam consumption/h is = %f kg\n',ASC);\n", +"\n", +"m_dot = ASC/3600;// steam consumption,[kg/s] \n", +"// from steam table\n", +"hg = 2772.1;// specific enthalpy of inlet steam, [kJ/kg]\n", +"hfe = 458.4;// specific liquid enthalpy at exhaust pressure, [kJ/kg]\n", +"\n", +"ITE = ip/(m_dot*(hg-hfe));// indicated thermal efficiency\n", +"mprintf('\n The indicated thermal efficiency is = %f percent\n',ITE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: diagram_factor_and_indicated_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the diagram factor\n", +"// (b) the indicated thermal efficiency of the engine\n", +"\n", +"// given values\n", +"d = 250*10^-3;// cylinder diameter, [m]\n", +"L = 375*10^-3;// length of stroke, [m]\n", +"P = 1000;// steam pressure , [kPa]\n", +"x = .96;// dryness fraction of steam\n", +"Pb = 55;// exhaust pressure, [kPa]\n", +"r = 6;// expansion ratio\n", +"ip = 45;// indicated power developed, [kW]\n", +"N = 3.5;// speed of engine, [rev/s]\n", +"m = 460;// steam consumption, [kg/h]\n", +"\n", +"// solution\n", +"// (a)\n", +"Pm = P/r*(1+log(r))-Pb;// [kN/m^3]\n", +"A = %pi*(d)^2/4;// area, [m^2]\n", +"tip = Pm*L*A*N*2;// theoretical indicated power, [kW]\n", +"k = ip/tip;// diagram factor\n", +"mprintf('\n (a) The diagram factor is = %f\n',k);\n", +"\n", +"// (b)\n", +"// from steam table at 1 MN/m^2\n", +"hf = 762.6;// [kJ/kg]\n", +"hfg = 2013.6;// [kJ/kg]\n", +"// so \n", +"h1 = hf+x*hfg;// specific enthalpy of steam at 1MN/m^2, [kJ/kg]\n", +"// minimum specific enthalpy in engine at 55 kPa \n", +"hf = 350.6;// [kJ/kg]\n", +"// maximum energy available in engine is\n", +"h = h1-hf;// [kJ/kg]\n", +"ITE = ip/(m*h/3600)*100;// indicated thermal efficiency\n", +"mprintf('\n (b) The indicated thermal efficiency is = %f percent\n ',ITE);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: steam_consumption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.4');\n", +"\n", +"// aim : To determine\n", +"// steam consumption\n", +"\n", +"// given values\n", +"P1 = 11;// power, [kW]\n", +"m1 = 276;// steam use/h when developing power P1,[kW]\n", +"ip = 8;// indicated power output, [kW]\n", +"B = 45;// steam used/h at no load, [kg]\n", +"\n", +"// solution\n", +"// using graph of Fig.11.9 \n", +"A = (m1-B)/P1;// slop of line, [kg/kWh]\n", +"W = A*ip+B;// output, [kg/h]\n", +"mprintf('\n The steam consumption is = %f kg/h\n ',W);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5: pressure_power_output_and_steam_consumption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.5');\n", +"\n", +"// aim : To determine\n", +"// (a) the intermediate pressure\n", +"// (b) the indicated power output\n", +"// (c) the steam consumption of the engine\n", +"\n", +"// given values\n", +"P1 = 1400;// initial pressure, [kN/m^2]\n", +"x = .9;// dryness fraction\n", +"P5 = 35;// exhaust pressure\n", +"k = .8;// diagram factor of low-pressure cylindaer\n", +"L = 350*10^-3;// stroke of both the cylinder, [m]\n", +"dhp = 200*10^-3;// diameter of high pressure cylinder, [m]\n", +"dlp = 300*10^-3;// diameter of low-pressure cylinder, [m]\n", +"N = 300;// engine speed, [rev/min]\n", +"\n", +"// solution\n", +"// taking reference Fig.11.13\n", +"Ahp = %pi/4*dhp^2;// area of high-pressure cylinder, [m^2]\n", +"Alp = %pi/4*dlp^2;// area of low-pressure cylinder, [m^2]\n", +"// for equal initial piston loads\n", +"// (P1-P7)Ahp=(P7-P5)Alp\n", +"deff('[x]=f(P7)','x=(P1-P7)*Ahp-(P7-P5)*Alp');\n", +"P7 = fsolve(0,f);// intermediate pressure, [kN/m^2]\n", +"mprintf('\n (a) The intermediate pressure is = %f kN/m^2\n ',P7);\n", +"\n", +"// (b)\n", +"V6 = Ahp*L;// volume of high-pressure cylinder, [m^3]\n", +"P2 = P1;\n", +"P6 = P7;\n", +"// using P2*V2=P6*V6\n", +"V2 = P6*V6/P2; // [m^3]\n", +"V1 = Alp*L;// volume of low-pressure cylinder, [m^3]\n", +"R = V1/V2;// expansion ratio\n", +"Pm = P1/R*(1+log(R))-P5;// effective pressure of low-pressure cylinder, [kn/m^2]\n", +"Pm = k*Pm;// actual effective pressure, [kN/m^2]\n", +"ip = Pm*L*Alp*N*2/60;// indicated power, [kW]\n", +"mprintf('\n (b) The indicated power is = %f kW\n',ip);\n", +"\n", +"// (c) \n", +"COV = V1/ R;// cut-off volume in high-pressure cylinder, [m^3]\n", +"V = COV*N*2*60;// volume of steam admitted/h\n", +"// from steam table\n", +"vg = .1407;// [m^3/kg]\n", +"AV = x*vg;// specific volume of admission steam, [m^3/kg]\n", +"m = V/AV;// steam consumption, [kg/h]\n", +"mprintf('\n (c) The steam consumption of the engine is = %f kg/h\n',m);\n", +"\n", +"// End " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6: power_output_diameter_and_intermediate_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.6');\n", +"\n", +"// aim : To determine\n", +"// (a) the indicated power output\n", +"// (b) the diameter of high-pressure cylinder of the engine\n", +"// (c) the intermediate pressure\n", +"\n", +"// given values\n", +"P = 1100;// initial pressure, [kN/m^2]\n", +"Pb = 28;// exhaust pressure\n", +"k = .82;// diagram factor of low-pressure cylindaer\n", +"L = 600*10^-3;// stroke of both the cylinder, [m]\n", +"dlp = 600*10^-3;// diameter of low-pressure cylinder, [m]\n", +"N = 4;// engine speed, [rev/s]\n", +"R = 8;// expansion ratio\n", +"\n", +"// solution\n", +"// taking reference Fig.11.13\n", +"// (a)\n", +"Pm = P/R*(1+log(R))-Pb;// effective pressure of low-pressure cylinder, [kn/m^2]\n", +"Pm = k*Pm;// actual effective pressure, [kN/m^2]\n", +"Alp = %pi/4*dlp^2;// area of low-pressure cylinder, [m^2]\n", +"ip = Pm*L*Alp*N*2;// indicated power, [kW]\n", +"mprintf('\n (a) The indicated power is = %f kW\n',ip);\n", +"\n", +"// (b)\n", +"// work done by both cylinder is same as area of diagram\n", +"w = Pm*Alp*L;// [kJ]\n", +"W = w/2;// work done/cylinder, [kJ]\n", +"V2 = Alp*L/8;// volume, [m63]\n", +"P2 = P;// [kN/m^2]\n", +"// using area A1267=P2*V2*log(V6/V2)=W\n", +"V6 = V2*exp(W/(P2*V2));// intermediate volume, [m^3]\n", +"// using Ahp*L=%pi/4*dhp^2*L=V6\n", +"dhp = sqrt(V6*4/L/%pi);// diameter of high-pressure cylinder, [m]\n", +"mprintf('\n (b) The diameter of high-pressure cylinder is = %f mm\n',dhp*1000);\n", +"\n", +"// (c)\n", +"// using P2*V2=P6*V6\n", +"P6 = P2*V2/V6; // intermediate pressure, [kN/m^2]\n", +"mprintf('\n (c) The intermediate opressure is = %f kN/m^2\n',P6);\n", +"\n", +"// End " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.7: speed_and_diameter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.7');\n", +"\n", +"// aim : To determine\n", +"// (a) The speed of the engine\n", +"// (b) the diameter of the high pressure cylinder\n", +"\n", +"// given values\n", +"ip = 230;// indicated power, [kW]\n", +"P = 1400;// admission pressure, [kN/m^2]\n", +"Pb = 35;// exhaust pressure, [kN/m^2]\n", +"R = 12.5;// expansion ratio\n", +"d1 = 400*10^-3;// diameter of low pressure cylinder, [m]\n", +"L = 500*10^-3;// stroke of both the cylinder, [m]\n", +"k = .78;// diagram factor\n", +"rv = 2.5;// expansion ratio of high pressure cylinder\n", +"\n", +"// solution\n", +"// (a)\n", +"Pm = P/R*(1+log(R))-Pb;// mean effective pressure in low pressure cylinder, [kN/m^2]\n", +"ipt = ip/k;// theoretical indicated power, [kw]\n", +"// using ip=Pm*L*A*N\n", +"A = %pi/4*d1^2;// area , [m^2]\n", +"N = ipt/(Pm*L*A*2);// speed, [rev/s]\n", +"mprintf('\n (a) The engine speed is = %f rev/s\n',N);\n", +"\n", +"// (b)\n", +"Vl = A*L;// volume of low pressure cylinder, [m^3]\n", +"COV = Vl/R;// cutt off volume of hp cylinder, [m^3]\n", +"V = COV*rv;// total volume, [m^3]\n", +"\n", +"// V = %pi/4*d^2*L, so\n", +"d = sqrt(4*V/%pi/L);// diameter of high pressure cylinder, [m]\n", +"mprintf('\n (b) The diameter of the high pressure cylinder is = %f mm\n',d*1000);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.8: mean_effective_pressures_diagram_factor_and_indicated_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.8');\n", +"\n", +"// aim : To determine\n", +"// (a) the actual and hypothetical mean effective pressures referred to the low-pressure cylinder\n", +"// (b) the overall diagram factor\n", +"// (c) the indicated power \n", +"\n", +"// given values\n", +"P = 1100;// steam supply pressure, [kN/m^2]\n", +"Pb = 32;// back pressure, [kN/m^2]\n", +"d1 = 300*10^-3;// cylinder1 diameter, [m]\n", +"d2 = 600*10^-3;// cylinder2 diameter, [m]\n", +"L = 400*10^-3;// common stroke of both cylinder, [m]\n", +"\n", +"A1 = 12.5;// average area of indicated diagram for HP, [cm^2]\n", +"A2 = 11.4;// average area of indicated diagram for LP, [cm^2]\n", +"\n", +"P1 = 270;// indicator calibration, [kN/m^2/ cm]\n", +"P2 = 80;// spring calibration, [kN/m^2/ cm]\n", +"N = 2.7;// engine speed, [rev/s]\n", +"l = .75;// length of both diagram, [m]\n", +"\n", +"// solution\n", +"// (a)\n", +"// for HP cylinder\n", +"Pmh = P1*A1/7.5;// [kN/m^2]\n", +"F = Pmh*%pi/4*d1^2;// force on HP, [kN]\n", +"PmH = Pmh*(d1/d2)^2;// pressure referred to LP cylinder, [kN/m^2]\n", +"PmL = P2*A2/7.5;// pressure for LP cylinder, [kN/m^2]\n", +"PmA = PmH+PmL;// actual effective pressure referred to LP cylinder, [kN/m^2]\n", +"\n", +"Ah = %pi/4*d1^2;// area of HP cylinder, [m^2]\n", +"Vh = Ah*L;// volume of HP cylinder, [m^3]\n", +"CVh = Vh/3;// cut-off volume of HP cylinder, [m^3]\n", +"Al = %pi/4*d2^2;// area of LP cylinder, [m^2]\n", +"Vl = Al*L;// volume of LP cylinder, [m^3]\n", +"\n", +"R = Vl/CVh;// expansion ratio\n", +"Pm = P/R*(1+log(R))-Pb;// hypothetical mean effective pressure referred to LP cylinder, [kN/m^2]\n", +"\n", +"mprintf('\n (a) The actual mean effective pressure referred to LP cylinder is = %f kN/m^2\n',PmA);\n", +"mprintf('\n The hypothetical mean effective pressure referred to LP cylinder is = %f kN/m^2\n',Pm);\n", +"\n", +"// (a)\n", +"ko = PmA/Pm;// overall diagram factor\n", +"mprintf('\n (b) The overall diagram factor is = %f\n',ko);\n", +"\n", +"// (c) \n", +"ip = PmA*L*Al*N*2;// indicated power, [kW]\n", +"mprintf('\n (c) The indicated power is = %f kW\n',ip);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.9: EX11_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 11.9');\n", +"\n", +"// aim : To determine\n", +"// (a) the actual and hypothetical mean effective pressures referred to the low-pressure cylinder\n", +"// (b) the overall diagram factor\n", +"// (c) the pecentage of the total indicated power developed in each cylinder\n", +"\n", +"// given values\n", +"P = 1400;// steam supply pressure, [kN/m^2]\n", +"Pb = 20;// back pressure, [kN/m^2]\n", +"Chp = .6;// cut-off in HP cylinder, [stroke]\n", +"dh = 300*10^-3;// HP diameter, [m]\n", +"di = 500*10^-3;// IP diameter, [m]\n", +"dl = 900*10^-3;// LP diameter, [m]\n", +"\n", +"Pm1 = 590;// actual pressure of HP cylinder, [kN/m^2]\n", +"Pm2 = 214;// actual pressure of IP cylinder, [kN/m^2]\n", +"Pm3 = 88;// actual pressure of LP cylinder, [kN/m^2]\n", +"\n", +"// solution\n", +"// (a)\n", +"// for HP cylinder\n", +"PmH = Pm1*(dh/dl)^2;// PmH referred to LP cylinder, [kN/m^2]\n", +"// for IP cylinder\n", +"PmI = Pm2*(di/dl)^2;// PmI referred to LP cylinder, [kN/m^2]\n", +"PmA = PmH+PmI+Pm3;// actual mean effective pressure referred to LP cylinder, [kN/m^2]\n", +"\n", +"R = dl^2/(dh^2*Chp);// expansion ratio\n", +"Pm = P/R*(1+log(R))-Pb;// hypothetical mean effective pressure referred to LP cylinder, [kN/m^2]\n", +"\n", +"mprintf('\n (a) The actual mean effective pressure referred to LP cylinder is = %f kN/m^2\n',PmA);\n", +"mprintf('\n The hypothetical mean effective pressure referred to LP cylinder is = %f kN/m^2\n',Pm);\n", +"\n", +"// (b)\n", +"ko = PmA/Pm;// overall diagram factor\n", +"mprintf('\n (b) The overall diagram factor is = %f\n',ko);\n", +"\n", +"// (c)\n", +"HP = PmH/PmA*100;// %age of indicated power developed in HP\n", +"IP = PmI/PmA*100; // %age of indicated power developed in IP\n", +"LP = Pm3/PmA*100; // %age of indicated power developed in LP\n", +"mprintf('\n (c) The pecentage of the total indicated power developed in HP cylinder is = %f percent\n',HP);\n", +"mprintf('\n The pecentage of the total indicated power developed in IP cylinder is = %f percent\n',IP);\n", +"mprintf('\n The pecentage of the total indicated power developed in LP cylinder is = %f percent\n',LP);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/12-Nozzle.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/12-Nozzle.ipynb new file mode 100644 index 0000000..094eaa5 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/12-Nozzle.ipynb @@ -0,0 +1,274 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Nozzle" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: area_and_Mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 12.1');\n", +"\n", +"// aim : To determine the\n", +"// (a) throat area\n", +"// (b) exit area\n", +"// (c) Mach number at exit\n", +"\n", +"// Given values\n", +"P1 = 3.5;// inlet pressure of air, [MN/m^2]\n", +"T1 = 273+500;// inlet temperature of air, [MN/m^2]\n", +"P2 = .7;// exit pressure, [MN/m^2]\n", +"m_dot = 1.3;// flow rate of air, [kg/s]\n", +"Gamma = 1.4;// heat capacity ratio\n", +"R = .287;// [kJ/kg K]\n", +"\n", +"// solution\n", +"// given expansion may be considered to be adiabatic and to follow the law PV^Gamma=constant\n", +"// using ideal gas law\n", +"v1 = R*T1/P1*10^-3;// [m^3/kg]\n", +"Pt = P1*(2/(Gamma+1))^(Gamma/(Gamma-1));// critical pressure, [MN/m^2]\n", +"\n", +"// velocity at throat is\n", +"Ct = sqrt(2*Gamma/(Gamma-1)*P1*10^6*v1*(1-(Pt/P1)^(((Gamma-1)/Gamma))));// [m/s]\n", +"vt = v1*(P1/Pt)^(1/Gamma);// [m^3/kg]\n", +"// using m_dot/At=Ct/vt\n", +"At = m_dot*vt/Ct*10^6;// throat area, [mm^2]\n", +"mprintf('\n (a) The throat area is = %f mm^2\n',At);\n", +"\n", +"// (b)\n", +"// at exit\n", +"C2 = sqrt(2*Gamma/(Gamma-1)*P1*10^6*v1*(1-(P2/P1)^(((Gamma-1)/Gamma))));// [m/s]\n", +"v2 = v1*(P1/P2)^(1/Gamma);// [m^3/kg]\n", +"A2 = m_dot*v2/C2*10^6;// exit area, [mm^2]\n", +"\n", +"mprintf('\n (b) The exit area is = %f mm^2\n',A2);\n", +"\n", +"// (c)\n", +"M = C2/Ct;\n", +"mprintf('\n (c) The Mach number at exit is = %f\n',M);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: increases_in_pressure_temperature_and_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 12.2');\n", +"\n", +"// aim : To determine the increases in pressure, temperature and internal energy per kg of air\n", +"\n", +"// Given values\n", +"T1 = 273;// [K]\n", +"P1 = 140;// [kN/m^2]\n", +"C1 = 900;// [m/s]\n", +"C2 = 300;// [m/s]\n", +"cp = 1.006;// [kJ/kg K]\n", +"cv =.717;// [kJ/kg K]\n", +"\n", +"// solution\n", +"R = cp-cv;// [kJ/kg K]\n", +"Gamma = cp/cv;// heat capacity ratio\n", +"// for frictionless adiabatic flow, (C2^2-C1^2)/2=Gamma/(Gamma-1)*R*(T1-T2)\n", +"\n", +"T2 =T1-((C2^2-C1^2)*(Gamma-1)/(2*Gamma*R))*10^-3; // [K]\n", +"T_inc = T2-T1;// increase in temperature [K]\n", +"\n", +"P2 = P1*(T2/T1)^(Gamma/(Gamma-1));// [MN/m^2]\n", +"P_inc = (P2-P1)*10^-3;// increase in pressure,[MN/m^2]\n", +"\n", +"U_inc = cv*(T2-T1);// Increase in internal energy per kg,[kJ/kg]\n", +"mprintf('\n The increase in pressure is = %f MN/m^2\n',P_inc);\n", +"mprintf('\n Increase in temperature is = %f K\n',T_inc);\n", +"mprintf('\n Increase in internal energy is = %f kJ/kg\n',U_inc);\n", +"\n", +"// there is minor variation in result\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: throat_area_and_degree_of_undercooling.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 12.3');\n", +"\n", +"// aim : To determine the \n", +"// (a) throat and exit areas\n", +"// (b) degree of undercooling at exit\n", +"// Given values\n", +"P1 = 2;// inlet pressure of air, [MN/m^2]\n", +"T1 = 273+325;// inlet temperature of air, [MN/m^2]\n", +"P2 = .36;// exit pressure, [MN/m^2]\n", +"m_dot = 7.5;// flow rate of air, [kg/s]\n", +"n = 1.3;// polytropic index\n", +"\n", +"// solution\n", +"// (a)\n", +"// using steam table\n", +"v1 = .132;// [m^3/kg]\n", +"// given expansion following law PV^n=constant\n", +"\n", +"Pt = P1*(2/(n+1))^(n/(n-1));// critical pressure, [MN/m^2]\n", +"\n", +"//velocity at throat is\n", +"Ct = sqrt(2*n/(n-1)*P1*10^6*v1*(1-(Pt/P1)^(((n-1)/n))));// [m/s]\n", +"vt = v1*(P1/Pt)^(1/n);// [m^3/kg]\n", +"// using m_dot/At=Ct/vt\n", +"At = m_dot*vt/Ct*10^6;// throat area, [mm^2]\n", +"mprintf('\n (a) The throat area is = %f mm^2\n',At);\n", +"\n", +"// at exit\n", +"C2 = sqrt(2*n/(n-1)*P1*10^6*v1*(1-(P2/P1)^(((n-1)/n))));// [m/s]\n", +"v2 = v1*(P1/P2)^(1/n);// [m^3/kg]\n", +"A2 = m_dot*v2/C2*10^6;// exit area, [mm^2]\n", +"\n", +"mprintf('\n The exit area is = %f mm^2\n',A2);\n", +"\n", +"// (b)\n", +"T2 = T1*(P2/P1)^((n-1)/n);//outlet temperature, [K]\n", +"t2 = T2-273;//[C]\n", +"// at exit pressure saturation temperature is\n", +"ts = 139.9;// saturation temperature,[C]\n", +"Doc = ts-t2;// Degree of undercooling,[C]\n", +"mprintf('\n (b) The Degree of undercooling at exit is = %f C\n',Doc);\n", +"\n", +"// There is some calculation mistake in the book so answer is not matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: velocities_and_areas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 12.4');\n", +"\n", +"// aim : To determine the \n", +"// (a) throat and exit velocities\n", +"// (b) throat and exit areas\n", +"\n", +"// Given values\n", +"P1 = 2.2;// inlet pressure, [MN/m^2]\n", +"T1 = 273+260;// inlet temperature, [K]\n", +"P2 = .4;// exit pressure,[MN/m^2]\n", +"eff = .85;// efficiency of the nozzle after throat\n", +"m_dot = 11;// steam flow rate in the nozzle, [kg/s]\n", +"\n", +"// solution\n", +"// (a)\n", +"// assuming steam is following same law as previous question 12.3\n", +"Pt = .546*P1;// critical pressure,[MN/m^2]\n", +"// from Fig. 12.6\n", +"h1 = 2940;// [kJ/kg]\n", +"ht = 2790;// [kJ/kg]\n", +"\n", +"Ct = sqrt(2*(h1-ht)*10^3);// [m/s]\n", +"\n", +"// again from Fig. 12.6\n", +"h2_prime = 2590;// [kJ/kg]\n", +"// using eff = (ht-h2)/(ht-h2_prime)\n", +"\n", +"h2 = ht-eff*(ht-h2_prime); // [kJ/kg]\n", +"\n", +"C2 = sqrt(2*(h1-h2)*10^3);// [m/s]\n", +"\n", +"// (b)\n", +"// from chart\n", +"vt = .16;// [m^3/kg]\n", +"v2 = .44;// [m^3/kg]\n", +"// using m_dot*v=A*C\n", +"At = m_dot*vt/Ct*10^6;// throat area, [mm^2]\n", +"\n", +"A2 = m_dot*v2/C2*10^6;// throat area, [mm^2]\n", +"\n", +"mprintf('\n (a) The throat velocity is = %f m/s\n',Ct);\n", +"mprintf('\n The exit velocity is = %f m/s\n',C2);\n", +"mprintf('\n (b) The throat area is = %f mm^2\n',At);\n", +"mprintf('\n The throat area is = %f mm^2\n',A2);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/13-Steam_turbines.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/13-Steam_turbines.ipynb new file mode 100644 index 0000000..f74dd9d --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/13-Steam_turbines.ipynb @@ -0,0 +1,284 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Steam turbines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: power_developed_and_kinetic_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 13.1');\n", +"\n", +"// aim : To determine \n", +"// the power developed for a steam flow of 1 kg/s at the blades and the kinetic energy of the steam finally leaving the wheel\n", +"\n", +"// Given values\n", +"alfa = 20;// blade angle, [degree]\n", +"Cai = 375;// steam exit velocity in the nozzle,[m/s]\n", +"U = 165;// blade speed, [m/s]\n", +"loss = .15;// loss of velocity due to friction\n", +"\n", +"// solution\n", +"// using Fig13.12,\n", +"Cvw = 320;// change in velocity of whirl, [m/s]\n", +"cae = 132.5;// absolute velocity at exit, [m/s]\n", +"Pds = U*Cvw*10^-3;// Power developed for steam flow of 1 kg/s, [kW]\n", +"Kes = cae^2/2*10^-3;// Kinetic energy change of steam, [kW/kg] \n", +"\n", +"mprintf('\n The power developed for a steam flow of 1 kg/s is = %f kW\n',Pds)\n", +"mprintf('\n The energy of steam finally leaving the wheel is = %f kW/kg\n',Kes);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: angle_of_blade_work_done_diagram_efficiency_and_end_thrust.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 13.2');\n", +"\n", +"// aim : To determine\n", +"// (a) the entry angle of the blades\n", +"// (b) the work done per kilogram of steam per second\n", +"// (c) the diagram efficiency\n", +"// (d) the end-thrust per kilogram of steam per second\n", +"\n", +"// given values\n", +"Cai = 600;// steam velocity, [m/s]\n", +"sia = 25;// steam inlet angle with blade, [degree]\n", +"U = 255;// mean blade speed, [m/s]\n", +"sea = 30;// steam exit angle with blade,[degree] \n", +"\n", +"// solution\n", +"// (a)\n", +"// using Fig.13.13(diagram for example 13.2)\n", +"eab = 41.5;// entry angle of blades, [degree]\n", +"mprintf('\n (a) The angle of blades is = %f degree\n',eab);\n", +"\n", +"// (b)\n", +"Cwi_plus_Cwe = 590;// velocity of whirl, [m/s]\n", +"W = U*(Cwi_plus_Cwe);// work done on the blade,[W/kg]\n", +"mprintf('\n (b) The work done on the blade is = %f kW/kg\n',W*10^-3);\n", +"\n", +"// (c)\n", +"De = 2*U*(Cwi_plus_Cwe)/Cai^2;// diagram efficiency \n", +"mprintf('\n (c) The diagram efficiency is = %f percent\n',De*100);\n", +"\n", +"// (d)\n", +"// again from the diagram\n", +"Cfe_minus_Cfi = -90;// change invelocity of flow, [m/s]\n", +"Eth = Cfe_minus_Cfi;// end-thrust, [N/kg s]\n", +"mprintf('\n (d) The End-thrust is = %f N/kg',Eth);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3: power_output_and_diagram_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 13.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the power output of the turbine\n", +"// (b) the diagram efficiency\n", +"\n", +"// given values\n", +"U = 150;// mean blade speed, [m/s]\n", +"Cai1 = 675;// nozzle speed, [m/s]\n", +"na = 20;// nozzle angle, [degree]\n", +"m_dot = 4.5;// steam flow rate, [kg/s]\n", +"\n", +"// solution\n", +"// from Fig. 13.15(diagram 13.3)\n", +"Cw1 = 915;// [m/s]\n", +"Cw2 = 280;// [m/s]\n", +"\n", +"// (a)\n", +"P = m_dot*U*(Cw1+Cw2);// power of turbine,[W]\n", +"mprintf('\n (a) The power of turbine is = %f kW\n',P*10^-3);\n", +"\n", +"// (b)\n", +"De = 2*U*(Cw1+Cw2)/Cai1^2;// diagram efficiency\n", +"mprintf('\n (b) The diagram efficiency is = %f percent\n',De*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4: power_output_specific_enthalpy_drop_and_increase_in_relative_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 13.4');\n", +"\n", +"// aim : To determine\n", +"// (a) the power output of the stage\n", +"// (b) the specific enthalpy drop in the stage\n", +"// (c) the percentage increase in relative velocity in the moving blades due to expansion in the bladse\n", +"\n", +"// given values\n", +"N = 50;// speed, [m/s]\n", +"d = 1;// blade ring diameter, [m]\n", +"nai = 50;// nozzle inlet angle, [degree]\n", +"nae = 30;// nozzle exit angle, [degree]\n", +"m_dot = 600000;// steam flow rate, [kg/h]\n", +"se = .85;// stage efficiency\n", +"\n", +"// solution\n", +"// (a)\n", +"U = %pi*d*N;// mean blade speed, [m/s]\n", +"// from Fig. 13.17(diagram 13.4)\n", +"Cwi_plus_Cwe = 444;// change in whirl speed, [m/s]\n", +"P = m_dot*U*Cwi_plus_Cwe/3600;// power output of the stage, [W]\n", +"mprintf('\n (a) The power output of the stage is = %f MW\n',P*10^-6);\n", +"\n", +"// (b)\n", +"h = U*Cwi_plus_Cwe/se;// specific enthalpy,[J/kg]\n", +"mprintf('\n (b) The specific enthalpy drop in the stage is = %f kJ/kg\n ',h*10^-3);\n", +"\n", +"// (c)\n", +"// again from diagram\n", +"Cri = 224;// [m/s]\n", +"Cre = 341;// [m/s]\n", +"Iir = (Cre-Cri)/Cri;// increase in relative velocity\n", +"mprintf('\n (c) The increase in relative velocity is = %f percent\n',Iir*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.5: blade_height_power_developed_and_specific_enthalpy_drop.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 13.5');\n", +"\n", +"// aim : To determine\n", +"// (a) the blade height of the stage\n", +"// (b) the power developed in the stage\n", +"// (c) the specific enthalpy drop at the stage\n", +"\n", +"// given values\n", +"U = 60;// mean blade speed, [m/s]\n", +"P = 350;// steam pressure, [kN/m^2]\n", +"T = 175;// steam temperature, [C]\n", +"nai = 30;// stage inlet angle, [degree]\n", +"nae = 20;// stage exit angle, [degree] \n", +"\n", +"// solution\n", +"// (a)\n", +"m_dot = 13.5;// steam flow rate, [kg/s]\n", +"// at given T and P\n", +"v = .589;// specific volume, [m^3/kg]\n", +"// given H=d/10, so\n", +"H = sqrt(m_dot*v/(%pi*10*60));// blade height, [m]\n", +"mprintf('\n (a) The blade height at this stage is = %f mm\n',H*10^3);\n", +"\n", +"// (b)\n", +"Cwi_plus_Cwe = 270;// change in whirl speed, [m/s]\n", +"P = m_dot*U*(Cwi_plus_Cwe);// power developed, [W]\n", +"mprintf('\n (b) The power developed is = %f kW\n',P*10^-3);\n", +"\n", +"// (c)\n", +"s = .85;// stage efficiency\n", +"h = U*Cwi_plus_Cwe/s;// specific enthalpy,[J/kg]\n", +"mprintf('\n (a) The specific enthalpy drop in the stage is = %f kJ/kg',h*10^-3);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/14-Air_and_gas_compressors.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/14-Air_and_gas_compressors.ipynb new file mode 100644 index 0000000..0282db3 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/14-Air_and_gas_compressors.ipynb @@ -0,0 +1,472 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Air and gas compressors" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1: EX14_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.1');\n", +"\n", +"// aim : To determine \n", +"// (a) the free air delivered\n", +"// (b) the volumetric efficiency\n", +"// (c) the air delivery temperature\n", +"// (d) the cycle power\n", +"// (e) the isothermal efficiency\n", +"\n", +"// given values\n", +"d = 200*10^-3;// bore, [m]\n", +"L = 300*10^-3;// stroke, [m]\n", +"N = 500;// speed, [rev/min]\n", +"n = 1.3;// polytropic index\n", +"P1 = 97;// intake pressure, [kN/m^2]\n", +"T1 = 273+20;// intake temperature, [K]\n", +"P3 = 550;// compression pressure, [kN/m^2]\n", +"\n", +"// solution\n", +"// (a)\n", +"P4 = P1;\n", +"P2 = P3;\n", +"Pf = 101.325;// free air pressure, [kN/m^2]\n", +"Tf = 273+15;// free air temperature, [K]\n", +"SV = %pi/4*d^2*L;// swept volume, [m^3]\n", +"V3 = .05*SV;// [m^3]\n", +"V1 = SV+V3;// [m^3]\n", +"V4 = V3*(P3/P4)^(1/n);// [m^3]\n", +"ESV = (V1-V4)*N;// effective swept volume/min, [m^3]\n", +"// using PV/T=constant\n", +"Vf = P1*ESV*Tf/(Pf*T1);// free air delivered, [m^3/min]\n", +"mprintf('\n (a) The free air delivered is = %f m^3/min\n',Vf);\n", +"\n", +"// (b)\n", +"VE = Vf/(N*(V1-V3));// volumetric efficiency\n", +"mprintf('\n (b) The volumetric efficiency is = %f percent\n',VE*100);\n", +"\n", +"// (c)\n", +"T2 = T1*(P2/P1)^((n-1)/n);// free air temperature, [K]\n", +"mprintf('\n (c) The air delivery temperature is = %f C\n',T2-273);\n", +"\n", +"// (d)\n", +"CP = n/(n-1)*P1*(V1-V4)*((P2/P1)^((n-1)/n)-1)*N/60;// cycle power, [kW]\n", +" mprintf('\n (d) The cycle power is = %f kW\n',CP);\n", +"\n", +"// (e)\n", +"// neglecting clearence\n", +"W = n/(n-1)*P1*V1*((P2/P1)^((n-1)/n)-1)\n", +"Wi = P1*V1*log(P2/P1);// isothermal efficiency\n", +"IE = Wi/W;// isothermal efficiency\n", +"mprintf('\n (e) The isothermal efficiency neglecting clearence is = %f percent\n',IE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2: intermediate_pressure_volume_and_cycle_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.2');\n", +"\n", +"// aim : To determine \n", +"// (a) the intermediate pressure\n", +"// (b) the total volume of each cylinder\n", +"// (c) the cycle power\n", +"\n", +"// given values\n", +"v1 = .2;// air intake, [m^3/s]\n", +"P1 = .1;// intake pressure, [MN/m^2]\n", +"T1 = 273+16;// intake temperature, [K]\n", +"P3 = .7;// final pressure, [MN/m^2]\n", +"n = 1.25;// compression index\n", +"N = 10;// speed, [rev/s]\n", +"\n", +"// solution\n", +"// (a)\n", +"P2 = sqrt(P1*P3);// intermediate pressure, [MN/m^2]\n", +"mprintf('\n (a) The intermediate pressure is = %f MN/m^2\n',P2);\n", +"\n", +"// (b)\n", +"V1 = v1/N;// total volume,[m^3]\n", +"// since intercooling is perfect so 2 lie on the isothermal through1, P1*V1=P2*V2\n", +"V2 = P1*V1/P2;// volume, [m^3]\n", +"mprintf('\n (b) The total volume of the HP cylinder is = %f litres\n',V2*10^3);\n", +"\n", +" // (c)\n", +" CP = 2*n/(n-1)*P1*v1*((P2/P1)^((n-1)/n)-1);// cycle power, [MW]\n", +" mprintf('\n (c) The cycle power is = %f MW\n',CP*10^3);\n", +" \n", +" // there is calculation mistake in the book so answer is not matching\n", +" \n", +" // End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3: intermediate_pressures_effective_swept_volume_temperature_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.3');\n", +"\n", +"// aim : To determine \n", +"// (a) the intermediate pressures\n", +"// (b) the effective swept volume of the LP cylinder\n", +"// (c) the temperature and the volume of air delivered per stroke at 15 bar\n", +"// (d) the work done per kilogram of air\n", +"\n", +"// given values\n", +"d = 450*10^-3;// bore , [m]\n", +"L = 300*10^-3;// stroke, [m]\n", +"cl = .05;// clearence\n", +"P1 = 1; // intake pressure, [bar]\n", +"T1 = 273+18;// intake temperature, [K]\n", +"P4 = 15;// final delivery pressure, [bar]\n", +"n = 1.3;// compression and expansion index\n", +"R = .29;// gas constant, [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"k=(P4/P1)^(1/3); \n", +"// hence\n", +"P2 = k*P1;// intermediare pressure, [bar]\n", +"P3 = k*P2;// intermediate pressure, [bar]\n", +"\n", +"mprintf('\n (a) The intermediate pressure is P2 = %f bar\n',P2);\n", +"mprintf('\n The intermediate pressure is P3= %f bar\n',P3);\n", +"\n", +"// (b)\n", +"SV = %pi*d^2/4*L;// swept volume of LP cylinder, [m^3]\n", +"// hence\n", +"V7 = cl*SV;// volume, [m^3]\n", +"V1 = SV+V7;// volume, [m^3]\n", +"// also\n", +"P7 = P2;\n", +"P8 = P1;\n", +"V8 = V7*(P7/P8)^(1/n);// volume, [m^3]\n", +"ESV = V1-V8;// effective swept volume of LP cylinder, [m^3]\n", +"\n", +"mprintf('\n (b) The effective swept volume of the LP cylinder is = %f litres\n',ESV*10^3);\n", +"\n", +"// (c)\n", +"T9 = T1;\n", +"P9 = P3;\n", +"T4 = T9*(P4/P9)^((n-1)/n);// delivery temperature, [K]\n", +"// now using P4*(V4-V5)/T4=P1*(V1-V8)/T1\n", +"V4_minus_V5 = P1*T4*(V1-V8)/(P4*T1);// delivery volume, [m^3]\n", +" \n", +"mprintf('\n (c) The delivery temperature is = %f C\n',T4-273);\n", +"mprintf('\n The delivery volume is = %f litres\n',V4_minus_V5*10^3);\n", +"\n", +"// (d)\n", +"\n", +"W = 3*n*R*T1*((P2/P1)^((n-1)/n)-1)/(n-1);// work done/kg ,[kJ]\n", +"mprintf('\n (d) The work done per kilogram of air is = %f kJ\n',W);\n", +" \n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4: pressure_temperature_and_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.4');\n", +"\n", +"// aim : To determine \n", +"// (a) the final pressure and temperature\n", +"// (b) the energy required to drive the compressor\n", +"\n", +"// given values\n", +"rv = 5;// pressure compression ratio\n", +"m_dot = 10;// air flow rate, [kg/s]\n", +"P1 = 100;// initial pressure, [kN/m^2]\n", +"T1 = 273+20;// initial temperature, [K]\n", +"n_com = .85;// isentropic efficiency of compressor\n", +"Gama = 1.4;// heat capacity ratio\n", +"cp = 1.005;// specific heat capacity, [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"T2_prim = T1*(rv)^((Gama-1)/Gama);// temperature after compression, [K]\n", +"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n", +"T2 = T1+(T2_prim-T1)/n_com;// final temperature, [K]\n", +"P2 = rv*P1;// final pressure, [kN/m^2]\n", +"mprintf('\n (a) The final temperature is = %f C\n',T2-273);\n", +"mprintf('\n (b) The final pressure is = %f kN/m^2\n',P2);\n", +"\n", +"// (b)\n", +"E = m_dot*cp*(T1-T2);// energy required, [kW]\n", +"mprintf('\n (b) The energy required to drive the compressor is = %f kW',E);\n", +"if(E<0)\n", +" disp('The negative sign indicates energy input');\n", +"else\n", +" disp('The positive sign indicates energy output');\n", +"end\n", +"\n", +" // End\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5: power_developed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.5');\n", +"\n", +"// aim : To determine \n", +"// the power absorbed in driving the compressor\n", +"\n", +"// given values\n", +"FC = .68;// fuel consumption rate, [kg/min]\n", +"P1 = 93;// initial pressure, [kN/m^2]\n", +"P2 = 200;// final pressure, [kN/m^2]\n", +"T1 = 273+15;// initial temperature, [K]\n", +"d = 1.3;// density of mixture, [kg/m^3]\n", +"n_com = .82;// isentropic efficiency of compressor\n", +"Gama = 1.38;// heat capacity ratio\n", +"\n", +"// solution\n", +"R = P1/(d*T1);// gas constant, [kJ/kg K]\n", +"// for mixture\n", +"cp = Gama*R/(Gama-1);// heat capacity, [kJ/kg K]\n", +"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// temperature after compression, [K]\n", +"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n", +"T2 = T1+(T2_prim-T1)/n_com;// final temperature, [K]\n", +"m_dot = FC*15/60;// given condition, [kg/s]\n", +"P = m_dot*cp*(T2-T1);// power absorbed by compressor, [kW]\n", +"mprintf('\n The power absorbed by compressor is = %f kW\n',P);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6: power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.6');\n", +"\n", +"// aim : To determine \n", +"// the power required to drive the blower\n", +"\n", +"// given values\n", +"m_dot = 1;// air capacity, [kg/s]\n", +"rp = 2;// pressure ratio\n", +"P1 = 1*10^5;// intake pressure, [N/m^2]\n", +"T1 = 273+70;// intake temperature, [K]\n", +"R = .29;// gas constant, [kJ/kg k]\n", +"\n", +"// solution\n", +"V1_dot = m_dot*R*T1/P1*10^3;// [m^3/s]\n", +"P2 = rp*P1;// final pressure, [n/m^2]\n", +"P = V1_dot*(P2-P1);// power required, [W]\n", +"mprintf('\n The power required to drive the blower is = %f kW\n',P*10^-3);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7: power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.7');\n", +"\n", +"// aim : To determine \n", +"// the power required to drive the vane pump\n", +"\n", +"// given values\n", +"m_dot = 1;// air capacity, [kg/s]\n", +"rp = 2;// pressure ratio\n", +"P1 = 1*10^5;// intake pressure, [N/m^2]\n", +"T1 = 273+70;// intake temperature, [K]\n", +"Gama = 1.4;// heat capacity ratio\n", +"rv = .7;// volume ratio\n", +"\n", +"// solution\n", +"V1 = .995;// intake pressure(as given previous question),[m^3/s] \n", +"// using P1*V1^Gama=P2*V2^Gama, so\n", +"P2 = P1*(1/rv)^Gama;// pressure, [N/m^2]\n", +"V2 = rv*V1;// volume,[m^3/s]\n", +"P3 = rp*P1;// final pressure, [N/m^2]\n", +"P = Gama/(Gama-1)*P1*V1*((P2/P1)^((Gama-1)/Gama)-1)+V2*(P3-P2);// power required,[W]\n", +"mprintf('\n The power required to drive the vane pump is = %f kW\n',P*10^-3);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.8: power_temperature_and_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 14.8');\n", +"\n", +"// aim : To determine \n", +"// the total temperature and pressure of the mixture\n", +"\n", +"// given values\n", +"rp = 2.5;// static pressure ratio\n", +"FC = .04;// fuel consumption rate, [kg/min]\n", +"P1 = 60;// inilet pressure, [kN/m^2]\n", +"T1 = 273+5;// inilet temperature, [K]\n", +"n_com = .84;// isentropic efficiency of compressor\n", +"Gama = 1.39;// heat capacity ratio\n", +"C2 = 120;//exit velocity from compressor, [m/s]\n", +"rm = 13;// air-fuel ratio\n", +"cp = 1.005;// heat capacity ratio\n", +"\n", +"// solution\n", +"P2 = rp*P1;// given condition, [kN/m^2]\n", +"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// temperature after compression, [K]\n", +"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n", +"T2 = T1+(T2_prim-T1)/n_com;// final temperature, [K]\n", +"m_dot = FC*(rm+1);// mass of air-fuel mixture, [kg/s]\n", +"P = m_dot*cp*(T2-T1);// power to drive compressor, [kW]\n", +"mprintf('\n The power required to drive compressor is = %f kW\n',P);\n", +"\n", +"Tt2 = T2+C2^2/(2*cp*10^3);// total temperature,[K]\n", +"Pt2 = P2*(Tt2/T2)^(Gama/(Gama-1));// total pressure, [kN/m^2]\n", +"mprintf('\n The temperature in the engine is = %f C\n',Tt2-273);\n", +"mprintf('\n The pressure in the engine cylinder is = %f kN/m^2\n',Pt2);\n", +"\n", +"// There is calculation mistake in the book\n", +"\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 +} 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 +} 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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/17-Engine_and_plant_trials.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/17-Engine_and_plant_trials.ipynb new file mode 100644 index 0000000..7087ec2 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/17-Engine_and_plant_trials.ipynb @@ -0,0 +1,455 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Engine and plant trials" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.1: indicated_and_brake_output_mechanical_efficiency_and_energy_balance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.1');\n", +"\n", +"// aim : To determine\n", +"// the indicated and brake output and the mechanicl efficiency\n", +"// draw up an overall energy balance and as % age\n", +"\n", +"// given values\n", +"h = 21;// height of indicator diagram, [mm]\n", +"ic = 27;// indicator calibration, [kN/m^2 per mm]\n", +"sv = 14*10^-3;// swept volume of the cylinder;,[m^3]\n", +"N = 6.6;// speed of engine, [rev/s]\n", +"ebl = 77;// effective brake load, [kg]\n", +"ebr = .7;// effective brake radious, [m]\n", +"fc = .002;// fuel consumption, [kg/s]\n", +"CV = 44000;// calorific value of fuel, [kJ/kg]\n", +"cwc = .15;// cooling water circulation, [kg/s]\n", +"Ti = 38;// cooling water inlet temperature, [C]\n", +"To = 71;// cooling water outlet temperature, [C]\n", +"c = 4.18;// specific heat capacity of water, [kJ/kg]\n", +"eeg = 33.6;// energy to exhaust gases, [kJ/s]\n", +"g = 9.81;// gravitational acceleration, [m/s^2]\n", +"\n", +"// solution\n", +"PM = ic*h;// mean effective pressure, [kN/m^2]\n", +"LA = sv;// swept volume of the cylinder, [m^3]\n", +"ip = PM*LA*N/2;// indicated power,[kW]\n", +"T = ebl*g*ebr;// torque, [N*m]\n", +"bp = 2*%pi*N*T;// brake power, [W]\n", +"n_mech = bp/ip*10^-3;// mechanical efficiency\n", +"mprintf('\n The Indicated power is = %f kW\n',ip);\n", +"mprintf('\n The Brake power is = %f kW\n',bp*10^-3);\n", +"mprintf('\n The mechanical efficiency is = %f percent\n',n_mech);\n", +"\n", +"ef = CV*fc;// energy from fuel, [kJ/s]\n", +"eb = bp*10^-3;// energy to brake power,[kJ/s]\n", +"ec = cwc*c*(To-Ti);// energy to coolant,[kJ/s]\n", +"es = ef-(eb+ec+eeg);// energy to surrounding,[kJ/s]\n", +"\n", +"disp('Energy can be tabulated as :-');\n", +"disp('----------------------------------------------------------------------------------------------------');\n", +"disp(' kJ/s Percentage ')\n", +"disp('----------------------------------------------------------------------------------------------------');\n", +"mprintf('\n Energy from fuel %f %f\n Energy to brake power %f %f\n Energy to coolant %f %f\n Energy to exhaust %f %f\n Energy to suroundings,etc. %f %f\n',ef,ef/ef*100,eb,eb/ef*100,ec,ec/ef*100,eeg,eeg/ef*100,es,es/ef*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2: EX17_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.2');\n", +"\n", +"// aim : To determine\n", +"// (a) bp\n", +"// (b) ip\n", +"// (c) mechanical efficiency\n", +"// (d) indicated thermal efficiency\n", +"// (e) brake specific steam consumption\n", +"// (f) draw up complete energy account for the test one-minute basis taking 0 C as datum\n", +"\n", +"// given values\n", +"d = 200*10^-3;// cylinder diameter, [mm]\n", +"L = 250*10^-3;// stroke, [mm]\n", +"N = 5;// speed, [rev/s]\n", +"r = .75/2;// effective radious of brake wheel, [m]\n", +"Ps = 800;// stop valve pressure, [kN/m^2]\n", +"x = .97;// dryness fraction of steam\n", +"BL = 136;// brake load, [kg]\n", +"SL = 90;// spring balance load, [N]\n", +"PM = 232;// mean effective pressure, [kN/m^2]\n", +"Pc = 10;// condenser pressure, [kN/m^2]\n", +"m_dot = 3.36;// steam consumption, [kg/min]\n", +"CC = 113;// condenser cooling water, [kg/min]\n", +"Tr = 11;// temperature rise of condenser cooling water, [K]\n", +"Tc = 38;// condensate temperature, [C]\n", +"C = 4.18;// heat capacity of water, [kJ/kg K]\n", +"g = 9.81;// gravitational acceleration, [m/s^2]\n", +"\n", +"// solution\n", +"// from steam table\n", +"// at 800 kN/m^2\n", +"tf1 = 170.4;// saturation temperature, [C]\n", +"hf1 = 720.9;// [kJ/kg]\n", +"hfg1 = 2046.5;// [kJ/kg]\n", +"hg1 = 2767.5;// [kJ/kg]\n", +"vg1 = .2403;// [m^3/kg]\n", +"\n", +"// at 10 kN/m^2\n", +"tf2 = 45.8;// saturation temperature, [C]\n", +"hf2 = 191.8;// [kJ/kg]\n", +"hfg2 = 2392.9;// [kJ/kg]\n", +"hg2 = 2584.8;// [kJ/kg]\n", +"vg2 = 14.67;// [m^3/kg]\n", +"\n", +"// (a)\n", +"T = (BL*g-SL)*r;// torque, [Nm]\n", +"bp = 2*%pi*N*T*10^-3;// brake power,[W]\n", +"mprintf('\n (a) The brake power is = %f kW\n',bp);\n", +"\n", +"// (b)\n", +"A = %pi*d^2/4;// area, [m^2]\n", +"ip = PM*L*A*N*2;// double-acting so*2, [kW]\n", +"mprintf('\n (b) The indicated power is = %f kW\n',ip);\n", +"\n", +"// (c)\n", +"n_mec = bp/ip;// mechanical efficiency\n", +"mprintf('\n (c) The mechanical efficiency is = %f percent\n',n_mec*100);\n", +"\n", +"// (d)\n", +"h = hf1+x*hfg1;// [kJ/kg]\n", +"hf = hf2;\n", +"ITE = ip/((m_dot/60)*(h-hf));// indicated thermal efficiency\n", +"mprintf('\n (d) The indicated thermal efficiency is = %f percent\n',ITE*100);\n", +"// (e)\n", +"Bsc=m_dot*60/bp;// brake specific steam consumption, [kg/kWh]\n", +"mprintf('\n (e) The brake steam consumption is = %f kg/kWh\n',Bsc);\n", +"\n", +"// (f)\n", +"// energy balanvce reckoned from 0 C\n", +"Es = m_dot*h;// energy supplied, [kJ]\n", +"Eb = bp*60;// energy to bp, [kJ]\n", +"Ecc = CC*C*Tr;// energy to condensate cooling water, [kJ]\n", +"Ec = m_dot*C*Tc;// energy to condensate, [kJ]\n", +"Ese = Es-Eb-Ecc-Ec;// energy to surrounding,etc, [kJ]\n", +"\n", +"mprintf('\n (f) Energy supplied/min is = %f kJ\n',Es);\n", +"\n", +"mprintf('\n Energy to bp/min is = %f kJ\n',Eb);\n", +"mprintf('\n Energy to condenser cooling water/min is = %f kJ\n',Ecc);\n", +"mprintf('\n Energy to condensate/min is = %f kJ\n',Ec);\n", +"mprintf('\n Energy to surrounding, etc/min is = %f kJ\n',Ese);\n", +"\n", +"// answer in the book is misprinted\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3: brake_power_fuel_consumption_thermal_efficiency_and_energy_balance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the brake power\n", +"// (b) the brake specific fuel consumption\n", +"// (c) the indicated thermal efficiency\n", +"// (d) the energy balance, expressing the various items\n", +"\n", +"// given values\n", +"t = 30;// duration of trial, [min]\n", +"N = 1750;// speed of engine, [rev/min]\n", +"T = 330;// brake torque, [Nm]\n", +"mf = 9.35;// fuel consumption, [kg]\n", +"CV = 42300;// calorific value of fuel, [kJ/kg]\n", +"cwc = 483;// jacket cooling water circulation, [kg]\n", +"Ti = 17;// inlet temperature, [C]\n", +"To = 77;// outlet temperature, [C]\n", +"ma = 182;// air consumption, [kg]\n", +"Te = 486;// exhaust temperature, [C]\n", +"Ta = 17;// atmospheric temperature, [C]\n", +"n_mec = .83;// mechanical efficiency\n", +"c = 1.25;// mean specific heat capacity of exhaust gas, [kJ/kg K]\n", +"C = 4.18;// specific heat capacity, [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"bp = 2*%pi*N*T/60*10^-3;// brake power, [kW]\n", +"mprintf('\n (a) The Brake power is = %f kW\n',bp);\n", +"\n", +"// (b)\n", +"bsf = mf*2/bp;//brake specific fuel consumption, [kg/kWh]\n", +"mprintf('\n (b) The brake specific fuel consumption is = %f kg/kWh\n',bsf);\n", +"\n", +"// (c)\n", +"ip = bp/n_mec;// indicated power, [kW]\n", +"ITE = ip/(2*mf*CV/3600);// indicated thermal efficiency\n", +"mprintf('\n (c) The indicated thermal efficiency is = %f percent\n',ITE*100);\n", +"\n", +"// (d)\n", +"// taking basis one minute \n", +"ef = CV*mf/30;// energy from fuel, [kJ]\n", +"eb = bp*60;// energy to brake power,[kJ]\n", +"ec = cwc/30*C*(To-Ti);// energy to cooling water,[kJ]\n", +"ee = (ma+mf)/30*c*(Te-Ta);// energy to exhaust, [kJ]\n", +"es = ef-(eb+ec+ee);// energy to surrounding,etc,[kJ]\n", +"\n", +"mprintf('\n (d) Energy from fuel is = %f kJ\n',ef);\n", +"mprintf('\n Energy to brake power is = %f kJ\n',eb);\n", +"mprintf('\n Energy to cooling water is = %f kJ\n',ec);\n", +"mprintf('\n Energy to exhaust is = %f kJ\n',ee);\n", +"mprintf('\n Energy to surrounding, etc is = %f kJ\n',es);\n", +" \n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4: indicated_power_and_mechanical_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.4');\n", +"\n", +"// aim : To determine\n", +"// (a) the indicated power of the engine\n", +"// (b) the mechanical efficiency of the engine\n", +"\n", +"// given values\n", +"bp = 52;// brake power output, [kW]\n", +"bp1 = 40.5;// brake power of cylinder cut1, [kW]\n", +"bp2 = 40.2;// brake power of cylinder cut2, [kW]\n", +"bp3 = 40.1;// brake power of cylinder cut3, [kW]\n", +"bp4 = 40.6;// brake power of cylinder cut4, [kW]\n", +"bp5 = 40.7;// brake power of cylinder cut5, [kW]\n", +"bp6 = 40.0;// brake power of cylinder cut6, [kW]\n", +"\n", +"// sollution\n", +"ip1 = bp-bp1;// indicated power of cylinder cut1, [kW]\n", +"ip2 = bp-bp2;// indicated power of cylinder cut2, [kW]\n", +"ip3 = bp-bp3;// indicated power of cylinder cut3, [kW]\n", +"ip4 = bp-bp4;// indicated power of cylinder cut4, [kW]\n", +"ip5 = bp-bp5;// indicated power of cylinder cut5, [kW]\n", +"ip6 = bp-bp6;// indicated power of cylinder cut6, [kW]\n", +"\n", +"ip = ip1+ip2+ip3+ip4+ip5+ip6;// indicated power of engine,[kW]\n", +"mprintf('\n (a) The indicated power of the engine is = %f kW\n',ip);\n", +"\n", +"// (b)\n", +"n_mec = bp/ip;// mechanical efficiency\n", +"mprintf('\n (b) The mechanical efficiency of the engine is = %f percent\n',n_mec*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5: brake_power_indicated_power_mechanical_efficiency_and_energy_balance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.5');\n", +"\n", +"// aim : To determine\n", +"// the brake power,indicated power and mechanicl efficiency\n", +"// draw up an energy balance and as % age of the energy supplied\n", +"\n", +"// given values\n", +"N = 50;// speed, [rev/s]\n", +"BL = 267;// break load.,[N]\n", +"BL1 = 178;// break load of cylinder cut1, [N]\n", +"BL2 = 187;// break load of cylinder cut2, [N]\n", +"BL3 = 182;// break load of cylinder cut3, [N]\n", +"BL4 = 182;// break load of cylinder cut4, [N]\n", +"\n", +"FC = .568/130;// fuel consumption, [L/s]\n", +"s = .72;// specific gravity of fuel\n", +"CV = 43000;// calorific value of fuel, [kJ/kg]\n", +"\n", +"Te = 760;// exhaust temperature, [C]\n", +"c = 1.015;// specific heat capacity of exhaust gas, [kJ/kg K]\n", +"Ti = 18;// cooling water inlet temperature, [C]\n", +"To = 56;// cooling water outlet temperature, [C]\n", +"mw = .28;// cooling water flow rate, [kg/s]\n", +"Ta = 21;// ambient tempearture, [C]\n", +"C = 4.18;// specific heat capacity of cooling water, [kJ/kg K]\n", +"\n", +"// solution\n", +"bp = BL*N/455;// brake power of engine, [kW]\n", +"bp1 = BL1*N/455;// brake power of cylinder cut1, [kW]\n", +"i1 = bp-bp1;// indicated power of cylinder cut1, [kW]\n", +"bp2 = BL2*N/455;// brake power of cylinder cut2, [kW]\n", +"i2 = bp-bp2;// indicated power of cylinder cut2, [kW]\n", +"bp3 = BL3*N/455;// brake power of cylinder cut3, [kW]\n", +"i3 = bp-bp3;// indicated power of cylinder cut3, [kW]\n", +"bp4 = BL4*N/455;// brake power of cylinder cut4, [kW]\n", +"i4 = bp-bp4;// indicated power of cylinder cut4, [kW]\n", +"\n", +"ip = i1+i2+i3+i4;// indicated power of engine, [kW]\n", +"n_mec = bp/ip;// mechanical efficiency\n", +"\n", +"mprintf('\n The Brake power is = %f kW\n',bp);\n", +"mprintf('\n The Indicated power is = %f kW\n',ip);\n", +"mprintf('\n The mechanical efficiency is = %f percent\n',n_mec*100);\n", +"\n", +"mf = FC*s;// mass of fuel/s, [kg]\n", +"ef = CV*mf;// energy from fuel/s, [kJ]\n", +"me = 15*mf;// mass of exhaust/s,[kg],(given in condition)\n", +"ee = me*c*(Te-Ta);// energy to exhaust/s,[kJ]\n", +"ec = mw*C*(To-Ti);// energy to cooling water/s,[kJ]\n", +"es = ef-(ee+ec+bp);// energy to surrounding,etc/s,[kJ]\n", +"\n", +"disp('Energy can be tabulated as :-');\n", +"disp('----------------------------------------------------------------------------------------------------');\n", +"disp(' kJ/s Percentage ')\n", +"disp('----------------------------------------------------------------------------------------------------');\n", +"mprintf('\n Energy from fuel %f %f\n Energy to brake power %f %f\n Energy to exhaust %f %f\n Energy to coolant %f %f\n Energy to suroundings,etc. %f %f\n',ef,ef/ef*100,bp,bp/ef*100,ee,ee/ef*100,ec,ec/ef*100,es,es/ef*100);\n", +"\n", +"// there is minor variation in the result reported in the book\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6: brake_power_fuel_consumption_and_thermal_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 17.6');\n", +"\n", +"// aim : To determine \n", +"// (a) the break power of engine\n", +"// (b) the fuel consumption of the engine\n", +"// (c) the brake thermal efficiency of the engine\n", +"\n", +"// given values\n", +"d = 850*10^-3;// bore , [m]\n", +"L = 2200*10^-3;// stroke, [m]\n", +"PMb = 15;// BMEP of cylinder, [bar]\n", +"N = 95/60;// speed of engine, [rev/s]\n", +"sfc = .2;// specific fuel oil consumption, [kg/kWh]\n", +"CV = 43000;// calorific value of the fuel oil, [kJ/kg]\n", +"\n", +"// solution\n", +"// (a)\n", +"A = %pi*d^2/4;// area, [m^2]\n", +"bp = PMb*L*A*N*8/10;// brake power,[MW]\n", +"mprintf('\n (a) The brake power is = %f MW\n',bp);\n", +"\n", +" // (b)\n", +" FC = bp*sfc;// fuel consumption, [kg/h]\n", +" mprintf('\n (b) The fuel consumption is = %f tonne/h\n',FC);\n", +" \n", +" // (c)\n", +" mf = FC/3600;// fuel used, [kg/s]\n", +" n_the = bp/(mf*CV);// brake thermal efficiency\n", +" mprintf('\n (c) The brake thermal efficiency is = %f percent\n',n_the*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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/18-Refrigeration.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/18-Refrigeration.ipynb new file mode 100644 index 0000000..689c0f3 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/18-Refrigeration.ipynb @@ -0,0 +1,182 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Refrigeration" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1: coefficient_of_performance_mass_flow_and_cooling_water_requirement.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 18.1');\n", +"\n", +"// aim : To determine\n", +"// (a) the coefficient of performance\n", +"// (b) the mass flow of the refrigerant\n", +"// (c) the cooling water required by the condenser\n", +"\n", +"// given values\n", +"P1 = 462.47;// pressure limit, [kN/m^2]\n", +"P3 = 1785.90;// pressure limit, [kN/m^2]\n", +"T2 = 273+59;// entering saturation temperature, [K]\n", +"T5 = 273+32;// exit temperature of condenser, [K]\n", +"d = 75*10^-3;// bore, [m]\n", +"L = d;// stroke, [m]\n", +"N = 8;// engine speed, [rev/s]\n", +"VE = .8;// olumetric efficiency\n", +"cpL = 1.32;// heat capacity of liquid, [kJ/kg K]\n", +"c = 4.187;// heat capacity of water, [kj/kg K]\n", +"\n", +"// solution\n", +"// from given table\n", +"// at P1\n", +"h1 = 231.4;// specific enthalpy, [kJ/kg]\n", +"s1 = .8614;// specific entropy,[ kJ/kg K\n", +"v1 = .04573;// specific volume, [m^3/kg]\n", +"\n", +"// at P3\n", +"h3 = 246.4;// specific enthalpy, [kJ/kg]\n", +"s3 = .8093;// specific entropy,[ kJ/kg K\n", +"v3 = .04573;// specific volume, [m^3/kg]\n", +"T3= 273+40;// saturation temperature, [K]\n", +"h4 = 99.27;// specific enthalpy, [kJ/kg]\n", +"// (a)\n", +"s2 = s1;// specific entropy, [kJ/kg k]\n", +"// using s2=s3+cpv*log(T2/T3)\n", +"cpv = (s2-s3)/log(T2/T3);// heat capacity, [kj/kg k]\n", +"\n", +"// from Fig.18.8\n", +"T4 = T3;\n", +"h2 = h3+cpv*(T2-T3);// specific enthalpy, [kJ/kg]\n", +"h5 = h4-cpL*(T4-T5);// specific enthalpy, [kJ/kg]\n", +"h6 = h5;\n", +"COP = (h1-h6)/(h2-h1);// coefficient of performance\n", +"mprintf('\n (a) The coefficient of performance of the refrigerator is = %f\n',COP);\n", +"\n", +"// (b)\n", +"SV = %pi/4*d^2*L;// swept volume of compressor/rev, [m^3]\n", +"ESV = SV*VE*N*3600;// effective swept volume/h, [m^3]\n", +"m = ESV/v1;// mass flow of refrigerant/h,[kg]\n", +"mprintf('\n (b) The mass flow of refrigerant/h is = %f kg\n',m);\n", +"\n", +"// (c)\n", +"dT = 12;// temperature limit, [C]\n", +"Q = m*(h2-h5);// heat transfer in condenser/h, [kJ]\n", +"// using Q=m_dot*c*dT, so\n", +"m_dot = Q/(c*dT);// mass flow of water required, [kg/h]\n", +"mprintf('\n (c) The mass flow of water required is = %f kg/h\n',m_dot);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.2: mass_flow_dryness_fraction_power_and_ratio_of_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 18.2');\n", +"\n", +"// aim : To determine\n", +"// (a) the mass flow of R401\n", +"// (b) the dryness fraction of R401 at the entry to the evaporator\n", +"// (c) the power of driving motor\n", +"// (d) the ratio of heat transferred from condenser to the power required to the motor\n", +"\n", +"// given values\n", +"P1 = 411.2;// pressure limit, [kN/m^2]\n", +"P3 = 1118.9;// pressure limit, [kN/m^2]\n", +"Q = 100*10^3;// heat transfer from the condenser,[kJ/h]\n", +"T2 = 273+60;// entering saturation temperature, [K]\n", +"\n", +"// given\n", +"// from given table\n", +"// at P1\n", +"h1 = 409.3;// specific enthalpy, [kJ/kg]\n", +"s1 = 1.7431;// specific entropy,[ kJ/kg K\n", +"\n", +"// at P3\n", +"h3 = 426.4;// specific enthalpy, [kJ/kg]\n", +"s3 = 1.7192;// specific entropy,[ kJ/kg K\n", +"T3 = 273+50;// saturation temperature, [K]\n", +"h4 = 265.5;// specific enthalpy, [kJ/kg]\n", +"// (a)\n", +"s2 = s1;// specific entropy, [kJ/kg k]\n", +"// using s2=s3+cpv*log(T2/T3)\n", +"cpv = (s2-s3)/log(T2/T3);// heat capacity, [kj/kg k]\n", +"\n", +"// from Fig.18.8\n", +"h2 = h3+cpv*(T2-T3);// specific enthalpy, [kJ/kg]\n", +"Qc = h2-h4;// heat transfer from condenser, [kJ/kg]\n", +"mR401 = Q/Qc;// mass flow of R401, [kg]\n", +" mprintf('\n (a) The mass flow of R401 is = %f kg/h\n',mR401);\n", +"\n", +"// (b)\n", +"hf1 = 219;// specific enthalpy, [kJ/kg]\n", +"h5 = h4;\n", +"// using h5=hf1+s5*(h1-hf1),so\n", +"x5 = (h5-hf1)/(h1-hf1);// dryness fraction\n", +"mprintf('\n (b) The dryness fraction of R401 at the entry to the evaporator is = %f\n',x5);\n", +"\n", +"// (c)\n", +"P = mR401*(h2-h1)/3600/.7;// power to driving motor, [kW]\n", +" mprintf('\n (c) The power to driving motor is = %f kW\n',P);\n", +"\n", +"// (d)\n", +"r = Q/3600/P;// ratio\n", +"mprintf('\n (d) The ratio of heat transferred from condenser to the power required to the motor is = %f : 1\n',r);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/19-Psychrometry.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/19-Psychrometry.ipynb new file mode 100644 index 0000000..3e042c9 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/19-Psychrometry.ipynb @@ -0,0 +1,308 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Psychrometry" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1: moisture_content.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 19.1');\n", +"\n", +"// aim : To compare the moisture content and the true specific volumes of atmosphere air \n", +"// (a) temperature is 12 C and the air is saturaded\n", +"// (b) temperature is 31 C and air is .75 saturated\n", +"\n", +"// Given values\n", +"P_atm = 101.4;// atmospheric pressure, [kN/m^2]\n", +"R = .287;// [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"T = 273+12;// air temperature, [K]\n", +"// From steam table at 12 C\n", +"p = 1.4;// [kN/m^2]\n", +"vg = 93.9;// [m^3/kg]\n", +"pa = P_atm-p;// partial pressure of the dry air, [kN/m^2]\n", +"va = R*T/pa;// [m^3/kg]\n", +"\n", +"mw = va/vg;// mass of water vapor in the air,[kg]\n", +"v = va/(1+mw);// specific volume of humid air, [m^3/kg]\n", +"\n", +"mprintf('\n (a) The mass of water vapor in the humid air is = %f kg\n',mw);\n", +"mprintf('\n The specific volume of humid air is = %f m^3/kg\n',v);\n", +"\n", +"// (b)\n", +"x = .75;// dryness fraction\n", +"T = 273+31;// air temperature, [K]\n", +"// From steam table\n", +"p = 4.5;// [kN/m^2]\n", +"vg = 31.1;// [m^3/kg]\n", +"pa = P_atm-p;// [kN/m^2]\n", +"va = R*T/pa;// [m^3/kg]\n", +"mw1= va/vg;// mass of water vapor in the air, [kg]\n", +"mw_actual = mw1*x;// actual mass of vapor, [kg]\n", +"v = va/(1+mw_actual);// true specific volume of humid air,[m^3/kg] \n", +"\n", +"mprintf('\n (b) The mass of water vapor in the humid air is = %f kg\n',mw1);\n", +"mprintf('\n The specific volume of humid air is = %f m^3/kg\n',v);\n", +"\n", +"ewv = mw_actual/mw ;\n", +"mprintf('\n On the warm day the air conteains %f times the mass of water vapor as on the cool day \n',ewv);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2: partial_pressures_specific_humidity_and_composition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 19.2');\n", +"\n", +"// aim : To determine\n", +"// (a) the partial pressures of the vapor and the dry air\n", +"// (b) the specific humidity of the mixture\n", +"// (c) the composition of the mixture\n", +"\n", +"// Given values\n", +"phi = .65;// Relative humidity\n", +"T = 2733+20;// temperature, [K]\n", +"p = 100;// barometric pressure, [kN/m^2]\n", +"\n", +"// solution\n", +"// (a)\n", +"// From the steam table at 20 C\n", +"pg = 2.34;// [kN/m^2]\n", +"ps = phi*pg;// partial pressure of vapor, [kN/m^2]\n", +"pa = p-ps;// partial pressure of dry air, [kN/m^2]\n", +"mprintf('\n (a) The partial pressure of vapor is = %f kN/m^2\n',ps);\n", +"mprintf('\n The partial pressure of dry air is = %f kN/m^2\n',pa);\n", +"\n", +"// (b)\n", +"// from equation [15]\n", +"omega = .622*ps/(p-ps);// specific humidity of the mixture\n", +"mprintf('\n (b) The specific humidity of the mixture is = %f kg/kg dry air\n',omega);\n", +"\n", +"// (c)\n", +"// using eqn [1] from section 19.2\n", +"y = 1/(1+omega);// composition of the mixture\n", +"mprintf('\n (c) The composition of the mixture is = %f\n',y);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3: specific_humidity_dew_point_degree_of_superheat_mass_of_condensate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 19.3');\n", +"\n", +"// aim : To determine\n", +"// (a) the specific humidity\n", +"// (b) the dew point\n", +"// (c) the degree of superheat of the superheated vapor\n", +"// (d) the mass of condensate formed per kg of dry air if the moist air is cooled to 12 C\n", +"\n", +"// Given values\n", +"t = 25;// C\n", +"T = 273+25;// moist air temperature, [K]\n", +"phi = .6;// relative humidity\n", +"p = 101.3;// barometric pressure, [kN/m^2]\n", +"R = .287;// [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"// From steam table at 25 C\n", +"pg = 3.17;// [kN/m^2]\n", +"ps = phi*pg;// partial pressure of the vapor, [kN/m^2]\n", +"omega = .622*ps/(p-ps);// the specific humidity of air\n", +"\n", +"mprintf('\n (a) The specific humidity is = %f kg/kg air\n',omega);\n", +"\n", +"// (b)\n", +"// Dew point is saturated temperature at ps is,\n", +"t_dew = 16+2*(1.092-1.817)/(2.062-1.817);// [C]\n", +"mprintf('\n (b) The dew point is = %f C\n',t_dew);\n", +"\n", +"// (c)\n", +"Dos = t-t_dew;// degree of superheat, [C]\n", +"mprintf('\n (c) The degree of superheat is = %f C\n',Dos);\n", +"\n", +"// (d)\n", +"// at 25 C\n", +"pa = p-ps;// [kN/m^2]\n", +"va = R*T/pa;// [m^3/kg]\n", +"// at 16.69 C\n", +"vg = 73.4-(73.4-65.1)*.69/2;// [m^3/kg]\n", +"ms1= va/vg; \n", +"// at 12 C\n", +"vg = 93.8;// [m^3/kg]\n", +"ms2 = va/vg;\n", +"\n", +"m = ms1-ms2;// mas of condensate\n", +"mprintf('\n (d) The mass of condensate is = %f kg/kg dry air\n',m);\n", +"\n", +"// there is calculation mistake in the book so answer is no matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4: volume_mass_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp(' Example 19.4');\n", +"\n", +"// aim : To determine\n", +"// (a) the volume of external saturated air\n", +"// (b) the mass of air\n", +"// (c) the heat transfer\n", +"// (d) the heat transfer required by the combind water vapour\n", +"\n", +"// given values\n", +"Vb = 56000;// volume of building, [m^3]\n", +"T2 = 273+20;// temperature of air in thebuilding, [K]\n", +"phi = .6;// relative humidity\n", +"T1 = 8+273;// external air saturated temperature, [K]\n", +"p0 = 101.3;// atmospheric pressure, [kN/m^2]\n", +"cp = 2.093;// heat capacity of saturated steam, [kJ/kg K]\n", +"R = .287;// gas constant, [kJ/kg K]\n", +"\n", +"// solution\n", +"// from steam table at 20 C saturation pressure of steam is,\n", +"pg = 2.34;// [kN/m^2]\n", +"\n", +"// (a)\n", +"pvap = phi*pg;// partial pressure of vapor, [kN/m^2] \n", +"P = p0-pvap;// partial pressure of air, [kN/m^2]\n", +"V = 2*Vb;// air required, [m^3]\n", +"// at 8 C saturation pressure ia\n", +"pvap = 1.072;// [kN/m^2]\n", +"P2 = p0-pvap;// partial pressure of entry at 8 C, [kN/m^2]\n", +"\n", +"// using P1*V1/T1=P2*V2/T2;\n", +"V2 = P*V*T1/(T2*P2);// air required at 8 C, [m^3/h]\n", +"mprintf('\n (a) The volume of air required is = %f m^3/h\n',V2);\n", +"\n", +"// (b)\n", +"// assuming\n", +"pg = 1.401;// pressure, [kN/m^2]\n", +"Tg = 273+12;// [K]\n", +"vg = 93.8;// [m^3/kg]\n", +"// at constant pressure\n", +"v = vg*T2/Tg;// volume[m^3/kg]\n", +"mv = V/v;// mass of vapor in building at 20 C, [kg/h]\n", +"// from steam table at 8 C\n", +"vg2 = 121;// [m^3/kg]\n", +"mve = V2/vg2;// mass of vapor supplied with saturated entry air, [kg/h]\n", +"mw = mv-mve;// mass of water added, [kg/h]\n", +"mprintf('\n (b) The mass of water added is = %f kg/h\n ',mw);\n", +"\n", +"// (c)\n", +"// for perfect gas\n", +"m = P2*V2/(R*T1);// [kg/h]\n", +"Cp = .287;// heat capacity, [kJ/kg K]\n", +"Q = m*Cp*(T2-T1);// heat transfer by dry air,[kJ/h]\n", +"mprintf('\n (c) The heat transfer required by dry air is = %f MJ/h\n',Q*10^-3);\n", +"\n", +"// (d)\n", +"// from steam table\n", +"h1 = 2516.2;// specific enthalpy of saturated vapor at 8 C,[kJ/kg]\n", +"hs = 2523.6;// specific enthalpy of saturated vapor at 20 C, [kJ/kg]\n", +"h2 = hs+cp*(T2-T1);// specific enthalpy of vapor at 20 c, [kJ/kg]\n", +"Q1 = mve*(h2-h1);// heat transfer required for vapor, [kJ]\n", +"\n", +"// again from steam table\n", +"hf1 = 33.6;// [kJ/kg]\n", +"hg3 = 2538.2;// [kJ/kg]\n", +"Q2 = mw*(hg3-hf1);// heat transfer required for water, [kJ/h]\n", +"Qt = Q1+Q2;// total heat transfer, [kJ/h]\n", +"mprintf('\n (d) The heat transferred required for vapor+supply water is = %f MJ/h\n',Qt*10^-3);\n", +"\n", +"// there is minor variation in the answer reported in the book\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/2-Systems.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/2-Systems.ipynb new file mode 100644 index 0000000..13741d6 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/2-Systems.ipynb @@ -0,0 +1,266 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Systems" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Change_in_total_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.1');\n", +"// Given values\n", +"Q = 2500; // Heat transferred into the system, [kJ]\n", +"W = 1400; // Work transferred from the system, [kJ]\n", +" \n", +"// solution\n", +"// since process carried out on a closed system, so using equation [4]\n", +"del_E = Q-W; // Change in total energy, [kJ]\n", +"mprintf('\n The Change in total energy is, del_E = %f kJ\n',del_E);\n", +"if(del_E>0)\n", +" disp('Since del_E is positive, so there is an increase in total enery')\n", +"else\n", +" disp('Since del_E is negative, so there is an decrease in total enery')\n", +"end\n", +"// There is mistake in the book's results unit\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Heat_transferred.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.2');\n", +"// Given values\n", +"del_E = 3500; // Increase in total energy of the system, [kJ]\n", +"W = -4200; // Work transfer into the system, [kJ]\n", +"// solution\n", +"// since process carried out on a closed system, so using equation [3]\n", +"Q = del_E+W;// [kJ]\n", +"mprintf('\n The Heat transfer is, Q = %f kJ \n',Q);\n", +"if(Q>0)\n", +" disp('Since Q>0, so heat is transferred into the system')\n", +"else\n", +" disp('Since Q<0, so heat is transferred from the system')\n", +"end\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.3');\n", +"// Given values\n", +"Q = -150; // Heat transferred out of the system, [kJ/kg]\n", +"del_u = -400; // Internal energy decreased ,[kJ/kg]\n", +"// solution\n", +"// using equation [3],the non flow energy equation\n", +"// Q=del_u+W\n", +"W = Q-del_u; // [kJ/kg]\n", +"mprintf('\n The Work done is, W = %f kJ/kg \n',W);\n", +"if(W>0)\n", +" disp('Since W>0, so Work done by the engine per kilogram of working substance')\n", +"else\n", +" disp('Since <0, so Work done on the engine per kilogram of working substance')\n", +"end\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Power_of_the_system.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.4');\n", +"// Given values\n", +"m_dot = 4; // fluid flow rate, [kg/s]\n", +"Q = -40; // Heat loss to the surrounding, [kJ/kg]\n", +"// At inlet \n", +"P1 = 600; // pressure ,[kn/m^2]\n", +"C1 = 220; // velocity ,[m/s]\n", +"u1 = 2200; // internal energy, [kJ/kg]\n", +"v1 = .42; // specific volume, [m^3/kg]\n", +"// At outlet\n", +"P2 = 150; // pressure, [kN/m^2]\n", +"C2 = 145; // velocity, [m/s]\n", +"u2 = 1650; // internal energy, [kJ/kg]\n", +"v2 = 1.5; // specific volume, [m^3/kg]\n", +"// solution\n", +"// for steady flow energy equation for the open system is given by\n", +"// u1+P1*v1+C1^2/2+Q=u2+P2*v2+C2^2/2+W\n", +"// hence\n", +"W = (u1-u2)+(P1*v1-P2*v2)+(C1^2/2-C2^2/2)*10^-3+Q; // [kJ/kg]\n", +"mprintf('\n workdone is, W = %f kJ/kg ',W);\n", +"if(W>0)\n", +" disp('Since W>0, so Power is output from the system')\n", +"else\n", +" disp('Since <0, so Power is input to the system')\n", +"end\n", +" \n", +"// Hence\n", +"P_out = W*m_dot; // power out put from the system, [kW]\n", +"mprintf('\n The power output from the system is = %f kW \n',P_out);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Temperature_rise.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.5');\n", +"// Given values\n", +"del_P = 154.45; // pressure difference across the die, [MN/m^2]\n", +"rho = 11360; // Density of the lead, [kg/m^3]\n", +"c = 130; // specific heat capacity of the lead, [J/kg*K]\n", +"// solution\n", +"// since there is no cooling and no externel work is done, so energy balane becomes\n", +"// P1*V1+U1=P2*V2+U2 ,so\n", +"// del_U=U2-U1=P1*V1-P2*V2\n", +"// also, for temperature rise, del_U=m*c*t, where, m is mass; c is specific heat capacity; and t is temperature rise\n", +"// Also given that lead is incompressible, so V1=V2=V and assuming one m^3 of lead\n", +"// using above equations\n", +"t = del_P/(rho*c)*10^6 ;// temperature rise [C]\n", +"mprintf('\n The temperature rise of the lead is = %f C\n',t);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Area_velocity_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 2.6');\n", +"// Given values\n", +"m_dot = 4.5; // mass flow rate of air, [kg/s]\n", +"Q = -40; // Heat transfer loss, [kJ/kg]\n", +"del_h = -200; // specific enthalpy reduce, [kJ/kg]\n", +"C1 = 90; // inlet velocity, [m/s]\n", +"v1 = .85; // inlet specific volume, [m^3/kg]\n", +"v2 = 1.45; // exit specific volume, [m^3/kg]\n", +"A2 = .038; // exit area of turbine, [m^2]\n", +"// solution\n", +"// part (a)\n", +"// At inlet, by equation[4], m_dot=A1*C1/v1\n", +"A1 = m_dot*v1/C1;//inlet area, [m^2]\n", +"mprintf('\n (a) The inlet area is, A1 = %f m^2 \n',A1);\n", +"// part (b), \n", +"// At outlet, since mass flow rate is same, so m_dot=A2*C2/v2, hence\n", +"C2 = m_dot*v2/A2; // Exit velocity,[m/s]\n", +"mprintf('\n (b) The exit velocity is, C2 = %f m/s \n',C2);\n", +"// part (c)\n", +"// using steady flow equation, h1+C1^2/2+Q=h2+C2^2/2+W\n", +"W = -del_h+(C1^2/2-C2^2/2)*10^-3+Q; // [kJ/kg]\n", +"// Hence power developed is\n", +"P = W*m_dot;// [kW]\n", +"mprintf('\n (c) The power developed by the turbine system is = %f kW \n',P);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/4-Steam_and_two_phase_systems.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/4-Steam_and_two_phase_systems.ipynb new file mode 100644 index 0000000..aa80cfc --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/4-Steam_and_two_phase_systems.ipynb @@ -0,0 +1,1096 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Steam and two phase systems" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: mass_of_steam_and_water.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 mass of steam entering the heater\n", +"// (b) the mass of water entering the heater\n", +"\n", +"// Given values\n", +"x = .95;// Dryness fraction\n", +"P = .7;// pressure,[MN/m^2]\n", +"d = 25;// internal diameter of heater,[mm]\n", +"C = 12; // steam velocity in the pipe,[m/s]\n", +"\n", +"// solution\n", +"// from steam table at .7 MN/m^2 pressure\n", +"hf = 697.1;// [kJ/kg]\n", +"hfg = 2064.9;// [kJ/kg]\n", +"hg = 2762.0; // [kJ/kg]\n", +"vg = .273; // [m^3/kg]\n", +"\n", +"// (a)\n", +"v = x*vg; // [m^3/kg]\n", +"ms_dot = %pi*(d*10^-3)^2*C*3600/(4*v);// mass of steam entering, [kg/h]\n", +"mprintf('\n (a) The mass of steam entering the heater is = %f kg/h \n',ms_dot);\n", +"\n", +"// (b)\n", +"h = hf+x*hfg;// specific enthalpy of steam entering heater,[kJ/kg]\n", +"// again from steam tables\n", +"hf1 = 376.8;// [kJ/kg] at 90 C\n", +"hf2 = 79.8;// [kJ/kg] at 19 C\n", +"\n", +"// using energy balance,mw_dot*(hf1-hf2)=ms_dot*(h-hf1)\n", +"mw_dot = ms_dot*(h-hf1)/(hf1-hf2);// mass of water entering to heater,[kg/h]\n", +"\n", +"mprintf('\n (b) The mass of water entering the heater is = %f kg/h \n',mw_dot);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: change_of_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.11');\n", +"\n", +"// aim: To determine\n", +"// the change of internal energy\n", +"\n", +"// Given values\n", +"m = 1.5;// mass of steam,[kg]\n", +"P1 = 1;// initial pressure, [MN/m^2]\n", +"t = 225;// temperature, [C]\n", +"P2 = .28;// final pressure, [MN/m^2]\n", +"x = .9;// dryness fraction of steam at P2\n", +"\n", +"// solution\n", +"\n", +"// from steam table at P1\n", +"h1 = 2886;// [kJ/kg]\n", +"v1 = .2198; // [m^3/kg]\n", +"// hence\n", +"u1 = h1-P1*v1*10^3;// internal energy [kJ/kg]\n", +"\n", +"// at P2\n", +"hf2 = 551.4;// [kJ/kg]\n", +"hfg2 = 2170.1;// [kJ/kg]\n", +"vg2 = .646; // [m^3/kg]\n", +"// so\n", +"h2 = hf2+x*hfg2;// [kj/kg]\n", +"v2 = x*vg2;// [m^3/kg]\n", +"\n", +"// now\n", +"u2 = h2-P2*v2*10^3;// [kJ/kg]\n", +"\n", +"// hence change in specific internal energy is\n", +"del_u = u2-u1;// [kJ/kg]\n", +"\n", +"del_u = m*del_u;// [kJ];\n", +"mprintf('\n The change in internal energy is = %f kJ \n',del_u);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.12');\n", +"\n", +"// aim : To determine \n", +"// the dryness fraction of steam after throttling\n", +"\n", +"// given values\n", +"P1 = 1.4;// pressure before throttling, [MN/m^2]\n", +"x1 = .7;// dryness fraction before throttling\n", +"P2 = .11;// pressure after throttling, [MN/m^2]\n", +"\n", +"// solution\n", +"// from steam table\n", +"hf1 = 830.1;// [kJ/kg]\n", +"hfg1 = 1957.7;// [kJ/kg]\n", +"h1 = hf1 + x1*hfg1; // [kJ/kg]\n", +"\n", +"hf2 = 428.8;// [kJ/kg]\n", +"hfg2 = 2250.8;// [kJ/kg]\n", +"\n", +"// now for throttling,\n", +"// hf1+x1*hfg1=hf2+x2*hfg2; where x2 is dryness fraction after throttling\n", +"\n", +"x2=(h1-hf2)/hfg2; // final dryness fraction\n", +"\n", +"mprintf('\n Dryness fraction of steam after throttling is = %f \n',x2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: condition_of_steam_and_internal_diameter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.13');\n", +"\n", +"// aim : To determine \n", +"// the dryness fraction of steam \n", +"// and the internal diameter of the pipe\n", +"\n", +"// Given values\n", +"\n", +"// steam1\n", +"P1 = 2;// pressure before throttling, [MN/m^2]\n", +"t = 300;// temperature,[C]\n", +"ms1_dot = 2;// steam flow rate, [kg/s]\n", +"P2 = 800;// pressure after throttling, [kN/m^2]\n", +"\n", +"// steam2\n", +"P = 800;// pressure, [N/m^2]\n", +"x2 = .9;// dryness fraction\n", +"ms2_dot = 5; // [kg/s]\n", +"\n", +"// solution\n", +"// (a)\n", +"// from steam table specific enthalpy of steam1 before throttling is\n", +"hf1 = 3025;// [kJ/kg]\n", +"// for throttling process specific enthalpy will same so final specific enthalpy of steam1 is\n", +"hf2 = hf1;\n", +"// hence\n", +"h1 = ms1_dot*hf2;// [kJ/s]\n", +"\n", +"// calculation of specific enthalpy of steam2\n", +"hf2 = 720.9;// [kJ/kg]\n", +"hfg2 = 2046.5;// [kJ/kg]\n", +"// hence\n", +"h2 = hf2+x2*hfg2;// specific enthalpy, [kJ/kg]\n", +"h2 = ms2_dot*h2;// total enthalpy, [kJ/s]\n", +"\n", +"// after mixing\n", +"m_dot = ms1_dot+ms2_dot;// total mass of mixture,[kg/s]\n", +"h = h1+h2;// Total enthalpy of the mixture,[kJ/s]\n", +"h = h/7;// [kJ/kg]\n", +"\n", +"// At pressure 800 N/m^2 \n", +"hf = 720.9;// [kJ/kg]\n", +"hfg = 2046.5;// [kJ/kg]\n", +"// so total enthalpy is,hf+x*hfg, where x is dryness fraction of mixture and which is equal to h\n", +"// hence\n", +"x = (h-hf)/hfg;// dryness fraction after mixing\n", +"mprintf('\n (a) The condition of the resulting mixture is dry with dryness fraction = %f \n',x);\n", +"\n", +"// (b)\n", +"// Given\n", +"C = 15;// velocity, [m/s]\n", +"// from steam table\n", +"v = .1255;// [m^/kg]\n", +"A = ms1_dot*v/C;// area, [m^2]\n", +"// using ms1_dot = A*C/v, where A is cross section area in m^2 and\n", +"// A = %pi*d^2/4, where d is diameter of the pipe \n", +"\n", +"// calculation of d\n", +"d = sqrt(4*A/%pi); // diameter, [m]\n", +"\n", +"mprintf('\n (b) The internal diameter of the pipe is = %f mm \n',d*1000);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.14');\n", +"\n", +"// aim : To estimate \n", +"// the dryness fraction\n", +"\n", +"// Given values\n", +"M = 1.8;// mass of condensate, [kg]\n", +"m = .2;// water collected, [kg]\n", +"\n", +"// solution\n", +"x = M/(M+m);// formula for calculation of dryness fraction using seprating calorimeter\n", +"\n", +"mprintf(' \n The dryness fraction of the steam entering seprating calorimeter is = %f \n',x);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15: dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.15');\n", +"\n", +"// aim : To determine\n", +"// the dryness fraction of the steam at 2.2 MN/m^2\n", +"\n", +"// Given values\n", +"P1 = 2.2;// [MN/m^2]\n", +"P2 = .13;// [MN/m^2]\n", +"t2 = 112;// [C]\n", +"tf2 = 150;// temperature, [C]\n", +"\n", +"// solution\n", +"// from steam table, at 2.2 MN/m^2\n", +"// saturated steam at 2 MN/m^2 Pressure\n", +"hf1 = 931;// [kJ/kg]\n", +"hfg1 = 1870;// [kJ/kg]\n", +"hg1 = 2801;// [kJ/kg]\n", +"\n", +"// for superheated steam\n", +"// at .1 MN/m^2\n", +"hg2 = 2675;// [kJ/kg]\n", +"hg2_150 = 2777;// specific enthalpy at 150 C, [kJ/kg]\n", +"tf2 = 99.6;// saturation temperature, [C]\n", +"\n", +"// at .5 MN/m^2\n", +"hg3 = 2693;// [kJ/kg]\n", +"hg3_150 = 2773;// specific enthalpy at 150 C, [kJ/kg]\n", +"tf3 = 111.4;// saturation temperature, [C]\n", +"\n", +"Table_P_h1 = [[.1,.5];[hg2,hg3]];// where, P in MN/m^2 and h in [kJ/kg]\n", +"hg = interpln(Table_P_h1,.13);// specific entahlpy at .13 MN/m^2, [kJ/kg]\n", +"\n", +"Table_P_h2 = [[.1,.5];[hg2_150,hg3_150]];// where, P in MN/m^2 and h in [kJ/kg]\n", +"hg_150 = interpln(Table_P_h2,.13);// specific entahlpy at .13 MN/m^2 and 150 C, [kJ/kg]\n", +"\n", +"Table_P_tf = [[.1,.5];[tf2,tf3]];// where, P in MN/m^2 and h in [kJ/kg]\n", +"tf = interpln(Table_P_tf,.13);// saturation temperature, [C]\n", +"\n", +"// hence\n", +"h2 = hg+(hg_150-hg)/(t2-tf)/(tf2-tf);// specific enthalpy at .13 MN/m^2 and 112 C, [kJ/kg]\n", +"\n", +"// now since process is throttling so h2=h1\n", +"// and h1 = hf1+x1*hfg1, so\n", +"x1 = (h2-hf1)/hfg1;// dryness fraction\n", +"mprintf(' \n The dryness fraction of steam is = %f \n',x1);\n", +"\n", +"// There is a calculation mistake in book so answer is not matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16: minimum_dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.16');\n", +"\n", +"// aim : To determine \n", +"// the minimum dryness fraction of steam\n", +"\n", +"// Given values\n", +"P1 = 1.8;// testing pressure,[MN/m^2]\n", +"P2 = .11;// pressure after throttling,[MN/m^2]\n", +"\n", +"// solution\n", +"// from steam table\n", +"// at .11 MN/m^2 steam is completely dry and specific enthalpy is\n", +"hg = 2680;// [kJ/kg]\n", +"\n", +"// before throttling steam is wet, so specific enthalpy is=hf+x*hfg, where x is dryness fraction\n", +"// from steam table\n", +"hf = 885;// [kJ/kg]\n", +"hfg = 1912;// [kJ/kg]\n", +"\n", +"// now for throttling process,specific enthalpy will same before and after\n", +"// hence\n", +"x = (hg-hf)/hfg;\n", +"mprintf('\n The minimum dryness fraction of steam is x = %f \n',x);\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: mass_dryness_fraction_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.17');\n", +"\n", +"// aim : To determine the\n", +"// (a) mass of steam in the vessel\n", +"// (b) final dryness of the steam\n", +"// (c) amount of heat transferrred during the cooling process\n", +"\n", +"// Given values\n", +"V1 = .8;// [m^3]\n", +"P1 = 360;// [kN/m^2]\n", +"P2 = 200;// [kN/m^2]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// at 360 kN/m^2\n", +"vg1 = .510;// [m^3]\n", +"m = V1/vg1;// mass of steam,[kg]\n", +"mprintf('\n (a) The mass of steam in the vessel is = %f kg\n',m);\n", +"\n", +"// (b)\n", +"// at 200 kN/m^2\n", +"vg2 = .885;// [m^3/kg]\n", +"// the volume remains constant so\n", +"x = vg1/vg2;// final dryness fraction\n", +"mprintf('\n (b) The final dryness fraction of the steam is = %f \n',x);\n", +"\n", +"// (c)\n", +"// at 360 kN/m^2\n", +"h1 = 2732.9;// [kJ/kg]\n", +"// hence\n", +"u1 = h1-P1*vg1;// [kJ/kg]\n", +"\n", +"// at 200 kN/m^2\n", +"hf = 504.7;// [kJ/kg]\n", +"hfg=2201.6;//[kJ/kg]\n", +"// hence\n", +"h2 = hf+x*hfg;// [kJ/kg]\n", +"// now\n", +"u2 = h2-P2*vg1;// [kJ/kg]\n", +"// so\n", +"del_u = u2-u1;// [kJ/kg]\n", +"// from the first law of thermodynamics del_U+W=Q, \n", +"W = 0;// because volume is constant\n", +"del_U = m*del_u;// [kJ]\n", +"// hence\n", +"Q = del_U;// [kJ]\n", +"mprintf('\n (c) The amount of heat transferred during cooling process is = %f kJ \n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18: specific_heat.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.18');\n", +"\n", +"// aim : To determine\n", +"// the heat received by the steam per kilogram\n", +"\n", +"// Given values\n", +"// initial\n", +"P1 = 4;// pressure, [MN/m^2]\n", +"x1 = .95; // dryness fraction\n", +"\n", +"// final\n", +"t2 = 350;// temperature,[C]\n", +"\n", +"// solution\n", +"\n", +"// from steam table, at 4 MN/m^2 and x1=.95\n", +"hf = 1087.4;// [kJ/kg]\n", +"hfg = 1712.9;// [kJ/kg]\n", +"// hence\n", +"h1 = hf+x1*hfg;// [kJ/kg]\n", +"\n", +"// since pressure is kept constant ant temperature is raised so at this condition\n", +"h2 = 3095;// [kJ/kg]\n", +"\n", +"// so by energy balance\n", +"Q = h2-h1;// Heat received,[kJ/kg]\n", +"mprintf('\n The heat received by the steam is = %f kJ/kg \n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19: condition_of_steam.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.19');\n", +"\n", +"// aim : To determine the condition of the steam after \n", +"// (a) isothermal compression to half its initial volume,heat rejected\n", +"// (b) hyperbolic compression to half its initial volume\n", +"\n", +"// Given values\n", +"V1 = .3951;// initial volume,[m^3]\n", +"P1 = 1.5;// initial pressure,[MN/m^2]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// from steam table, at 1.5 MN/m^2 \n", +"hf1 = 844.7;// [kJ/kg]\n", +"hfg1 = 1945.2;// [kJ/kg]\n", +"hg1 = 2789.9;// [kJ/kg]\n", +"vg1 = .1317;// [m^3/kg]\n", +"\n", +"// calculation\n", +"m = V1/vg1;// mass of steam,[kg]\n", +"vg2b = vg1/2;// given,[m^3/kg](vg2b is actual specific volume before compression)\n", +"x1 = vg2b/vg1;// dryness fraction\n", +"h1 = m*(hf1+x1*hfg1);// [kJ]\n", +"Q = m*x1*hfg1;// heat loss,[kJ]\n", +"mprintf('\n (a) The Quantity of steam present is = %f kg \n',m);\n", +"mprintf('\n Dryness fraction is = %f \n',x1);\n", +"mprintf('\n The enthalpy is = %f kJ \n',h1);\n", +"mprintf('\n The heat loss is = %f kJ \n',Q);\n", +"\n", +"// (b)\n", +"V2 = V1/2;\n", +"// Given compression is according to the law PV=Constant,so\n", +"P2 = P1*V1/V2;// [MN/m^2]\n", +"// from steam table at P2\n", +"hf2 = 1008.4;// [kJ/kg]\n", +"hfg2 = 1793.9;// [kJ/kg]\n", +"hg2 = 2802.3;// [kJ/kg]\n", +"vg2 = .0666;// [m^3/kg]\n", +"\n", +"// calculation\n", +"x2 = vg2b/vg2;// dryness fraction\n", +"h2 = m*(hf2+x2*hfg2);// [kJ]\n", +"\n", +"mprintf('\n (b) The dryness fraction is = %f \n',x2);\n", +"mprintf('\n The enthalpy is = %f kJ\n',h2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: specific_enthalpies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.1');\n", +"\n", +"// aim : To determine\n", +"// the enthalpy\n", +"\n", +"// Given values\n", +"P = .50;// Pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"\n", +"// From steam tables, at given pressure\n", +"hf = 640.1;// specific liquid enthalpy ,[kJ/kg]\n", +"hfg = 2107.4;// specific enthalpy of evaporation ,[kJ/kg]\n", +"hg = 2747.5; // specific enthalpy of dry saturated steam ,[kJ/kg]\n", +"tf = 151.8; // saturation temperature,[C]\n", +"\n", +"mprintf('\n The specific liquid enthalpy is = %f kJ/kg \n',hf);\n", +"mprintf('\n The specific enthalpy of evaporation is = %f kJ/kg \n',hfg);\n", +"mprintf('\n The specific enthalpy of dry saturated steam is = %f kJ/kg \n',hg);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: mass_work_change_in_internal_energy_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.20');\n", +"\n", +"// aim : To determine the\n", +"// (a) mass of steam \n", +"// (b) work transfer\n", +"// (c) change of internal energy\n", +"// (d) heat exchange b/w the steam and surroundings\n", +"\n", +"// Given values\n", +"P1 = 2.1;// initial pressure,[MN/m^2]\n", +"x1 = .9;// dryness fraction\n", +"V1 = .427;// initial volume,[m^3]\n", +"P2 = .7;// final pressure,[MN/m^2]\n", +"// Given process is polytropic with\n", +"n = 1.25; // polytropic index\n", +"\n", +"// solution\n", +"// from steam table\n", +"\n", +"// at 2.1 MN/m^2\n", +"hf1 = 920.0;// [kJ/kg]\n", +"hfg1=1878.2;// [kJ/kg]\n", +"hg1=2798.2;// [kJ/kg]\n", +"vg1 = .0949;// [m^3/kg]\n", +"\n", +"// and at .7 MN/m^2\n", +"hf2 = 697.1;// [kJ/kg]\n", +"hfg2 = 2064.9;// [kJ/kg]\n", +"hg2 = 2762.0;// [kJ/kg]\n", +"vg2 = .273;// [m^3/kg]\n", +"\n", +"// (a)\n", +"v1 = x1*vg1;// [m^3/kg]\n", +"m = V1/v1;// [kg]\n", +"mprintf('\n (a) The mass of steam present is = %f kg\n',m);\n", +"\n", +"// (b)\n", +"// for polytropic process\n", +"v2 = v1*(P1/P2)^(1/n);// [m^3/kg]\n", +"\n", +"x2 = v2/vg2;// final dryness fraction\n", +"// work transfer\n", +"W = m*(P1*v1-P2*v2)*10^3/(n-1);// [kJ]\n", +"mprintf('\n (b) The work transfer is = %f kJ\n',W);\n", +"\n", +"// (c)\n", +"// initial\n", +"h1 = hf1+x1*hfg1;// [kJ/kg]\n", +"u1 = h1-P1*v1*10^3;// [kJ/kg]\n", +"\n", +"// final\n", +"h2 = hf2+x2*hfg2;// [kJ/kg]\n", +"u2 = h2-P2*v2*10^3;// [kJ/kg]\n", +"\n", +"del_U = m*(u2-u1);// [kJ]\n", +"mprintf('\n (c) The change in internal energy is = %f kJ',del_U);\n", +"if(del_U<0)\n", +" disp('since del_U<0,so this is loss of internal energy')\n", +"else\n", +" disp('since del_U>0,so this is gain in internal energy')\n", +"end\n", +"\n", +"// (d)\n", +"Q = del_U+W;// [kJ]\n", +"mprintf('\n (d) The heat exchange between the steam and surrounding is = %f kJ',Q);\n", +"if(Q<0)\n", +" disp('since Q<0,so this is loss of heat energy to surrounding')\n", +"else\n", +" disp('since Q>0,so this is gain in heat energy to the steam')\n", +"end\n", +"\n", +"// there are minor vairations in the values reported in the book\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21: volume_dryness_fraction_and_change_of_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.21');\n", +"\n", +"// aim : To determine the \n", +"// (a) volume occupied by steam\n", +"// (b)(1) final dryness fraction of steam\n", +"// (2) Change of internal energy during expansion\n", +"\n", +"// (a)\n", +"// Given values\n", +"P1 = .85;// [mN/m^2]\n", +"x1 = .97;\n", +"\n", +"// solution\n", +"// from steam table, at .85 MN/m^2,\n", +"vg1 = .2268;// [m^3/kg]\n", +"// hence\n", +"v1 = x1*vg1;// [m^3/kg]\n", +"mprintf('\n (a) The volume occupied by 1 kg of steam is = %f m^3/kg\n',v1);\n", +"\n", +"// (b)(1)\n", +"P2 = .17;// [MN/m^2]\n", +"// since process is polytropic process with\n", +"n = 1.13; // polytropic index\n", +"// hence\n", +"v2 = v1*(P1/P2)^(1/n);// [m^3/kg]\n", +"\n", +"// from steam table at .17 MN/m^2\n", +"vg2 = 1.031;// [m^3/kg]\n", +"// steam is wet so\n", +"x2 = v2/vg2;// final dryness fraction\n", +"mprintf('\n (b)(1) The final dryness fraction of the steam is = %f \n',x2);\n", +"\n", +"// (2)\n", +"W = (P1*v1-P2*v2)*10^3/(n-1);// [kJ/kg]\n", +"// since process is adiabatic, so\n", +"del_u = -W;// [kJ/kg]\n", +"mprintf('\n (2) The change in internal energy of the steam during expansion is = %f kJ/kg (This is a loss of internal energy)\n',del_u);\n", +"// There are minor variation in the answer\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Saturation_temperature_and_specific_enthalpies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.2');\n", +"\n", +"// aim : To determine \n", +"// saturation temperature and enthalpy\n", +"\n", +"// Given values\n", +"P = 2.04;// pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"// since in the steam table values of enthalpy and saturation temperature at 2 and 2.1 MN?m^2 are given, so for knowing required values at given pressure,there is need to do interpolation\n", +"\n", +"// calculation of saturation temperature\n", +"// from steam table\n", +"Table_P_tf = [[2.1,2.0];[214.9,212.4]]; // P in [MN/m^2] and tf in [C]\n", +"// using interpolation\n", +"tf = interpln(Table_P_tf,2.04);// saturation temperature at given condition\n", +"mprintf('\n The Saturation temperature is = %f C \n',tf);\n", +"\n", +"// calculation of specific liquid enthalpy\n", +"// from steam table\n", +"Table_P_hf = [[2.1,2.0];[920.0,908.6]];// P in [MN/m^2] and hf in [kJ/kg]\n", +"// using interpolation\n", +"hf = interpln(Table_P_hf,2.04); // enthalpy at given condition, [kJ/kg]\n", +"mprintf('\n The Specific liquid enthalpy is = %f kJ/kg \n',hf);\n", +"\n", +"// calculation of specific enthalpy of evaporation\n", +"// from steam table\n", +"Table_P_hfg = [[2.1,2.0];[1878.2,1888.6]];// P in [MN/m^2] and hfg in [kJ/kg]\n", +"// using interpolation\n", +"hfg = interpln(Table_P_hfg,2.04); // enthalpy at given condition, [kJ/kg]\n", +"mprintf('\n The Specific enthalpy of evaporation is = %f kJ/kg \n',hfg);\n", +"\n", +"// calculation of specific enthalpy of dry saturated steam\n", +"// from steam table\n", +"Table_P_hg = [[2.1,2.0];[2798.2,2797.2]];//P in [MN/m^2] and hg in [kJ/kg]\n", +"// using interpolation\n", +"hg = interpln(Table_P_hg,2.04); // enthalpy at given condition, [kJ/kg]\n", +"mprintf('\n The Specific enthalpy of dry saturated steam is = %f kJ/kg \n',hg);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: specific_enthalpy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.3');\n", +"\n", +"// aim : To determine\n", +"// the specific enthalpy\n", +"\n", +"// given values\n", +"P = 2; // pressure ,[MN/m^2]\n", +"t = 250; // Temperature, [C]\n", +"cp = 2.0934; // average value of specific heat capacity, [kJ/kg K]\n", +"\n", +"// solution\n", +"\n", +"// looking up steam table it shows that at given pressure saturation temperature is 212.4 C,so\n", +"tf = 212.4; // [C]\n", +"// hence,\n", +"Degree_of_superheat = t-tf;// [C]\n", +"// from table at given temperature 250 C\n", +"h = 2902; // specific enthalpy of steam at 250 C ,[kJ/kg]\n", +"mprintf('\nThe specific enthalpy of steam at 2 MN/m^2 with temperature 250 C is = %f kJ/kg \n',h);\n", +"\n", +"// Also from steam table enthalpy at saturation temperature is\n", +"hf = 2797.2 ;// [kJ/kg]\n", +"// so enthalpy at given temperature is\n", +"h = hf+cp*(t-tf);// [kJ/kg]\n", +"\n", +"mprintf('\n The specific enthalpy at given T and P by alternative path is = %f kJ/kg \n',h);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: specific_enthalpy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.4');\n", +"\n", +"// aim : To determine\n", +"// the specific enthalpy of steam\n", +"\n", +"// Given values\n", +"P = 2.5;// pressure, [MN/m^2]\n", +"t = 320; // temperature, [C]\n", +"\n", +"// solution\n", +"// from steam table at given condition the saturation temperature of steam is 223.9 C, therefore steam is superheated\n", +"tf = 223.9;// [C]\n", +"\n", +"// first let's calculate estimated enthalpy\n", +"// again from steam table \n", +"\n", +"hg = 2800.9;// enthalpy at saturation temp, [kJ/kg]\n", +"cp =2.0934;// specific heat capacity of steam,[kJ/kg K]\n", +"\n", +"// so enthalpy at given condition is\n", +"h = hg+cp*(t-tf);// [kJ/kg]\n", +"mprintf('\n The estimated specific enthalpy is = %f kJ/kg \n',h);\n", +"\n", +"// calculation of accurate specific enthalpy\n", +"// we need double interpolation for this\n", +"\n", +"// first interpolation w.r.t. to temperature\n", +"// At 2 MN/m^2\n", +"Table_t_h = [[325,300];[3083,3025]];// where, t in [C] and h in [kJ/kg]\n", +"h1 = interpln(Table_t_h,320); // [kJ/kg]\n", +"\n", +"// at 4 MN/m^2\n", +"Table_t_h = [[325,300];[3031,2962]]; // t in [C] and h in [kJ/kg]\n", +"h2 = interpln(Table_t_h,320); // [kJ/kg]\n", +"\n", +"// now interpolation w.r.t. pressure\n", +"Table_P_h = [[4,2];[h2,h1]]; // where P in NM/m^2 and h1,h2 in kJ/kg\n", +"h = interpln(Table_P_h,2.5);// [kJ/kg]\n", +"mprintf('\n The accurate specific enthalpy of steam at pressure of 2.5 MN/m^2 and with a temperature 320 C is = %f kJ/kg \n',h);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: specific_enthalpy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.5');\n", +"\n", +"// aim : To determine \n", +"// the specific enthalpy \n", +"\n", +"// Given values\n", +"P = 70; // pressure, [kn/m^2]\n", +"x = .85; // Dryness fraction\n", +"\n", +"// solution\n", +"\n", +"// from steam table, at given pressure \n", +"hf = 376.8;// [kJ/kg]\n", +"hfg = 2283.3;// [kJ/kg]\n", +"\n", +"// now using equation [2]\n", +"h = hf+x*hfg;// specific enthalpy of wet steam,[kJ/kg]\n", +"\n", +"mprintf('\n The specific enthalpy of wet steam is = %f kJ/kg \n',h);\n", +"\n", +"// There is minor variation in the book's answer\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: specific_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.8');\n", +"\n", +"// aim : To determine \n", +"// the specific volume of wet steam\n", +"\n", +"// Given values\n", +"P = 1.25; // pressure, [MN/m^2]\n", +"x = .9; // dry fraction\n", +"\n", +"// solution\n", +"// from steam table at given pressure\n", +"vg = .1569;// [m^3/kg]\n", +"// hence\n", +"v = x*vg; // [m^3/kg]\n", +"\n", +"mprintf('\nThe specific volume of wet steam is = %f m^3/kg \n',v);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: specific_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 4.9');\n", +"\n", +"// aim : To determine\n", +"// the specific volume \n", +"\n", +"// Given values\n", +"t = 325; // temperature, [C]\n", +"P = 2; // pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"// from steam table at given t and P\n", +"vf = .1321; // [m^3/kg]\n", +"tf = 212.4; // saturation temperature, [C]\n", +"\n", +"mprintf('\n The specific volume of steam at pressure of 2 MN/m^2 and with temperature 325 C is = %f m^3/kg \n',vf);\n", +"doh= t-tf; // degree of superheat, [C]\n", +"mprintf('\n The degree of superheat is = %f C\n',doh);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/5-Gases_and_single_phase_systems.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/5-Gases_and_single_phase_systems.ipynb new file mode 100644 index 0000000..49e1cef --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/5-Gases_and_single_phase_systems.ipynb @@ -0,0 +1,1365 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Gases and single phase systems" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.10');\n", +"\n", +"// aim : To determine\n", +"// the new temperature of the gas\n", +"\n", +"// Given values\n", +"V1 = .015;// original volume,[m^3]\n", +"T1 = 273+285;// original temperature,[K]\n", +"V2 = .09;// final volume,[m^3]\n", +"\n", +"// solution \n", +"// Given gas is following the law,P*V^1.35=constant\n", +"// so process is polytropic with\n", +"n = 1.35; // polytropic index\n", +"\n", +"// hence\n", +"T2 = T1*(V1/V2)^(n-1);// final temperature, [K]\n", +"\n", +"t2 = T2-273;// [C]\n", +"\n", +"mprintf('\n The new temperature of the gas is = %f C \n',t2);\n", +"\n", +"// there is minor error in book's answer\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: volume_pressure_and_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.11');\n", +"\n", +"// aim : To determine the\n", +"// (a) original and final volume of the gas\n", +"// (b) final pressure of the gas\n", +"// (c) final temperature of the gas\n", +"\n", +"// Given values\n", +"m = .675;// mass of the gas,[kg]\n", +"P1 = 1.4;// original pressure,[MN/m^2]\n", +"T1 = 273+280;// original temperature,[K]\n", +"R = .287;//gas constant,[kJ/kg K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// using characteristic equation, P1*V1=m*R*T1\n", +"V1 = m*R*T1*10^-3/P1;// [m^3]\n", +"// also Given \n", +"V2 = 4*V1;// [m^3]\n", +"mprintf('\n (a) The original volume of the gas is = %f m^3\n',V1);\n", +"mprintf('\n and The final volume of the gas is = %f m^3\n',V2);\n", +"\n", +"// (b)\n", +"// Given that gas is following the law P*V^1.3=constant\n", +"// hence process is polytropic with \n", +"n = 1.3; // polytropic index\n", +"P2 = P1*(V1/V2)^n;// formula for polytropic process,[MN/m^2]\n", +"mprintf('\n (b) The final pressure of the gas is = %f kN/m^2\n',P2*10^3);\n", +"\n", +"// (c)\n", +"// since mass is constant so,using P*V/T=constant\n", +"// hence\n", +"T2 = P2*V2*T1/(P1*V1);// [K]\n", +"t2 = T2-273;// [C]\n", +"mprintf('\n (c) The final temperature of the gas is = %f C\n',t2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: change_of_internal_energy_work_done_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.12');\n", +"\n", +"// aim : T0 determine \n", +"// (a) change in internal nergy of the air\n", +"// (b) work done\n", +"// (c) heat transfer\n", +"\n", +"// Given values\n", +"m = .25;// mass, [kg]\n", +"P1 = 140;// initial pressure, [kN/m^2]\n", +"V1 = .15;// initial volume, [m^3]\n", +"P2 = 1400;// final volume, [m^3]\n", +"cp = 1.005;// [kJ/kg K]\n", +"cv = .718;// [kJ/kg K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// assuming ideal gas\n", +"R = cp-cv;// [kJ/kg K]\n", +"// also, P1*V1=m*R*T1,hence\n", +"T1 = P1*V1/(m*R);// [K]\n", +"\n", +"// given that process is polytropic with \n", +"n = 1.25; // polytropic index\n", +"T2 = T1*(P2/P1)^((n-1)/n);// [K]\n", +"\n", +"// Hence, change in internal energy is,\n", +"del_U = m*cv*(T2-T1);// [kJ]\n", +"mprintf('\n (a) The change in internal energy of the air is del_U = %f kJ',del_U);\n", +"if(del_U>0)\n", +" disp('since del_U>0, so it is gain of internal energy to the air')\n", +"else\n", +" disp('since del_U<0, so it is gain of internal energy to the surrounding')\n", +"end\n", +"\n", +"// (b)\n", +"W = m*R*(T1-T2)/(n-1);// formula of work done for polytropic process,[kJ]\n", +"mprintf('\n (b) The work done is W = %f kJ',W);\n", +"if(W>0)\n", +" disp('since W>0, so the work is done by the air')\n", +"else\n", +" disp('since W<0, so the work is done on the air')\n", +"end\n", +"\n", +"// (c)\n", +"Q = del_U+W;// using 1st law of thermodynamics,[kJ]\n", +"mprintf('\n (c) The heat transfer is Q = %f kJ',Q);\n", +"if(Q>0)\n", +" disp('since Q>0, so the heat is received by the air')\n", +"else\n", +" disp('since Q<0, so the heat is rejected by the air')\n", +"end\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: volume_work_done_and_change_of_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.13');\n", +"\n", +"// aim : To determine the\n", +"// final volume, work done and the change in internal energy\n", +"\n", +"// Given values\n", +"P1 = 700;// initial pressure,[kN/m^2]\n", +"V1 = .015;// initial volume, [m^3]\n", +"P2 = 140;// final pressure, [kN/m^2]\n", +"cp = 1.046;// [kJ/kg K]\n", +"cv = .752; // [kJ/kg K]\n", +"\n", +"// solution\n", +"\n", +"Gamma = cp/cv;\n", +"// for adiabatic expansion, P*V^gamma=constant, so\n", +"V2 = V1*(P1/P2)^(1/Gamma);// final volume, [m^3]\n", +"mprintf('\n The final volume of the gas is V2 = %f m^3\n',V2);\n", +"\n", +"// work done\n", +"W = (P1*V1-P2*V2)/(Gamma-1);// [kJ]\n", +"mprintf('\n The work done by the gas is = %f kJ\n',W);\n", +"\n", +"// for adiabatic process\n", +"del_U = -W;// [kJ]\n", +"mprintf('\n The change of internal energy is = %f kJ',del_U);\n", +"if(del_U>0)\n", +" disp('since del_U>0, so the the gain in internal energy of the gas ')\n", +"else\n", +" disp('since del_U<0, so this is a loss of internal energy from the gas')\n", +"end\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14: heat_transfer_change_of_internal_energy_and_mass.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.14');\n", +"\n", +"// aim : To determine the\n", +"// (a)heat transfer\n", +"// (b)change of internal energy\n", +"// (c)mass of gas\n", +"\n", +"// Given values\n", +"V1 = .4;// initial volume, [m^3]\n", +"P1 = 100;// initial pressure, [kN/m^2]\n", +"T1 = 273+20;// temperature, [K]\n", +"P2 = 450;// final pressure,[kN/m^2]\n", +"cp = 1.0;// [kJ/kg K]\n", +"Gamma = 1.4; // heat capacity ratio\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// for the isothermal compression,P*V=constant,so\n", +"V2 = V1*P1/P2;// [m^3]\n", +"W = P1*V1*log(P1/P2);// formula of workdone for isothermal process,[kJ]\n", +"\n", +"// for isothermal process, del_U=0;so\n", +"Q = W;\n", +"mprintf('\n (a) The heat transferred during compression is Q = %f kJ\n',Q);\n", +"\n", +"\n", +"// (b)\n", +"V3 = V1;\n", +"// for adiabatic expansion\n", +"// also\n", +"\n", +"P3 = P2*(V2/V3)^Gamma;// [kN/m^2]\n", +"W = -(P3*V3-P2*V2)/(Gamma-1);// work done formula for adiabatic process,[kJ]\n", +"// also, Q=0,so using Q=del_U+W\n", +"del_U = -W;// [kJ]\n", +"mprintf('\n (b) The change of the internal energy during the expansion is,del_U = %f kJ\n',del_U);\n", +"\n", +"// (c)\n", +"// for ideal gas\n", +"// cp-cv=R, and cp/cv=gamma, hence\n", +"R = cp*(1-1/Gamma);// [kj/kg K]\n", +"\n", +"// now using ideal gas equation\n", +"m = P1*V1/(R*T1);// mass of the gas,[kg]\n", +"mprintf('\n (c) The mass of the gas is,m = %f kg\n',m);\n", +"\n", +"// There is calculation mistake in the book\n", +"\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: heat_transfer_and_polytropic_heat_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.15');\n", +"\n", +"// aim : To determine \n", +"// the heat transferred and polytropic specific heat capacity\n", +"\n", +"// Given values\n", +"P1 = 1;// initial pressure, [MN/m^2]\n", +"V1 = .003;// initial volume, [m^3]\n", +"P2 = .1;// final pressure,[MN/m^2]\n", +"cv = .718;// [kJ/kg*K]\n", +"Gamma=1.4;// heat capacity ratio\n", +"\n", +"// solution\n", +"// Given process is polytropic with\n", +"n = 1.3;// polytropic index\n", +"// hence\n", +"V2 = V1*(P1/P2)^(1/n);// final volume,[m^3]\n", +"W = (P1*V1-P2*V2)*10^3/(n-1);// work done,[kJ]\n", +"// so\n", +"Q = (Gamma-n)*W/(Gamma-1);// heat transferred,[kJ]\n", +"\n", +"mprintf('\n The heat received or rejected by the gas during this process is Q = %f kJ',Q);\n", +"if(Q>0)\n", +" disp('since Q>0, so heat is received by the gas')\n", +"else\n", +" disp('since Q<0, so heat is rejected by the gas')\n", +"end\n", +"\n", +"// now\n", +"cn = cv*(Gamma-n)/(n-1);// polytropic specific heat capacity,[kJ/kg K]\n", +"mprintf('\n The polytropic specific heat capacity is cn = %f kJ/kg K\n',cn);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: pressures.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.16');\n", +"\n", +"// aim : To determine the \n", +"// (a) initial partial pressure of the steam and air\n", +"// (b) final partial pressure of the steam and air\n", +"// (c) total pressure in the container after heating\n", +"\n", +"// Given values\n", +"T1 = 273+39;// initial temperature,[K]\n", +"P1 = 100;// pressure, [MN/m^2]\n", +"T2 = 273+120.2;// final temperature,[K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// from the steam tables, the pressure of wet steam at 39 C is\n", +"Pw1 = 7;// partial pressure of wet steam,[kN/m^2]\n", +"// and by Dalton's law\n", +"Pa1 = P1-Pw1;// initial pressure of air, [kN/m^2]\n", +"\n", +"mprintf('\n (a) The initial partial pressure of the steam is = %f kN/m^2',Pw1);\n", +"mprintf('\n The initial partial pressure of the air is = %f kN/m^2\n',Pa1);\n", +"\n", +"// (b)\n", +"// again from steam table, at 120.2 C the pressure of wet steam is\n", +"Pw2 = 200;// [kN/m^2]\n", +"\n", +"// now since volume is constant so assuming air to be ideal gas so for air P/T=contant, hence\n", +"Pa2 = Pa1*T2/T1 ;// [kN/m^2]\n", +"\n", +"mprintf(' \n(b) The final partial pressure of the steam is = %f kN/m^2',Pw2);\n", +"mprintf('\n The final partial pressure of the air is = %f kN/m^2\n',Pa2);\n", +"\n", +"// (c)\n", +"Pt = Pa2+Pw2;// using dalton's law, total pressure,[kN/m^2]\n", +"mprintf('\n (c) The total pressure after heating is = %f kN/m^2\n',Pt);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: partial_pressure_and_mass.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.17');\n", +"\n", +"// aim : To determine \n", +"// the partial pressure of the air and steam, and the mass of the air\n", +"\n", +"// Given values\n", +"P1 = 660;// vaccum gauge pressure on condenser [mmHg]\n", +"P = 765;// atmospheric pressure, [mmHg]\n", +"x = .8;// dryness fraction \n", +"T = 273+41.5;// temperature,[K]\n", +"ms_dot = 1500;// condense rate of steam,[kg/h]\n", +"R = .29;// [kJ/kg]\n", +"\n", +"// solution\n", +"Pa = (P-P1)*.1334;// absolute pressure,[kN/m^2]\n", +"// from steam table, at 41.5 C partial pressure of steam is\n", +"Ps = 8;// [kN/m^2]\n", +"// by dalton's law, partial pressure of air is\n", +"Pg = Pa-Ps;// [kN/m^2]\n", +"\n", +"mprintf('\n The partial pressure of the air in the condenser is = %f kN/m^2\n',Pg);\n", +"mprintf('\n The partial pressure of the steam in the condenser is = %f kN/m^2\n',Ps);\n", +"\n", +"// also\n", +"vg = 18.1;// [m^3/kg]\n", +"// so\n", +"V = x*vg;// [m^3/kg]\n", +"// The air associated with 1 kg of the steam will occupiy this same volume\n", +"// for air, Pg*V=m*R*T,so\n", +"m = Pg*V/(R*T);// [kg/kg steam]\n", +"// hence\n", +"ma = m*ms_dot;// [kg/h]\n", +"\n", +"mprintf('\n The mass of air which will associated with this steam is = %f kg\n',ma);\n", +"\n", +"// There is misprint in book\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: pressure_and_dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.18');\n", +"\n", +"// aim : To determine the\n", +"// (a) final pressure\n", +"// (b) final dryness fraction of the steam\n", +"\n", +"// Given values\n", +"P1 = 130;// initial pressure, [kN/m^2]\n", +"T1 = 273+75.9;// initial temperature, [K]\n", +"x1 = .92;// initial dryness fraction\n", +"T2 = 273+120.2;// final temperature, [K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// from steam table, at 75.9 C\n", +"Pws = 40;// partial pressure of wet steam[kN/m^2]\n", +"Pa = P1-Pws;// partial pressure of air, [kN/m^2]\n", +"vg = 3.99// specific volume of the wet steam, [m^3/kg]\n", +"// hence\n", +"V1 = x1*vg;// [m^3/kg]\n", +"V2 = V1/5;// [m^3/kg]\n", +"// for air, mass is constant so, Pa*V1/T1=P2*V2/T2,also given ,V1/V2=5,so\n", +"P2 = Pa*V1*T2/(V2*T1);// final pressure,[kN/m^2]\n", +"\n", +"// now for steam at 120.2 C\n", +"Ps = 200;// final partial pressure of steam,[kN/m^2]\n", +"// so by dalton's law total pressure in cylindert is\n", +"Pt = P2+Ps;// [kN/m^2]\n", +"mprintf('\n (a) The final pressure in the cylinder is = %f kN/m^2\n',Pt);\n", +"\n", +"// (b)\n", +"// from steam table at 200 kN/m^2 \n", +"vg = .885;// [m^3/kg]\n", +"// hence\n", +"x2 = V2/vg;// final dryness fraction of the steam\n", +"mprintf('\n (b) The final dryness fraction of the steam is = %f\n ',x2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: adiabatic_index_and_change_of_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.19')\n", +"\n", +"// aim : To determine the \n", +"// (a) Gamma,\n", +"// (b) del_U\n", +"\n", +"// Given Values\n", +"P1 = 1400;// [kN/m^2]\n", +"P2 = 100;// [kN/m^2]\n", +"P3 = 220;// [kN/m^2]\n", +"T1 = 273+360;// [K]\n", +"m = .23;// [kg]\n", +"cp = 1.005;// [kJ/kg*K]\n", +"\n", +"// Solution\n", +"T3 = T1;// since process 1-3 is isothermal\n", +"\n", +"// (a)\n", +"// for process 1-3, P1*V1=P3*V3,so\n", +"V3_by_V1 = P1/P3;\n", +"// also process 1-2 is adiabatic,so P1*V1^(Gamma)=P2*V2^(Gamma),hence\n", +"// and process process 2-3 is iso-choric so,V3=V2 and\n", +"V2_by_V1 = V3_by_V1;\n", +"// hence,\n", +"Gamma = log(P1/P2)/log(P1/P3); // heat capacity ratio\n", +"\n", +"mprintf('\n (a) The value of adiabatic index Gamma is = %f\n',Gamma);\n", +"\n", +"// (b)\n", +"cv = cp/Gamma;// [kJ/kg K]\n", +"// for process 2-3,P3/T3=P2/T2,so\n", +"T2 = P2*T3/P3;// [K]\n", +"\n", +"// now\n", +"del_U = m*cv*(T2-T1);// [kJ]\n", +"mprintf('\n (b) The change in internal energy during the adiabatic expansion is U2-U1 = %f kJ (This is loss of internal energy)\n',del_U);\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: pressure_exerted_and_difference_in_two_mercury_column_levels.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.1');\n", +"\n", +"// aim : To determine \n", +"// new pressure exerted on the air and the difference in two mercury column level\n", +"\n", +"// Given values\n", +"P1 = 765;// atmospheric pressure, [mmHg]\n", +"V1 = 20000;// [mm^3]\n", +"V2 = 17000;// [mm^3]\n", +"\n", +"// solution\n", +"\n", +"// using boyle's law P*V=constant\n", +"// hence\n", +"P2 = P1*V1/V2;// [mmHg]\n", +"mprintf('\n The new pressure exerted on the air is = %f mmHg \n',P2);\n", +"\n", +"del_h = P2-P1;// difference in Height of mercury column level\n", +"mprintf('\n The difference in the two mercury column level is = %f mm\n',del_h);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20: mass_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.20');\n", +"\n", +"// aim : To determine \n", +"// the mass of oxygen and heat transferred\n", +"\n", +"// Given values\n", +"V1 = 300;// [L]\n", +"P1 = 3.1;// [MN/m^2]\n", +"T1 = 273+18;// [K]\n", +"P2 = 1.7;// [MN/m^2]\n", +"T2 = 273+15;// [K]\n", +"Gamma = 1.4; // heat capacity ratio\n", +"// density condition\n", +"P = .101325;// [MN/m^2]\n", +"T = 273;// [K]\n", +"V = 1;// [m^3]\n", +"m = 1.429;// [kg]\n", +"\n", +"// hence\n", +"R = P*V*10^3/(m*T);// [kJ/kg*K]\n", +"// since volume is constant\n", +"V2 = V1;// [L]\n", +"// for the initial conditions in the cylinder,P1*V1=m1*R*T1\n", +"m1 = P1*V1/(R*T1);// [kg]\n", +"\n", +"// after some of the gas is used\n", +"m2 = P2*V2/(R*T2);// [kg]\n", +"// The mass of oxygen remaining in cylinder is m2 kg,so\n", +"// Mass of oxygen used is\n", +"m_used = m1-m2;// [kg]\n", +"mprintf('\n The mass of oxygen used = %f kg\n',m_used);\n", +"\n", +"// for non-flow process,Q=del_U+W\n", +"// volume is constant so no external work is done so,Q=del_U\n", +"cv = R/(Gamma-1);// [kJ/kg*K]\n", +"\n", +"// heat transfer is\n", +"Q = m2*cv*(T1-T2);// (kJ)\n", +"mprintf('\n The amount of heat transferred through the cylinder wall is = %f kJ\n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21: work_done_change_of_internal_energy_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.21');\n", +"\n", +"// aim : To determine the\n", +"// (a) work transferred during the compression\n", +"// (b) change in internal energy\n", +"// (c) heat transferred during the compression\n", +"\n", +"// Given values\n", +"V1 = .1;// initial volume, [m^3]\n", +"P1 = 120;// initial pressure, [kN/m^2]\n", +"P2 = 1200; // final pressure, [kN/m^2]\n", +"T1 = 273+25;// initial temperature, [K]\n", +"cv = .72;// [kJ/kg*K]\n", +"R = .285;// [kJ/kg*K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// given process is polytropic with\n", +"n = 1.2; // polytropic index\n", +"// hence\n", +"V2 = V1*(P1/P2)^(1/n);// [m^3]\n", +"W = (P1*V1-P2*V2)/(n-1);// workdone formula, [kJ]\n", +"mprintf('\n (a) The work transferred during the compression is = %f kJ\n',W);\n", +"\n", +"// (b)\n", +"// now mass is constant so,\n", +"T2 = P2*V2*T1/(P1*V1);// [K]\n", +"// using, P*V=m*R*T\n", +"m = P1*V1/(R*T1);// [kg]\n", +"\n", +"// change in internal energy is\n", +"del_U = m*cv*(T2-T1);// [kJ]\n", +"mprintf('\n (b) The change in internal energy is = %f kJ\n',del_U);\n", +"\n", +"// (c)\n", +"Q = del_U+W;// [kJ]\n", +"mprintf('\n (c) The heat transferred during the compression is = %f kJ\n',Q);\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.22: pressure_and_specific_enthalpy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.22');\n", +"\n", +"// aim : To determine the\n", +"// (a) new pressure of the air in the receiver\n", +"// (b) specific enthalpy of air at 15 C\n", +"\n", +"// Given values\n", +"V1 = .85;// [m^3]\n", +"T1 = 15+273;// [K]\n", +"P1 = 275;// pressure,[kN/m^2]\n", +"m = 1.7;// [kg]\n", +"cp = 1.005;// [kJ/kg*K]\n", +"cv = .715;// [kJ/kg*K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"\n", +"R = cp-cv;// [kJ/kg*K]\n", +"// assuming m1 is original mass of the air, using P*V=m*R*T\n", +"m1 = P1*V1/(R*T1);// [kg]\n", +"m2 = m1+m;// [kg]\n", +"// again using P*V=m*R*T\n", +"// P2/P1=(m2*R*T2/V2)/(m1*R*T1/V1); and T1=T2,V1=V2,so\n", +"P2 = P1*m2/m1;// [kN/m^2]\n", +"mprintf('\n (a) The new pressure of the air in the receiver is = %f kN/m^2\n',P2);\n", +"\n", +"// (b)\n", +"// for 1 kg of air, h2-h1=cp*(T1-T0)\n", +"// and if 0 is chosen as the zero enthalpy, then\n", +"h = cp*(T1-273);// [kJ/kg]\n", +"mprintf('\n (b) The specific enthalpy of the air at 15 C is = %f kJ/kg\n',h);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23: EX5_23.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.23');\n", +"\n", +"// aim : T determine the\n", +"// (a) characteristic gas constant of the gas\n", +"// (b) cp,\n", +"// (c) cv,\n", +"// (d) del_u \n", +"// (e) work transfer\n", +"\n", +"// Given values\n", +"P = 1;// [bar] \n", +"T1 = 273+15;// [K]\n", +"m = .9;// [kg]\n", +"T2 = 273+250;// [K]\n", +"Q = 175;// heat transfer,[kJ]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// using, P*V=m*R*T, given,\n", +"m_by_V = 1.875;\n", +"// hence\n", +"R = P*100/(T1*m_by_V);// [kJ/kg*K]\n", +"mprintf('\n (a) The characteristic gas constant of the gas is R = %f kJ/kg K\n',R);\n", +"\n", +"// (b)\n", +"// using, Q=m*cp*(T2-T1)\n", +"cp = Q/(m*(T2-T1));// [kJ/kg K]\n", +"mprintf('\n (b) The specific heat capacity of the gas at constant pressure cp = %f kJ/kg K\n',cp);\n", +"\n", +"// (c)\n", +"// we have, cp-cv=R,so\n", +"cv = cp-R;// [kJ/kg*K]\n", +"mprintf('\n (c) The specific heat capacity of the gas at constant volume cv = %f kJ/kg K\n',cv);\n", +"\n", +"// (d)\n", +"del_U = m*cv*(T2-T1);// [kJ]\n", +"mprintf('\n (d) The change in internal energy is = %f kJ\n',del_U);\n", +"\n", +"// (e)\n", +"// using, Q=del_U+W\n", +"W = Q-del_U;// [kJ]\n", +"mprintf('\n (e) The work transfer is W = %f kJ\n',W);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24: work_done_change_of_internal_energy_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.24');\n", +"\n", +"// aim : To determine the\n", +"// (a) work transfer,\n", +"// (b)del_U and,\n", +"// (c)heat transfer\n", +"\n", +"// Given values\n", +"V1 = .15;// [m^3]\n", +"P1 = 1200;// [kN/m^2]\n", +"T1 = 273+120;// [K]\n", +"P2 = 200;// [kN/m^2]\n", +"cp = 1.006;//[kJ/kg K]\n", +"cv = .717;// [kJ/kg K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// Given, PV^1.32=constant, so it is polytropic process with\n", +"n = 1.32;// polytropic index\n", +"// hence\n", +"V2 = V1*(P1/P2)^(1/n);// [m^3]\n", +"// now, W\n", +"W = (P1*V1-P2*V2)/(n-1);// [kJ]\n", +"mprintf('\n (a) The work transfer is W = %f kJ\n',W);\n", +"\n", +"// (b)\n", +"R = cp-cv;// [kJ/kg K]\n", +"m = P1*V1/(R*T1);// gas law,[kg]\n", +"// also for polytropic process\n", +"T2 = T1*(P2/P1)^((n-1)/n);// [K]\n", +"// now for gas,\n", +"del_U = m*cv*(T2-T1);// [kJ]\n", +"mprintf('\n (b) The change of internal energy is del_U = %f kJ\n',del_U);\n", +"\n", +"// (c)\n", +"Q = del_U+W;// first law of thermodynamics,[kJ]\n", +"mprintf('\n (c) The heat transfer Q = %f kJ\n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26: volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.26');\n", +"\n", +"// aim : To determine\n", +"// the volume of the pressure vessel and the volume of the gas before transfer\n", +"\n", +"// Given values\n", +"\n", +"P1 = 1400;// initial pressure,[kN/m^2]\n", +"T1 = 273+85;// initial temperature,[K]\n", +"\n", +"P2 = 700;// final pressure,[kN/m^2]\n", +"T2 = 273+60;// final temperature,[K]\n", +"\n", +"m = 2.7;// mass of the gas passes,[kg]\n", +"cp = .88;// [kJ/kg]\n", +"cv = .67;// [kJ/kg]\n", +"\n", +"// solution\n", +"\n", +"// steady flow equation is, u1+P1*V1+C1^2/2+Q=u2+P2*V2+C2^2/2+W [1], \n", +"// given, there is no kinetic energy change and neglecting potential energy term\n", +"W = 0;// no external work done\n", +"// so final equation is,u1+P1*v1+Q=u2 [2]\n", +"// also u2-u1=cv*(T2-T1)\n", +"// hence Q=cv*(T2-T1)-P1*v1 [3]\n", +"// and for unit mass P1*v1=R*T1=(cp-cv)*T1 [4]\n", +"// so finally\n", +"Q = cv*(T2-T1)-(cp-cv)*T1;// [kJ/kg]\n", +"// so total heat transferred is\n", +"Q = m*Q;// [kJ] \n", +"\n", +"// using eqn [4]\n", +"v1 = (cp-cv)*T1/P1;// [m^3/kg]\n", +"// Total volume is\n", +"V1 = m*v1;// [m^3]\n", +"\n", +"// using ideal gas equation P1*V1/T1=P2*V2/T2\n", +"V2 = P1*T2*V1/(P2*T1);// final volume,[m^3]\n", +"\n", +"mprintf('\n The volume of gas before transfer is = %f m^3\n',V1);\n", +"mprintf('\n The volume of pressure vessel is = %f m^3\n',V2);\n", +" \n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.2');\n", +"\n", +"// aim : To determine \n", +"// the new volume\n", +"\n", +"// Given values\n", +"P1 = 300;// original pressure,[kN/m^2]\n", +"V1 = .14;// original volume,[m^3]\n", +"\n", +"P2 = 60;// new pressure after expansion,[kn/m^2]\n", +"\n", +"// solution\n", +"// since temperature is constant so using boyle's law P*V=constant\n", +"V2 = V1*P1/P2;// [m^3]\n", +"\n", +"mprintf('\n The new volume after expansion is = %f m^3\n',V2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.3');\n", +"\n", +"// aim : To determine \n", +"// the new volume of the gas\n", +"\n", +"// Given values\n", +"V1 = 10000;// [mm^3]\n", +"T1 = 273+18;// [K]\n", +"T2 = 273+85;// [K]\n", +"\n", +"// solution\n", +"// since pressure exerted on the apparatus is constant so using charle's law V/T=constant\n", +"// hence\n", +"V2 = V1*T2/T1;// [mm^3]\n", +"\n", +"mprintf('\n The new volume of the gas trapped in the apparatus is = %f mm^3\n',V2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.4');\n", +"\n", +"// aim : To determine \n", +"// the final temperature\n", +"\n", +"// Given values\n", +"V1 = .2;// original volume,[m^3]\n", +"T1 = 273+303;// original temperature, [K]\n", +"V2 = .1;// final volume, [m^3]\n", +"\n", +"// solution\n", +"// since pressure is constant, so using charle's law V/T=constant\n", +"// hence\n", +"T2 = T1*V2/V1;// [K]\n", +"t2 = T2-273;// [C]\n", +"mprintf('\n The final temperature of the gas is = %f C\n',t2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.5');\n", +"\n", +"// aim : To determine \n", +"// the new volume of the gas\n", +"\n", +"// Given values\n", +"\n", +"// initial codition\n", +"P1 = 140;// [kN/m^2]\n", +"V1 = .1;// [m^3]\n", +"T1 = 273+25;// [K]\n", +"\n", +"// final condition\n", +"P2 = 700;// [kN/m^2]\n", +"T2 = 273+60;// [K]\n", +"\n", +"// by charasteristic equation, P1*V1/T1=P2*V2/T2\n", +"\n", +"V2=P1*V1*T2/(T1*P2);// final volume, [m^3]\n", +"\n", +"mprintf('\nThe new volume of the gas is = %f m^3\n',V2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: mass_and_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.6');\n", +"\n", +"// aim : To determine\n", +"// the mas of the gas and new temperature\n", +"\n", +"// Given values\n", +"P1 = 350;// [kN/m^2]\n", +"V1 = .03;// [m^3]\n", +"T1 = 273+35;// [K]\n", +"R = .29;// Gas constant,[kJ/kg K]\n", +"\n", +"// solution\n", +"// using charasteristic equation, P*V=m*R*T\n", +"m = P1*V1/(R*T1);// [Kg]\n", +"mprintf('\n The mass of the gas present is = %f kg\n',m);\n", +"\n", +"// Now the gas is compressed\n", +"P2 = 1050;// [kN/m^2]\n", +"V2 = V1;\n", +"// since mass of the gas is constant so using, P*V/T=constant\n", +"// hence\n", +"T2 = T1*P2/P1// [K]\n", +"t2 = T2-273;// [C]\n", +"\n", +"mprintf('\n The new temperature of the gas is = %f C\n',t2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: heat_transfer_and_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.7');\n", +"\n", +"// aim : To determine \n", +"// the heat transferred to the gas and its final pressure\n", +"\n", +"// Given values\n", +"m = 2;// masss of the gas, [kg]\n", +"V1 = .7;// volume,[m^3]\n", +"T1 = 273+15;// original temperature,[K]\n", +"T2 = 273+135;// final temperature,[K]\n", +"cv = .72;// specific heat capacity at constant volume,[kJ/kg K]\n", +"R = .29;// gas law constant,[kJ/kg K]\n", +"\n", +"// solution\n", +"Q = m*cv*(T2-T1);// Heat transferred at constant volume,[kJ]\n", +"mprintf('\n The heat transferred to the gas is = %f kJ\n',Q);\n", +"\n", +"// Now,using P1*V1=m*R*T1\n", +"P1 = m*R*T1/V1;// [kN/m^2]\n", +"\n", +"// since volume of the system is constant, so P1/T1=P2/T2\n", +"// hence\n", +"P2 = P1*T2/T1;// final pressure,[kN/m^2]\n", +"mprintf('\n The final pressure of the gas is = %f kN/m^2 \n',P2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: heat_transfer_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.8');\n", +"\n", +"// aim : To determine \n", +"// the heat transferred from the gas and the work done on the gas\n", +"\n", +"// Given values\n", +"P1 = 275;// pressure, [kN/m^2]\n", +"V1 = .09;// volume,[m^3]\n", +"T1 = 273+185;// initial temperature,[K]\n", +"T2 = 273+15;// final temperature,[K]\n", +"cp = 1.005;// specific heat capacity at constant pressure,[kJ/kg K]\n", +"R = .29;// gas law constant,[kJ/kg K]\n", +"\n", +"// solution\n", +"// using P1*V1=m*R*T1\n", +"m = P1*V1/(R*T1);// mass of the gas\n", +"\n", +"// calculation of heat transfer\n", +"Q = m*cp*(T2-T1);// Heat transferred at constant pressure,[kJ]\n", +"mprintf('\n The heat transferred to the gas is = %f kJ\n',Q);\n", +"\n", +"// calculation of work done\n", +"// Now,since pressure is constant so, V/T=constant\n", +"// hence\n", +"V2 = V1*T2/T1;// [m^3]\n", +"\n", +"W = P1*(V2-V1);// formula for work done at constant pressure,[kJ]\n", +"mprintf('\n Work done on the gas during the process is = %f kJ\n',W);\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 5.9');\n", +"\n", +"// aim : To determine\n", +"// the new pressure of the gas\n", +"\n", +"// Given values\n", +"P1 = 300;// original pressure,[kN/m^2]\n", +"T1 = 273+25;// original temperature,[K]\n", +"T2 = 273+180;// final temperature,[K]\n", +"\n", +"// solution\n", +"// since gas compressing according to the law,P*V^1.4=constant\n", +"// so,for polytropic process,T1/T2=(P1/P2)^((n-1)/n),here n=1.4\n", +"\n", +"// hence\n", +"P2 = P1*(T2/T1)^((1.4)/(1.4-1));// [kN/m^2]\n", +"\n", +"mprintf('\n The new pressure of the gas is = %f kN/m^2\n',P2);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/7-Entropy.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/7-Entropy.ipynb new file mode 100644 index 0000000..77c5dfb --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/7-Entropy.ipynb @@ -0,0 +1,536 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Entropy" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: specific_entropy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.1');\n", +"\n", +"// aim : To determine\n", +"// the specific enthalpy of water\n", +"\n", +"// Given values\n", +"Tf = 273+100;// Temperature,[K]\n", +"\n", +"// solution\n", +"// from steam table\n", +"cpl = 4.187;// [kJ/kg K]\n", +"// using equation [8]\n", +"sf = cpl*log(Tf/273.16);// [kJ/kg*K]\n", +"mprintf('\n The specific entropy of water is = %f kJ/kg K\n',sf);\n", +"\n", +"// using steam table\n", +"sf = 1.307;// [kJ/kg K]\n", +"mprintf('\n From table The accurate value of sf in this case is = %f kJ/kg K\n',sf);\n", +"\n", +"// There is small error in book's final value of sf\n", +"\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: specific_entropy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clear;\n", +"clc;\n", +"disp('Example 7.2');\n", +"\n", +"// aim : To determine\n", +"// the specific entropy\n", +"\n", +"// Given values\n", +"P = 2;// pressure,[MN/m^2]\n", +"x = .8;// dryness fraction\n", +"\n", +"// solution\n", +"// from steam table at given pressure\n", +"Tf = 485.4;// [K]\n", +"cpl = 4.187;// [kJ/kg K]\n", +"hfg = 1888.6;// [kJ/kg]\n", +"\n", +"// (a) finding entropy by calculation\n", +"s = cpl*log(Tf/273.16)+x*hfg/Tf;// formula for entropy calculation\n", +"\n", +"mprintf('\n (a) The specific entropy of wet steam is = %f kJ/kg K\n',s);\n", +"\n", +"// (b) calculation of entropy using steam table\n", +"// from steam table at given pressure\n", +"sf = 2.447;// [kJ/kg K]\n", +"sfg = 3.89;// [kJ/kg K]\n", +"// hence\n", +"s = sf+x*sfg;// [kJ/kg K]\n", +"\n", +"mprintf('\n (b) The specific entropy using steam table is = %f kJ/kg K\n',s);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: specific_entropy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.3');\n", +"\n", +"// aim : To determine\n", +"// the specific entropy of steam\n", +"\n", +"// Given values\n", +"P = 1.5;//pressure,[MN/m^2]\n", +"T = 273+300;//temperature,[K]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// from steam table\n", +"cpl = 4.187;// [kJ/kg K]\n", +"Tf = 471.3;// [K]\n", +"hfg = 1946;// [kJ/kg]\n", +"cpv = 2.093;// [kJ/kg K]\n", +"\n", +"// usung equation [2]\n", +"s = cpl*log(Tf/273.15)+hfg/Tf+cpv*log(T/Tf);// [kJ/kg K]\n", +"mprintf('\n (a) The specific entropy of steam is = %f kJ/kg K\n',s);\n", +"\n", +"// (b)\n", +"// from steam tables\n", +"s = 6.919;// [kJ/kg K]\n", +"mprintf('\n (b) The accurate value of specific entropy from steam table is = %f kJ/kg K\n',s);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: dryness_fraction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.4');\n", +"\n", +"// aim : To determine\n", +"// the dryness fraction of steam\n", +"\n", +"// Given values\n", +"P1 = 2;// initial pressure, [MN/m^2]\n", +"t = 350;// temperature, [C]\n", +"P2 = .28;// final pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"// at 2 MN/m^2 and 350 C,steam is superheated because the saturation temperature is 212.4 C\n", +"// From steam table\n", +"s1 = 6.957;// [kJ/kg K]\n", +"\n", +"// for isentropic process\n", +"s2 = s1;\n", +"// also\n", +"sf2 = 1.647;// [kJ/kg K]\n", +"sfg2 = 5.368;// [kJ/kg K]\n", +"\n", +"// using\n", +"// s2 = sf2+x2*sfg2, where x2 is dryness fraction of steam\n", +"// hence\n", +"x2 = (s2-sf2)/sfg2;\n", +"mprintf('\n The final dryness fraction of steam is x2 = %f\n',x2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: condition_of_steam_and_change_in_specific_entropy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.5');\n", +"\n", +"// aim : To determine\n", +"// the final condition of steam...\n", +"// the change in specific entropy during hyperbolic process\n", +"\n", +"// Given values\n", +"P1 = 2;// pressure, [MN/m^2]\n", +"t = 250;// temperature, [C]\n", +"P2 = .36;// pressure, [MN/m^2]\n", +"P3 = .06;// pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"\n", +"// (a)\n", +"// from steam table\n", +"s1 = 6.545;// [kJ/kg K]\n", +"// at .36 MN/m^2\n", +"sg = 6.930;// [kJ/kg*K]\n", +"\n", +"sf2 = 1.738;// [kJ/kg K]\n", +"sfg2 = 5.192;// [kJ/kg K]\n", +"vg2 = .510;// [m^3]\n", +"\n", +"// so after isentropic expansion, steam is wet\n", +"// hence, s2=sf2+x2*sfg2, where x2 is dryness fraction\n", +"// also\n", +"s2 = s1;\n", +"// so\n", +"x2 = (s2-sf2)/sfg2;\n", +"// and\n", +"v2 = x2*vg2;// [m^3]\n", +"\n", +"// for hyperbolic process\n", +"// P2*v2=P3*v3\n", +"// hence\n", +"v3 = P2*v2/P3;// [m^3]\n", +" \n", +"mprintf('\n (a) From steam table at .06 MN/m^2 steam is superheated and has temperature of 100 C with specific volume is = %f m^3/kg\n',v3);\n", +"\n", +"// (b)\n", +"// at this condition\n", +"s3 = 7.609;// [kJ/kg*K]\n", +"// hence\n", +"change_s23 = s3-sg;// change in specific entropy during the hyperblic process[kJ/kg*K]\n", +"mprintf('\n (b) The change in specific entropy during the hyperbolic process is = %f kJ/kg K\n',change_s23);\n", +"\n", +"// In the book they have taken sg instead of s2 for part (b), so answer is not matching\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: heat_transfer_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clear;\n", +"clc;\n", +"disp('Example 7.6');\n", +"\n", +"// aim : To determine the\n", +"// (a) heat transfer during the expansion and\n", +"// (b) work done durind the expansion\n", +"\n", +"// given values\n", +"m = 4.5; // mass of steam,[kg]\n", +"P1 = 3; // initial pressure,[MN/m^2]\n", +"T1 = 300+273; // initial temperature,[K]\n", +"\n", +"P2 = .1; // final pressure,[MN/m^2]\n", +"x2 = .96; // dryness fraction at final stage\n", +"\n", +"// solution\n", +"// for state point 1,using steam table\n", +"s1 = 6.541;// [kJ/kg/K]\n", +"u1 = 2751;// [kJ/kg]\n", +" \n", +" // for state point 2\n", +" sf2 = 1.303;// [kJ/kg/K]\n", +" sfg2 = 6.056;// [kJ/kg/k]\n", +" T2 = 273+99.6;// [K]\n", +" hf2 = 417;// [kJ/kg]\n", +" hfg2 = 2258;// [kJ/kg]\n", +" vg2 = 1.694;// [m^3/kg]\n", +" \n", +" // hence\n", +" s2 = sf2+x2*sfg2;// [kJ/kg/k]\n", +" h2 = hf2+x2*hfg2;// [kJ/kg]\n", +" u2 = h2-P2*x2*vg2*10^3;// [kJ/kg]\n", +" \n", +" // Diagram of example 7.6\n", +" x = [s1 s2];\n", +" y = [T1 T2];\n", +"plot2d(x,y);\n", +" xtitle('Diagram for example 7.6(T vs s)');\n", +" xlabel('Entropy (kJ/kg K)');\n", +" ylabel('Temperature (K)');\n", +"\n", +"x = [s1,s1];\n", +"y = [0,T1];\n", +"plot2d(x,y);\n", +"\n", +"x = [s2,s2];\n", +"y = [0,T2];\n", +"plot2d(x,y);\n", +"\n", +" // (a)\n", +" // Q_rev is area of T-s diagram\n", +" Q_rev = (T1+T2)/2*(s2-s1);// [kJ/kg]\n", +" // so total heat transfer is\n", +" Q_rev = m*Q_rev;// [kJ]\n", +" \n", +" // (b)\n", +" del_u = u2-u1;// change in internal energy, [kJ/kg]\n", +" // using 1st law of thermodynamics\n", +" W = Q_rev-m*del_u;// [kJ]\n", +" \n", +"mprintf('\n (a) The heat transfer during the expansion is = %f kJ (received)\n',Q_rev);\n", +"\n", +" mprintf('\n (b) The work done during the expansion is = %f kJ\n',W);\n", +" \n", +" // End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: change_of_entropy_and_ratio_of_change_of_entropy_and_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clear;\n", +"clc;\n", +"disp('Example 7.7');\n", +"\n", +"// aim : To determine the \n", +"// (a) change of entropy\n", +"// (b) The approximate change of entropy obtained by dividing the heat transferred by the gas by the mean absolute temperature during the compression\n", +"\n", +"// Given values\n", +"P1 = 140;// initial pressure,[kN/m^2]\n", +"V1 = .14;// initial volume, [m^3]\n", +"T1 = 273+25;// initial temperature,[K]\n", +" P2 = 1400;// final pressure [kN/m^2]\n", +" n = 1.25; // polytropic index\n", +" cp = 1.041;// [kJ/kg K]\n", +" cv = .743;// [kJ/kg K]\n", +" \n", +" // solution\n", +" // (a)\n", +" R = cp-cv;// [kJ/kg/K]\n", +" // using ideal gas equation \n", +" m = P1*V1/(R*T1);// mass of gas,[kg]\n", +" // since gas is following law P*V^n=constant ,so \n", +" V2 = V1*(P1/P2)^(1/n);// [m^3]\n", +" \n", +" // using eqn [9]\n", +" del_s = m*(cp*log(V2/V1)+cv*log(P2/P1));// [kJ/K]\n", +" mprintf('\n (a) The change of entropy is = %f kJ/K\n',del_s);\n", +" \n", +" // (b)\n", +" W = (P1*V1-P2*V2)/(n-1);// polytropic work,[kJ]\n", +" Gamma = cp/cv;// heat capacity ratio\n", +" Q = (Gamma-n)/(Gamma-1)*W;// heat transferred,[kJ]\n", +" \n", +" // Again using polytropic law\n", +" T2 = T1*(V1/V2)^(n-1);// final temperature, [K]\n", +" T_avg = (T1+T2)/2;// mean absolute temperature, [K]\n", +" \n", +" // so approximate change in entropy is\n", +" del_s = Q/T_avg;// [kJ/K]\n", +" \n", +" mprintf('\n (b) The approximate change of entropy obtained by dividing the heat transferred by the gas by the mean absolute temperature during the compression = %f kJ/K\n',del_s);\n", +" \n", +" // End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: change_of_entropies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.8');\n", +"\n", +"// aim : To determine\n", +"// the change of entropy\n", +"\n", +"// Given values\n", +"m = .3;// [kg]\n", +"P1 = 350;// [kN/m^2]\n", +"T1 = 273+35;// [K]\n", +"P2 = 700;// [kN/m^2]\n", +"V3 = .2289;// [m^3]\n", +"cp = 1.006;// [kJ/kg K]\n", +"cv = .717;// [kJ/kg K]\n", +"\n", +"// solution\n", +"// for constant volume process\n", +"R = cp-cv;// [kJ/kg K]\n", +"// using PV=mRT\n", +"V1 = m*R*T1/P1;// [m^3]\n", +"\n", +"// for constant volume process P/T=constant,so\n", +"T2 = T1*P2/P1;// [K]\n", +"s21 = m*cv*log(P2/P1);// formula for entropy change for constant volume process\n", +"mprintf('\n The change of entropy in constant volume process is = %f kJ/kg K\n',s21);\n", +"\n", +"// 'For the above part result given in the book is wrong\n", +"\n", +"V2 = V1;\n", +"// for constant pressure process\n", +"T3 = T2*V3/V2;// [K]\n", +"s32 = m*cp*log(V3/V2);// [kJ/kg K]\n", +"\n", +"mprintf('\n The change of entropy in constant pressure process is = %f kJ/kg K\n',s32);\n", +"\n", +"// there is misprint in the book's result\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: change_of_entropy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 7.9');\n", +"\n", +"// aim : To determine\n", +"// the change of entropy\n", +"\n", +"// Given values\n", +"P1 = 700;// initial pressure, [kN/m^2]\n", +"T1 = 273+150;// Temperature ,[K]\n", +"V1 = .014;// initial volume, [m^3]\n", +"V2 = .084;// final volume, [m^3]\n", +"\n", +"// solution\n", +"// since process is isothermal so\n", +"T2 = T1;\n", +"// and using fig.7.10\n", +"del_s = P1*V1*log(V2/V1)/T1 ;// [kJ/K]\n", +"mprintf('\n The change of entropy is = %f kJ/kg K\n',del_s);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/8-Combustion.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/8-Combustion.ipynb new file mode 100644 index 0000000..9e0474e --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/8-Combustion.ipynb @@ -0,0 +1,1321 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Combustion" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: volumetric_composition_of_products.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.10');\n", +"\n", +"// aim : To determine\n", +"// volumetric composition of the products of combustion\n", +"\n", +"// given values\n", +"C = .86;// mass composition of carbon\n", +"H = .14;// mass composition of hydrogen\n", +"Ea = .20;// excess air for combustion\n", +"O2 = .23;// mass composition of O2 in air \n", +"\n", +"MCO2 = 44;// moleculer mass of CO2\n", +"MH2O = 18;// moleculer mass of H2O\n", +"MO2 = 32;// moleculer mass of O2\n", +"MN2 = 28;// moleculer mass of N2,\n", +"\n", +"\n", +"// solution\n", +"sO2 = (8/3*C+8*H);// stoichiometric O2 required, [kg/kg petrol]\n", +"sair = sO2/O2;// stoichiometric air required, [kg/kg petrol]\n", +"// for one kg petrol\n", +"mCO2 = 11/3*C;// mass of CO2,[kg]\n", +"mH2O = 9*H;// mass of H2O, [kg]\n", +"mO2 = Ea*sO2;// mass of O2, [kg]\n", +"mN2 = 14.84*(1+Ea)*(1-O2);// mass of N2, [kg]\n", +"\n", +"mt = mCO2+mH2O+mO2+mN2;// total mass, [kg]\n", +"// percentage mass composition\n", +"x1 = mCO2/mt*100;// mass composition of CO2\n", +"x2 = mH2O/mt*100;// mass composition of H2O\n", +"x3 = mO2/mt*100;// mass composition of O2\n", +"x4 = mN2/mt*100;// mass composition of N2\n", +"\n", +"vt = x1/MCO2+x2/MH2O+x3/MO2+x4/MN2;// total volume of petrol\n", +"v1 = x1/MCO2/vt*100;// %age composition of CO2 by volume\n", +"v2 = x2/MH2O/vt*100;// %age composition of H2O by volume\n", +"v3 = x3/MO2/vt*100;// %age composition of O2 by volume\n", +"v4 = x4/MN2/vt*100;// %age composition of N2 by volume\n", +" \n", +"mprintf('\nThe percentage composition of CO2 by volume is = %f\n,\nThe percentage composition of H2O by volume is = %f\n,\nThe percentage composition of O2 by volume is = %f\n,\nThe percentage composition of N2 by volume is = %f\n',v1,v2,v3,v4);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: energy_carried_away.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.11');\n", +"\n", +"// aim : To determine\n", +"// the energy carried away by the dry flue gas/kg of fuel burned\n", +"\n", +"// given values\n", +"C = .78;// mass composition of carbon\n", +"H2 = .06;// mass composition of hydrogen\n", +"O2 = .09;// mass composition of oxygen\n", +"Ash = .07;// mass composition of ash\n", +"Ea = .50;// excess air for combustion\n", +"aO2 = .23;// mass composition of O2 in air \n", +"Tb = 273+20;// boiler house temperature, [K]\n", +"Tf = 273+320;// flue gas temperature, [K]\n", +"c = 1.006;// specific heat capacity of dry flue gas, [kJ/kg K]\n", +"\n", +"// solution\n", +"// for one kg of fuel\n", +"sO2 = (8/3*C+8*H2);// stoichiometric O2 required, [kg/kg fuel]\n", +"sO2a = sO2-O2;// stoichiometric O2 required from air, [kg/kg fuel]\n", +"sair = sO2a/aO2;// stoichiometric air required, [kg/kg fuel]\n", +"ma = sair*(1+Ea);// actual air supplied/kg of fuel, [kg]\n", +"// total mass of flue gas/kg fuel is\n", +"mf = ma+1;// [kg]\n", +"mH2 = 9*H2;//H2 produced, [kg] \n", +"// hence, mass of dry flue gas/kg coall is\n", +"m = mf-mH2;// [kg]\n", +"Q = m*c*(Tf-Tb);// energy carried away by flue gas, [kJ]\n", +"mprintf('\n The energy carried away by the dry flue gas/kg is = %f kg\n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12: stoichiometric_volume_and_composition_of_products.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.12');\n", +"\n", +"// aim : To determine\n", +"// (a) the stoichiometric volume of air for the complete combustion of 1 m^3\n", +"// (b) the percentage volumetric analysis of the products of combustion\n", +"\n", +"// given values\n", +"N2 = .018;// volumetric composition of N2\n", +"CH4 = .94;// volumetric composition of CH4\n", +"C2H6 = .035;// volumetric composition of C2H6\n", +"C3H8 = .007;// volumetric composition of C3H8\n", +"aO2 = .21;// O2 composition in air\n", +"\n", +"// solution\n", +"// (a)\n", +"// for CH4\n", +"// CH4 +2 O2= CO2 + 2 H2O\n", +"sva1 = 2/aO2;// stoichiometric volume of air, [m^3/m^3 CH4]\n", +"svn1 = sva1*(1-aO2);// stoichiometric volume of nitrogen in the air, [m^3/m^3 CH4]\n", +"\n", +"// for C2H6\n", +"// 2 C2H6 +7 O2= 4 CO2 + 6 H2O\n", +"sva2 = 7/2/aO2;// stoichiometric volume of air, [m^3/m^3 C2H6]\n", +"svn2 = sva2*(1-aO2);// stoichiometric volume of nitrogen in the air, [m^3/m^3 C2H6]\n", +"\n", +"// for C3H8\n", +"// C3H8 +5 O2=3 CO2 + 4 H2O\n", +"sva3 = 5/aO2;// stoichiometric volume of air, [m^3/m^3 C3H8]\n", +"svn3 = sva3*(1-aO2);// stoichiometric volume of nitrogen in the air, [m^3/m^3 C3H8]\n", +"\n", +"Sva = CH4*sva1+C2H6*sva2+C3H8*sva3;// stoichiometric volume of air required, [m^3/m^3 gas]\n", +"mprintf('\n (a) The stoichiometric volume of air for the complete combustion = %f m^3m^3 gas\n',Sva);\n", +"\n", +"// (b)\n", +"// for one m^3 of natural gas\n", +"vCO2 = CH4*1+C2H6*2+C3H8*3;// volume of CO2 produced, [m^3]\n", +"vH2O = CH4*2+C2H6*3+C3H8*4;// volume of H2O produced, [m^3]\n", +"vN2 = CH4*svn1+C2H6*svn2+C3H8*svn3+N2;// volume of N2 produced, [m^3]\n", +"\n", +"vg = vCO2+vH2O+vN2;// total volume of gas, [m^3]\n", +"x1 = vCO2/vg*100;// volume percentage of CO2 produced\n", +"x2 = vH2O/vg*100;// volume percentage of H2O produced\n", +"x3 = vN2/vg*100;// volume percentage of N2 produced\n", +"\n", +"mprintf('\n (b) The percentage volumetric composition of CO2 in produced is = %f\n,\n The percentage volumetric composition of H2O in produced is = %f\n,\n The percentage volumetric composition of N2 in produced is = %f\n',x1,x2,x3);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13: volume_and_composition_by_mass.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.13');\n", +"\n", +"// aim : To determine\n", +"// (a) the volume of air taken by the fan\n", +"// (b) the percentage composition of dry flue gas\n", +"\n", +"// gien values\n", +"C = .82;// mass composition of carbon\n", +"H = .08;// mass composition of hydrogen\n", +" O = .03;// mass composition of oxygen\n", +" A = .07;// mass composition of ash\n", +"mc = .19;// coal uses, [kg/s] \n", +" ea = .3;// percentage excess air of oxygen in the air required for combustion\n", +"Oa = .23;// percentage of oxygen by mass in the air\n", +" \n", +" // solution\n", +" // (a)\n", +" P = 100;// air pressure, [kN/m^2]\n", +" T = 18+273;// air temperature, [K]\n", +" R = .287;// [kJ/kg K]\n", +" // basis one kg coal\n", +" sO2 = 8/3*C+8*H;// stoichiometric O2 required, [kg]\n", +" aO2 = sO2-.03;// actual O2 required, [kg]\n", +"tO2 = aO2/Oa;// theoretical O2 required, [kg]\n", +"Aa = tO2*(1+ea);// actual air supplied, [kg]\n", +"m = Aa*mc;// Air supplied, [kg/s]\n", +"\n", +"// now using P*V=m*R*T\n", +"V = m*R*T/P;// volume of air taken ,[m^3/s]\n", +"mprintf('\n (a) Volume of air taken by fan is = %f m^3/s\n',V);\n", +"\n", +"// (b)\n", +"mCO2 = 11/3*C;// mass of CO2 produced, [kg]\n", +"mO2 = aO2*.3;// mass of O2 produces, [kg]\n", +"mN2 = Aa*.77;// mass of N2 produced, [[kg]\n", +"mt = mCO2+mO2+mN2;// total mass, [kg]\n", +"\n", +"mprintf('\n (b) Percentage mass composition of CO2 is = %f percent \n',mCO2/mt*100);\n", +"mprintf('\n Percentage mass composition of O2 is = %f percent\n',mO2/mt*100)\n", +"mprintf('\n Percentage mass composition of N2 is = %f percent \n',mN2/mt*100)\n", +"\n", +"\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14: mass_and_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.14');\n", +"\n", +"// aim : To determine \n", +"// (a) the mass of fuel used per cycle\n", +"// (b) the actual mass of air taken in per cycle\n", +"// (c) the volume of air taken in per cycle\n", +"\n", +"// given values\n", +"W = 15;// work done, [kJ/s]\n", +"N = 5;// speed, [rev/s]\n", +"C = .84;// mass composition of carbon\n", +"H = .16;// mass composition of hydrogen\n", +"ea = 1;// percentage excess air supplied \n", +"CV = 45000;// calorificvalue of fuel, [kJ/kg]\n", +"n_the = .3;// thermal efficiency\n", +"P = 100;// pressuer, [kN/m^2]\n", +"T = 273+15;// temperature, [K]\n", +"R = .29;// gas constant, [kJ/kg K]\n", +"\n", +"// solution\n", +"// (a)\n", +"E = W*2/N/n_the;// energy supplied, [kJ/cycle]\n", +"mf = E/CV;// mass of fuell used, [kg]\n", +"mprintf('\n (a) Mass of fuel used per cycle is = %f g\n',mf*10^3);\n", +"\n", +"// (b)\n", +"// basis 1 kg fuel\n", +"mO2 = C*8/3+8*H;// mass of O2 requirea, [kg]\n", +"smO2 = mO2/.23;// stoichiometric mass of air, [kg]\n", +"ma = smO2*(1+ea);// actual mass of air supplied, [kg]\n", +"m = ma*mf;// mass of air supplied, [kg/cycle]\n", +"mprintf('\n (b) The mass of air supplied per cycle is = %f kg\n',m);\n", +"\n", +"// (c)\n", +"V = m*R*T/P;// volume of air, [m^3]\n", +"mprintf('\n (c) The volume of air taken in per cycle is = %f m^3\n',V);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15: mass_and_composition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.15');\n", +"\n", +"// aim : To determine\n", +"// (a) the mass of coal used per hour\n", +"// (b) the mass of air used per hour\n", +"// (c) the percentage analysis of the flue gases by mass\n", +"\n", +"// given values\n", +"m = 900;// mass of steam boiler generate/h, [kg]\n", +"x = .96;// steam dryness fraction\n", +"P = 1400;// steam pressure, [kN/m^2]\n", +"Tf = 52;// feed water temperature, [C]\n", +"BE = .71;// boiler efficiency\n", +"CV = 33000;// calorific value of coal, [kJkg[\n", +"ea = .22;// excess air supply\n", +"aO2 = .23;// oxygen composition in air\n", +"c = 4.187;// specific heat capacity of water, [kJ/kg K]\n", +"\n", +"// coal composition\n", +"C = .83;// mass composition of carbon\n", +"H2 = .05;// mass composition of hydrogen\n", +"O2 = .03;// mass composition of oxygen\n", +"ash = .09;// mass composition of ash\n", +"\n", +"// solution\n", +"// from steam table at pressure P\n", +"hf = 830.1;// specific enthalpy, [kJ/kg]\n", +"hfg = 1957.1;// specific enthalpy, [kJ/kg]\n", +"hg = 2728.8;// specific enthalpy, [kJ/kg]\n", +"\n", +"// (a)\n", +"h = hf+x*hfg;// specific enthalpy of steam generated by boiler, [kJ/kg]\n", +"hfw = c*Tf;// specific enthalpy of feed water, [kJ/kg]\n", +"Q = m*(h-hfw);// energy to steam/h, [kJ]\n", +"Qf = Q/BE;// energy required from fuel/h, [kJ]\n", +"mc = Qf/CV;// mass of coal/h,[kg]\n", +"mprintf('\n (a) The mass of coal used per hour is = %f kg\n',mc);\n", +"\n", +"// (b)\n", +"// for one kg coal\n", +"mO2 = 8/3*C+8*H2+-O2;// actual mass of O2 required, [kg]\n", +"mta = mO2/aO2;// theoretical mass of air, [kg]\n", +"ma = mta*(1+ea);// mass of air supplied, [kg]\n", +"mas = ma*mc;// mass of air supplied/h, [kg]\n", +"mprintf('\n (b) The mass of air supplied per hour is = %f kg\n',mas);\n", +"\n", +" \n", +"// (c)\n", +"// for one kg coal\n", +"mCO2 = 11/3*C;// mass of CO2 produced, [kg]\n", +"mH2O = 9*H2;// mass of H2O produced, [kg]\n", +"mO2 = mO2*ea;// mass of excess O2 in flue gas, [kg]\n", +"mN2 = ma*(1-aO2);// mass of N2 in flue gas, [kg]\n", +"\n", +"mt = mCO2+mH2O+mO2+mN2;// total mass of gas\n", +"x1 = mCO2/mt*100;// mass percentage composition of CO2\n", +"x2 = mH2O/mt*100;// mass percentage composition of H2O\n", +"x3 = mO2/mt*100;// mass percentage composition of O2\n", +"x4 = mN2/mt*100;// mass percentage composition of N2\n", +"\n", +"mprintf('\n (c) The mass percentage composition of CO2 = %f,\n The mass percentage composition of H2O = %f,\n The mass percentage composition of O2 = %f,\n The mass percentage composition of N2 = %f',x1,x2,x3,x4);\n", +"\n", +"// mass of coal taken in part (b) is wrong so answer is not matching\n", +"\n", +"// End\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16: volume_average_moleculer_mass_characteristic_gas_constant_and_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.16');\n", +"\n", +"// aim : To determine\n", +"// (a) volume of gas\n", +"// (b) (1) the average molecular mass of air\n", +"// (2) the value of R\n", +"// (3) the mass of 1 m^3 of air at STP\n", +"\n", +"// given values\n", +"n = 1;// moles of gas, [kmol]\n", +"P = 101.32;// standard pressure, [kN/m^2]\n", +"T = 273;// gas tempearture, [K]\n", +"\n", +"O2 = 21;// percentage volume composition of oxygen in air\n", +"N2 = 79;// percentage volume composition of nitrogen in air\n", +"R = 8.3143;// molar gas constant, [kJ/kg K]\n", +"mO2 = 32;// moleculer mass of O2\n", +"mN2 = 28;// moleculer mass of N2\n", +"\n", +"// solution\n", +"// (a)\n", +"V = n*R*T/P;// volume of gas, [m^3]\n", +"mprintf('\n (a) The volume of the gas is = %f m^3\n',V);\n", +"\n", +"// (b)\n", +"//(1)\n", +"Mav = (O2*mO2+N2*mN2)/(O2+N2);// average moleculer mass of air\n", +"mprintf('\n (b)(1) The average moleculer mass of air is = %f g/mol\n',Mav);\n", +"\n", +"// (2)\n", +"Rav = R/Mav;// characteristic gas constant, [kJ/kg k]\n", +"mprintf('\n (2) The value of R is = %f kJ/kg K\n',Rav);\n", +"\n", +"// (3)\n", +"rho = Mav/V;// density of air, [kg/m^3]\n", +"mprintf('\n (3) The mass of one cubic metre of air at STP is = %f kg/m^3\n',rho);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17: pressures_and_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.17');\n", +"\n", +"// aim : To determine\n", +"// (a) the partial pressure of each gas in the vessel\n", +"// (b) the volume of the vessel\n", +"// (c) the total pressure in the gas when temperature is raised to228 C\n", +"\n", +"// given values\n", +"MO2 = 8;// mass of O2, [kg]\n", +"MN2 = 7;// mass of N2, [kg]\n", +"MCO2 = 22;// mass of CO2, [kg]\n", +"\n", +"P = 416;// total pressure in the vessel, [kN/m^2]\n", +"T = 273+60;// vessel temperature, [K]\n", +"R = 8.3143;// gas constant, [kJ/kmol K]\n", +"\n", +"mO2 = 32;// molculer mass of O2 \n", +"mN2 = 28;// molculer mass of N2\n", +"mCO2 = 44;// molculer mass of CO2\n", +"\n", +"// solution\n", +"// (a)\n", +"n1 = MO2/mO2;// moles of O2, [kmol]\n", +"n2 = MN2/mN2;// moles of N2, [kmol]\n", +"n3 = MCO2/mCO2;// moles of CO2, [kmol]\n", +"\n", +"n = n1+n2+n3;// total moles in the vessel, [kmol]\n", +"// since,Partial pressure is proportinal, so\n", +"P1 = n1*P/n;// partial pressure of O2, [kN/m^2]\n", +"P2 = n2*P/n;// partial pressure of N2, [kN/m^2]\n", +"P3 = n3*P/n;// partial pressure of CO2, [kN/m^2]\n", +"\n", +"mprintf('\n (a)The partial pressure of O2 is = %f kN/m^2,\n, The partial pressure of N2 is = %f kN/m^2,\n The partial pressure of CO2 is = %f kN/m^2,\n',P1,P2,P3);\n", +"\n", +"// (b)\n", +"// assuming ideal gas \n", +"V = n*R*T/P;// volume of the container, [m^3]\n", +"mprintf('\n (b) The volume of the container is = %f m^3\n',V);\n", +"\n", +"// (c)\n", +"T2 = 273+228;// raised vessel temperature, [K]\n", +"// so volume of vessel will constant , P/T=constant\n", +"P2 = P*T2/T;// new pressure in the vessel , [kn/m62]\n", +"mprintf('\n (c) The new total pressure in the vessel is = %f kN/m^2\n',P2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18: mass_and_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.18');\n", +"\n", +"// aim : To determine\n", +"// the actual mass of air supplied/kg coal\n", +"// the velocity of flue gas\n", +"\n", +"// given values\n", +"mc = 635;// mass of coal burn/h, [kg]\n", +"ea = .25;// excess air required\n", +"C = .84;// mass composition of carbon\n", +"H2 = .04;// mass composition of hydrogen\n", +"O2 = .05;// mass composition of oxygen\n", +"ash = 1-(C+H2+O2);// mass composition of ash\n", +"\n", +"P1 = 101.3;// pressure, [kJn/m^2]\n", +"T1 = 273;// temperature, [K]\n", +"V1 = 22.4;// volume, [m^3]\n", +"\n", +"T2 = 273+344;// gas temperature, [K]\n", +"P2 = 100;// gas pressure, [kN/m^2]\n", +"A = 1.1;// cross section area, [m^2]\n", +"aO2 = .23;// composition of O2 in air\n", +"\n", +"mCO2 = 44;// moleculer mass of carbon\n", +"mH2O = 18;// molecular mass of hydrogen\n", +"mO2 = 32;// moleculer mas of oxygen\n", +"mN2 = 28;// moleculer mass of nitrogen\n", +"\n", +"// solution\n", +"mtO2 = 8/3*C+8*H2-O2;// theoretical O2 required/kg coal, [kg]\n", +"msa= mtO2/aO2;// stoichiometric mass of air supplied/kg coal, [kg]\n", +"mas = msa*(1+ea);// actual mass of air supplied/kg coal, [kg]\n", +"\n", +"m1 = 11/3*C;// mass of CO2/kg coal produced, [kg]\n", +"m2 = 9*H2;// mass of H2/kg coal produced, [kg]\n", +"m3 = mtO2*ea;// mass of O2/kg coal produced, [kg]\n", +"m4 = mas*(1-aO2);// mass of N2/kg coal produced, [kg]\n", +"\n", +"mt = m1+m2+m3+m4;// total mass, [kg]\n", +"x1 = m1/mt*100;// %age mass composition of CO2 produced\n", +"x2 = m2/mt*100;// %age mass composition of H2O produced\n", +"x3 = m3/mt*100;// %age mass composition of O2 produced\n", +"x4 = m4/mt*100;// %age mass composition of N2 produced\n", +"\n", +"vt = x1/mCO2+x2/mH2O+x3/mO2+x4/mN2;// total volume\n", +"v1 = x1/mCO2/vt*100;// %age volume composition of CO2\n", +"v2 = x2/mH2O/vt*100;// %age volume composition of H2O\n", +"v3 = x3/mO2/vt*100;// %age volume composition of O2\n", +"v4 = x4/mN2/vt*100;// %age volume composition of N2\n", +"\n", +"Mav = (v1*mCO2+v2*mH2O+v3*mO2+v4*mN2)/(v1+v2+v3+v4);// average moleculer mass, [kg/kmol]\n", +"// since no of moles is constant so PV/T=constant\n", +"V2 = P1*V1*T2/(P2*T1);//volume, [m^3]\n", +"\n", +"mp = mt*mc/3600;// mass of product of combustion/s, [kg]\n", +"\n", +"V = V2*mp/Mav;// volume of flowing gas /s,[m^3]\n", +"\n", +"v = V/A;// velocity of flue gas, [m/s]\n", +"mprintf('\n The actual mass of air supplied is = %f kg/kg coal\n',mas);\n", +"mprintf('\n The velocity of flue gas is = %f m/s\n',v);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19: temperature_and_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.19');\n", +"\n", +"// aim : To determine\n", +"// (a) the temperature of the gas after compression\n", +"// (b) the density of the air-gas mixture\n", +"\n", +"// given values\n", +"CO = 26;// %age volume composition of CO \n", +"H2 = 16;// %age volume composition of H2\n", +"CH4 = 7;// %age volume composition of CH4 \n", +"N2 = 51;// %age volume composition of N2\n", +"\n", +"P1 = 103;// gas pressure, [kN/m^2]\n", +"T1 = 273+21;// gas temperature, [K]\n", +"rv = 7;// volume ratio\n", +"\n", +"aO2 = 21;// %age volume composition of O2 in the air\n", +"c = 21;// specific heat capacity of diatomic gas, [kJ/kg K]\n", +"cCH4 = 36;// specific heat capacity of CH4, [kJ/kg K]\n", +"R = 8.3143;// gas constant, [kJ/kg K]\n", +"\n", +"mCO = 28;// moleculer mass of carbon\n", +"mH2 = 2;// molecular mass of hydrogen\n", +"mCH4 = 16;// moleculer mas of methane\n", +"mN2 = 28;// moleculer mass of nitrogen\n", +"mO2 = 32;// moleculer mass of oxygen\n", +"\n", +"// solution\n", +"// (a)\n", +"Cav = (CO*c+H2*c+CH4*cCH4+N2*c+100*2*c)/(100+200);// heat capacity, [kJ/kg K]\n", +"\n", +"Gama = (Cav+R)/Cav;// heat capacity ratio\n", +"// rv = V1/V2\n", +"// process is polytropic, so\n", +"T2 = T1*(rv)^(Gama-1);// final tempearture, [K]\n", +"mprintf('\n (a) The temperature of the gas after compression is = %f C\n',T2-273);\n", +"\n", +"// (b)\n", +"\n", +"Mav = (CO*mCO+H2*mH2+CH4*mCH4+N2*mN2+42*mO2+158*mN2)/(100+200)\n", +"\n", +"// for 1 kmol of gas\n", +"V = R*T1/P1;// volume of one kmol of gas, [m^3]\n", +"// hence\n", +"rho = Mav/V;// density of gas, [kg/m^3]\n", +"\n", +"mprintf('\n (b) The density of air-gas mixture is = %f kg/m^3\n',rho);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: stoichiometric_mass.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clear;\n", +"clc;\n", +"disp('Example 8.1');\n", +"\n", +"// aim : To determine\n", +"// the stoichiometric mass of air required to burn 1 kg the fuel \n", +"\n", +"// Given values\n", +"C = .72;// mass fraction of C; [kg/kg]\n", +"H2 = .20;// mass fraction of H2;, [kg/kg]\n", +"O2 = .08;// mass fraction of O2, [kg/kg]\n", +"aO2=.232;// composition of oxygen in air\n", +"\n", +"// solution\n", +"// for 1kg of fuel\n", +"mO2 = 8/3*C+8*H2-O2;// mass of O2, [kg]\n", +"\n", +"// hence stoichiometric mass of O2 required is\n", +"msO2 = mO2/aO2;// [kg]\n", +"\n", +"mprintf('\n The stoichiometric mass of air required to burn 1 kg the fuel should be = %f kg\n',msO2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20: stoichiometric_equatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.20');\n", +"\n", +"// aim : to determine \n", +"// stoichiometric equation for combustion of hydrogen\n", +"\n", +"// solution\n", +"// equation with algebric coefficient is\n", +"// H2+aO2+79/21*aN2=bH2O+79/21*aN2\n", +"// by equating coefficients\n", +"b = 1;\n", +"a = b/2;\n", +"// so equation becomes\n", +"// 2 H2+ O2+3.76 N2=2 H2O+3.76 N2\n", +"disp('The required stoichiometric equation is = ');\n", +"disp('2 H2+ O2+3.76 N2 = 2 H2O+3.76 N2');\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.22: gravimetric_compositio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.22');\n", +"\n", +"// aim : To determine\n", +"// the percentage gravimetric analysis of the total products of combustion\n", +"\n", +"// given values\n", +"CO = 12;// %age volume composition of CO\n", +"H2 = 41;// %age volume composition of H2\n", +"CH4 = 27;// %age volume composition of CH4\n", +"O2 = 2;// %age volume composition of O2\n", +"CO2 = 3;// %age volume composition of CO2\n", +"N2 = 15;// %age volume composition of N2\n", +"\n", +"mCO2 = 44;// moleculer mass of CO2,[kg/kmol]\n", +"mH2O = 18;// moleculer mass of H2O, [kg/kmol]\n", +"mO2 = 32;// moleculer mass of O2, [kg/kmol]\n", +"mN2 = 28;// moleculer mass of N2, [kg/kmol]\n", +" \n", +"ea = 15;// %age excess air required\n", +"aO2 = 21;// %age air composition in the air\n", +"\n", +"// solution\n", +"// combustion equation by no. of moles\n", +"// 12CO + 41H2 + 27CH4 + 2O2 + 3CO2 + 15N2 + aO2+79/21*aN2 = bCO2 + dH2O + eO2 + 15N2 +79/21*aN2\n", +"// equating C coefficient\n", +"b = 12+27+3;// [mol]\n", +"// equatimg H2 coefficient\n", +"d = 41+2*27;// [mol]\n", +"// O2 required is 15 % extra,so\n", +"// e/(e-a)=.15 so e=.13a\n", +"// equating O2 coefficient\n", +"// 2+3+a=b+d/2 +e\n", +"\n", +"a = (b+d/2-5)/(1-.13);\n", +"e = .13*a;// [mol]\n", +"\n", +"// gravimetric analysis of product\n", +"v1 = b*mCO2;// gravimetric volume of CO2 \n", +"v2 = d*mH2O ;// gravimetric volume of H2O \n", +"v3 = e*mO2;// gravimetric volume of O2\n", +"v4 = 15*mN2 +79/21*a*mN2;// gravimetric volume of N2 \n", +"\n", +"vt = v1+v2+v3+v4;// total\n", +"x1 = v1/vt*100;// percentage gravimetric of CO2\n", +"x2 = v2/vt*100;// percentage gravimetric of H2O\n", +"x3 = v3/vt*100;// percentage gravimetric of O2\n", +"x4 = v4/vt*100;// percentage gravimetric of N2\n", +"\n", +"mprintf('\n Percentage gravimetric composition of CO2 = %f\n ,\n Percentage gravimetric composition of H2O = %f\n\n Percentage gravimetric composition of O2 = %f\n\n Percentage gravimetric composition of N2 = %f\n',x1,x2,x3,x4);\n", +"\n", +"// End " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.23: mass_and_volumetric_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.23');\n", +"\n", +"// aim : To determine\n", +"// (a) the actual quantity of air supplied/kg of fuel\n", +"// (b) the volumetric efficiency of the engine\n", +"\n", +"// given values\n", +"d = 300*10^-3;// bore,[m]\n", +"L = 460*10^-3;// stroke,[m]\n", +"N = 200;// engine speed, [rev/min]\n", +"\n", +"C = 87;// %age mass composition of Carbon in the fuel\n", +"H2 = 13;// %age mass composition of H2 in the fuel\n", +"\n", +"mc = 6.75;// fuel consumption, [kg/h]\n", +"\n", +"CO2 = 7;// %age composition of CO2 by volume\n", +"O2 = 10.5;// %age composition of O2 by volume\n", +"N2 = 7;// %age composition of N2 by volume\n", +"\n", +"mC = 12;// moleculer mass of CO2,[kg/kmol]\n", +"mH2 = 2;// moleculer mass of H2, [kg/kmol]\n", +"mO2 = 32;// moleculer mass of O2, [kg/kmol]\n", +"mN2 = 28;// moleculer mass of N2, [kg/kmol]\n", +"\n", +"T = 273+17;// atmospheric temperature, [K]\n", +"P = 100;// atmospheric pressure, [kn/m^2]\n", +"R =.287;// gas constant, [kJ/kg k]\n", +"\n", +"// solution\n", +"// (a)\n", +"// combustion equation by no. of moles\n", +"// 87/12 C + 13/2 H2 + a O2+79/21*a N2 = b CO2 + d H2O + eO2 + f N2\n", +"// equating coefficient\n", +"b = 87/12;// [mol]\n", +"a = 22.7;// [mol]\n", +"e = 10.875;// [mol]\n", +"f = 11.8*b;// [mol]\n", +"// so fuel side combustion equation is\n", +"// 87/12 C + 13/2 H2 +22.7 O2 +85.5 N2\n", +"mair = ( 22.7*mO2 +85.5*mN2)/100;// mass of air/kg fuel, [kg]\n", +"mprintf('\n (a) The mass of actual air supplied per kg of fuel is = %f kg\n',mair);\n", +"\n", +"// (b)\n", +"m = mair*mc/60;// mass of air/min, [kg]\n", +"V = m*R*T/P;// volumetric flow of air/min, [m^3]\n", +"SV = %pi/4*d^2*L*N/2;// swept volume/min, [m^3]\n", +"\n", +"VE = V/SV;// volumetric efficiency\n", +"mprintf('\n (b) The volumetric efficiency of the engine is = %fpercent\n',VE*100);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.24: mass_of_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.24');\n", +"\n", +"// aim : To determine\n", +"// the mass of air supplied/kg of fuel burnt\n", +"\n", +"// given values\n", +"// gas composition in the fuel\n", +"C = 84;// %age mass composition of Carbon in the fuel\n", +"H2 = 14;// %age mass composition of H2 in the fuel\n", +"O2f = 2;// %age mass composition of O2 in the fuel\n", +"\n", +"// exhaust gas composition\n", +"CO2 = 8.85;// %age composition of CO2 by volume\n", +"CO = 1.2// %age composition of CO by volume\n", +"O2 = 6.8;// %age composition of O2 by volume\n", +"N2 = 83.15;// %age composition of N2 by volume\n", +"\n", +"mC = 12;// moleculer mass of CO2,[kg/kmol]\n", +"mH2 = 2;// moleculer mass of H2, [kg/kmol]\n", +"mO2 = 32;// moleculer mass of O2, [kg/kmol]\n", +"mN2 = 28;// moleculer mass of N2, [kg/kmol]\n", +"\n", +"// solution\n", +"// combustion equation by no. of moles\n", +"// 84/12 C + 14/2 H2 +2/32 O2 + a O2+79.3/20.7*a N2 = b CO2 + d CO2+ eO2 + f N2 +g H2\n", +"// equating coefficient and given condition\n", +"b = 6.16;// [mol]\n", +"a = 15.14;// [mol]\n", +"d = .836;// [mol]\n", +"f = 69.3*d;// [mol]\n", +"// so fuel side combustion equation is\n", +"// 84/12 C + 14/2 H2 +2/32 O2 + 15.14 O2 +85.5 N2\n", +"mair = ( a*mO2 +f*mN2)/100;// mass of air/kg fuel, [kg]\n", +"mprintf('\n The mass of air supplied per kg of fuel is = %f kg\n',mair);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: stoichiometric_mass_and_composition_of_products.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.3');\n", +"\n", +"// aim : To determine \n", +"// the stoichiometric mass of air\n", +"// the products of combustion both by mass and as percentage \n", +"\n", +"// Given values\n", +"C = .82;// mass composition C\n", +"H2 = .12;// mass composition of H2\n", +"O2 = .02;// mass composition of O2\n", +"S = .01;// mass composition of S\n", +"N2 = .03;// mass composition of N2\n", +"\n", +" // solution\n", +"// for 1kg fuel\n", +"mo2 = 8/3*C+8*H2-O2+S*1;// total mass of O2 required, [kg]\n", +"sa = mo2/.232;// stoichimetric air, [kg]\n", +"mprintf('\n The stoichiometric mass of air is = %f kg/kg fuel\n',sa);\n", +"\n", +"// for one kg fuel\n", +"mCO2 = C*11/3;// mass of CO2 produced, [kg]\n", +"mH2O = H2*9;// mass of H2O produced, [kg]\n", +"mSO2 = S*2;// mass of SO2 produce, [kg]\n", +"mN2 = C*8.84+H2*26.5-O2*.768/.232+S*3.3+N2;// mass of N2 produced, [kg]\n", +"\n", +"mt = mCO2+mH2O+mSO2+mN2;// total mass of product, [kg]\n", +"\n", +"x1 = mCO2/mt*100;// %age mass composition of CO2 produced\n", +"x2 = mH2O/mt*100;// %age mass composition of H2O produced\n", +"x3 = mSO2/mt*100;// %age mass composition of SO2 produced\n", +"x4 = mN2/mt*100;// %age mass composition of N2 produced\n", +"\n", +"mprintf('\n CO2 produced = %f kg/kg fuel, percentage composition = %f,\n H2O produced = %f kg/kg fuel, percentage composition = %f,\n SO2 produced = %f kg/kg fuel, percentage composition = %f,\n N2 produced = %f kg/kg fuel, percentage composition = %f',mCO2,x1,mH2O,x2,mSO2,x3,mN2,x4);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: stoichiometric_volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.4');\n", +"\n", +"// aim : To determine \n", +"// the stoichiometric volume of air required for complete combution of 1 m^3 of the gas\n", +"\n", +"// Given values\n", +"H2 = .14;// volume fraction of H2\n", +"CH4 = .02;// volume fraction of CH4\n", +"CO = .22;// volume fraction of CO\n", +"CO2 = .05;// volume fraction of CO2\n", +"O2 = .02;// volume fraction of O2\n", +"N2 = .55;// volume fraction of N2\n", +"\n", +"// solution\n", +"// for 1 m^3 of fuel\n", +"Va = .5*H2+2*CH4+.5*CO-O2;// [m^3]\n", +"\n", +"// stoichiometric air required is\n", +"Vsa = Va/.21;// [m^3]\n", +"\n", +"mprintf('\n The stoichiometric volume of air required for complete combustion is = %f m^3/m^3 fuel\n',Vsa);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: volume.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.5');\n", +"\n", +"// aim : To determine\n", +"// the volume of the air required \n", +"\n", +"// Given values\n", +"H2 = .45;// volume fraction of H2\n", +"CO = .40;// volume fraction of CO\n", +"CH4 = .15;// volume fraction of CH4\n", +"\n", +"// solution\n", +"V = 2.38*(H2+CO)+9.52*CH4;// stoichimetric volume of air, [m^3]\n", +"\n", +"mprintf('\n The volume of air required is = %f m^3/m^3 fuel\n',V);\n", +"\n", +"// Result in the book is misprinted\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: stoichiometric_volume_composition_of_products.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.6');\n", +"\n", +"// aim : To determine\n", +"// the stoichiometric volume of air for the complete combustion\n", +"// the products of combustion\n", +"\n", +"// given values\n", +"CH4 = .142;// volumetric composition of CH4\n", +"CO2 = .059;// volumetric composition of CO2\n", +"CO = .360;// volumetric composition of CO\n", +"H2 = .405;// volumetric composition of H2\n", +"O2 = .005;// volumetric composition of O2\n", +"N2 = .029;// volumetric composition of N2\n", +"\n", +"aO2 = .21;// O2 composition into air by volume\n", +"\n", +"// solution\n", +"svO2 = CH4*2+CO*.5+H2*.5-O2;// stroichiometric volume of O2 required, [m^3/m^3 fuel]\n", +"svair = svO2/aO2;// stroichiometric volume of air required, [m^3/m^3 fuel]\n", +"mprintf('\n Stoichiometric volume of air required is = %f m^3/m^3 fuel\n',svair);\n", +"\n", +"// for one m^3 fuel\n", +"vN2 = CH4*7.52+CO*1.88+H2*1.88-O2*.79/.21+N2;// volume of N2 produced, [m^3]\n", +"vCO2 = CH4*1+CO2+CO*1;// volume of CO2 produced, [m^3]\n", +"vH2O = CH4*2+H2*1;// volume of H2O produced, [m^3]\n", +"\n", +"vt = vN2+vCO2+vH2O;// total volume of product, [m^3]\n", +"\n", +"x1 = vN2/vt*100;// %age composition of N2 in product,\n", +"x2 = vCO2/vt*100;// %age composition of CO2 in product\n", +"x3 = vH2O/vt*100;// %age composition of H2O in product\n", +"\n", +"mprintf('\n N2 in products = %fm^3/m^3 fuel, percentage composition = %f,\n CO2 in products = %f m^3/m^3 fuel, percentage composition = %f,\n H2O in products = %fm^3/m^3 fuel, percentage composition = %f',vN2,x1,vCO2,x2,vH2O,x3);\n", +"\n", +"// End " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: composition_of_gases.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.7');\n", +"\n", +"// aim : To determine\n", +"// the percentage analysis of the gas by mass\n", +"\n", +"// Given values\n", +"CO2 = 20;// percentage volumetric composition of CO2\n", +"N2 = 70;// percentage volumetric composition of N2\n", +"O2 = 10;// percentage volumetric composition of O2\n", +"\n", +"mCO2 = 44;// moleculer mas of CO2\n", +"mN2 = 28;// moleculer mass of N2\n", +"mO2 = 32;// moleculer mass of O2\n", +"\n", +"// solution\n", +"mgas = CO2*mCO2+N2*mN2+O2*mO2;// moleculer mass of gas \n", +"m1 = CO2*mCO2/mgas*100;// percentage composition of CO2 by mass \n", +"m2 = N2*mN2/mgas*100;// percentage composition of N2 by mass \n", +"m3 = O2*mO2/mgas*100;// percentage composition of O2 by mass \n", +"\n", +"mprintf('\n Mass percentage of CO2 is = %f\n\n Mass percentage of N2 is = %f\n\n Mass percentage of O2 is = %f\n',m1,m2,m3 )\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: composition_of_gases.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.8');\n", +"\n", +"// aim : To determine\n", +"// the percentage composition of the gas by volume\n", +"\n", +"// given values\n", +"CO = 30;// %age mass composition of CO\n", +"N2 = 20;// %age mass composition of N2\n", +"CH4 = 15;// %age mass composition of CH4\n", +"H2 = 25;// %age mass composition of H2\n", +"O2 = 10;// %age mass composition of O2\n", +"\n", +"mCO = 28;// molculer mass of CO\n", +"mN2 = 28;// molculer mass of N2\n", +"mCH4 = 16;// molculer mass of CH4\n", +"mH2 = 2;// molculer mass of H2\n", +"mO2 = 32;// molculer mass of O2\n", +"\n", +"// solution\n", +"vg = CO/mCO+N2/mN2+CH4/mCH4+H2/mH2+O2/mO2;\n", +"v1 = CO/mCO/vg*100;// %age volume composition of CO\n", +"v2 = N2/mN2/vg*100;// %age volume composition of N2\n", +"v3 = CH4/mCH4/vg*100;// %age volume composition of CH4\n", +"v4 = H2/mH2/vg*100;// %age volume composition of H2\n", +"v5 = O2/mO2/vg*100;// %age volume composition of O2\n", +"\n", +"mprintf('\n The percentage composition of CO by volume is = %f\n,\nThe percentage composition of N2 by volume is = %f\n\nThe percentage composition of CH4 by volume is = %f\n\nThe percentage composition of H2 by volume is = %f\n\nThe percentage composition of O2by volume is=%f',v1,v2,v3,v4,v5);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: mass_of_air_supplied.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 8.9');\n", +"\n", +"// aim : To determine\n", +"// the mass of air supplied per kilogram of fuel burnt\n", +"\n", +"// given values\n", +"CO2 = 8.85;// volume composition of CO2\n", +"CO = 1.2;// volume composition of CO\n", +"O2 = 6.8;// volume composition of O2\n", +"N2 = 83.15;// volume composition of N2 \n", +"\n", +"// composition of gases in the fuel oil\n", +"C = .84;// mass composition of carbon \n", +"H = .14;// mass composition of hydrogen\n", +"o2 = .02;// mass composition of oxygen\n", +"\n", +"mC = 12;// moleculer mass of Carbon\n", +"mCO2 = 44;// molculer mass of CO2\n", +"mCO = 28;// molculer mass of CO\n", +"mN2 = 28;// molculer mass of N2\n", +"mO2 = 32;// molculer mass of O2\n", +"aO2 = .23;// mass composition of O2 in air\n", +"\n", +"// solution\n", +"ma = (8/3*C+8*H-o2)/aO2;// theoretical mass of air/kg fuel, [kg]\n", +"\n", +"mgas = CO2*mCO2+CO*mCO+N2*mN2+O2*mO2;// total mass of gas/kg fuel, [kg]\n", +"x1 = CO2*mCO2/mgas;// composition of CO2 by mass \n", +"x2 = CO*mCO/mgas;// composition of CO by mass\n", +"x3 = O2*mO2/mgas;// composition of O2 by mass \n", +"x4 = N2*mN2/mgas;// composition of N2 by mass \n", +"\n", +"m1 = x1*mC/mCO2+x2*mC/mCO;// mass of C/kg of dry flue gas, [kg]\n", +"m2 = C;// mass of C/kg fuel, [kg]\n", +"mf = m2/m1;// mass of dry flue gas/kg fuel, [kg]\n", +"mo2 = mf*x3;// mass of excess O2/kg fuel, [kg]\n", +"mair = mo2/aO2;// mass of excess air/kg fuel, [kg]\n", +"m = ma+mair;// mass of excess air supplied/kg fuel, [kg]\n", +"\n", +"mprintf('\n The mass of air supplied per/kg of fuel burnt is = %f kg\n',m);\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 +} diff --git a/Basic_Engineering_Thermodynamics_by_R_Joel/9-Heat_transfer.ipynb b/Basic_Engineering_Thermodynamics_by_R_Joel/9-Heat_transfer.ipynb new file mode 100644 index 0000000..3e3e005 --- /dev/null +++ b/Basic_Engineering_Thermodynamics_by_R_Joel/9-Heat_transfer.ipynb @@ -0,0 +1,399 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Heat transfer" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: interface_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.1');\n", +"\n", +"// aim : To determine \n", +"// the heat loss per hour through the wall and interface temperature\n", +"\n", +"// Given values\n", +"x1 = .25;// thickness of brick,[m]\n", +"x2 = .05;// thickness of concrete,[m]\n", +"t1 = 30;// brick face temperature,[C]\n", +"t3 = 5;// concrete face temperature,[C]\n", +"l = 10;// length of the wall, [m]\n", +"h = 5;// height of the wall, [m]\n", +"k1 = .69;// thermal conductivity of brick,[W/m/K]\n", +"k2 = .93;// thermal conductivity of concrete,[W/m/K]\n", +"\n", +"// solution\n", +"A = l*h;// area of heat transfer,[m^2]\n", +"Q_dot = A*(t1-t3)/(x1/k1+x2/k2);// heat transferred, [J/s]\n", +"\n", +"// so heat loss per hour is\n", +"Q = Q_dot*3600*10^-3;// [kJ]\n", +"mprintf('\n The heat lost per hour is = %f kJ\n',Q);\n", +"\n", +"// interface temperature calculation\n", +"// for the brick wall, Q_dot=k1*A*(t1-t2)/x1;\n", +"// hence\n", +"t2 = t1-Q_dot*x1/k1/A;// [C]\n", +"mprintf('\n The interface temperature is = %f C\n',t2);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: thickness_of_lagging.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.2');\n", +"\n", +"// aim : To determine\n", +"// the minimum \n", +"// thickness of the lagging required\n", +"\n", +"// Given values\n", +"r1 = 75/2;// external radious of the pipe,[mm]\n", +"L = 80;// length of the pipe,[m]\n", +"m_dot = 1000;// flow of steam, [kg/h]\n", +"P = 2;// pressure, [MN/m^2]\n", +"x1 = .98;// inlet dryness fraction\n", +"x2 = .96;// outlet dryness fraction\n", +"k = .08;// thermal conductivity of of pipe, [W/m/K]\n", +"t2 = 27;// outside temperature,[C]\n", +"\n", +"// solution\n", +"// using steam table at 2 MN/m^2 the enthalpy of evaporation of steam is,\n", +"hfg = 1888.6;// [kJ/kg]\n", +"// so heat loss through the pipe is\n", +"Q_dot = m_dot*(x1-x2)*hfg/3600;// [kJ]\n", +"\n", +"// also from steam table saturation temperature of steam at 2 MN/m^2 is,\n", +"t1 = 212.4;// [C]\n", +"// and for thick pipe, Q_dot=k*2*%pi*L*(t1-t2)/log(r2/r1)\n", +"// hence\n", +"r2 = r1*exp(k*2*%pi*L*(t1-t2)*10^-3/Q_dot);// [mm]\n", +"\n", +"t = r2-r1;// thickness, [mm]\n", +"\n", +"mprintf('\n The minimum thickness of the lagging required is = %f mm\n',t);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: heat_lost_and_interface_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.3');\n", +"\n", +"// aim : To determine the\n", +"// (a) heat loss per hour\n", +"// (b) interface temperature og lagging\n", +"\n", +"// Given values\n", +"r1 = 50; // radious of steam main,[mm]\n", +"r2 = 90;// radious with first lagging,[mm]\n", +"r3 = 115;// outside radious os steam main with lagging,[mm]\n", +"k1 = .07;// thermal conductivity of 1st lagging,[W/m/K]\n", +"k2 = .1;// thermal conductivity of 2nd lagging, [W/m/K]\n", +"P = 1.7;// steam pressure,[MN/m^2]\n", +"t_superheat = 30;// superheat of steam, [K]\n", +"t3 = 24;// outside temperature of the lagging,[C]\n", +"L = 20;// length of the steam main,[m]\n", +"\n", +"// solution\n", +"// (a)\n", +"// using steam table saturation temperature of steam at 1.7 MN/m^2 is\n", +"t_sat = 204.3;// [C]\n", +"// hence\n", +"t1 = t_sat+t_superheat;// temperature of steam,[C]\n", +"\n", +"Q_dot = 2*%pi*L*(t1-t3)/(log(r2/r1)/k1+log(r3/r2)/k2);// heat loss,[W]\n", +"// heat loss in hour is\n", +"Q = Q_dot*3600*10^-3;// [kJ]\n", +"\n", +"mprintf('\n (a) The heat lost per hour is = %f kJ\n',Q);\n", +"\n", +"// (b)\n", +"// using Q_dot=2*%pi*k1*(t1-t1)/log(r2/r1) \n", +"t2 = t1-Q_dot*log(r2/r1)/(2*%pi*k1*L);// interface temperature of lagging,[C]\n", +"\n", +"mprintf('\n (b) The interface temperature of the lagging is = %f C\n',t2);\n", +"\n", +"// There is some calculation mistake in the book so answer is not matching\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: energy_emitted.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.4');\n", +"\n", +"// aim : To determine \n", +"// the energy emetted from the surface\n", +"\n", +"// Given values\n", +"h = 3;// height of surface, [m]\n", +"b = 4;// width of surface, [m]\n", +"epsilon_s = .9;// emissivity of the surface\n", +"T = 273+600;// surface temperature ,[K]\n", +"sigma = 5.67*10^-8;// [W/m^2/K^4]\n", +"\n", +"// solution\n", +"As = h*b;// area of the surface, [m^2]\n", +"\n", +"Q_dot = epsilon_s*sigma*As*T^4*10^-3;// energy emitted, [kW]\n", +"\n", +"mprintf('\n The energy emitted from the surface is = %f kW\n',Q_dot);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: Rate_of_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.5');\n", +"\n", +"// aim : To determine \n", +"// the rate of energy transfer between furnace and the sphere and its direction\n", +"\n", +"// Given values\n", +"l = 1.25;// internal side of cubical furnace, [m]\n", +"ti = 800+273;// internal surface temperature of the furnace,[K]\n", +"r = .2;// sphere radious, [m]\n", +"epsilon = .6;// emissivity of sphere\n", +"ts = 300+273;// surface temperature of sphere, [K]\n", +"sigma = 5.67*10^-8;// [W/m^2/K^4]\n", +"\n", +"// Solution\n", +"Af = 6*l^2;// internal surface area of furnace, [m^2]\n", +"As =4 *%pi*r^2;// surface area of sphere, [m^2]\n", +"\n", +"// considering internal furnace to be black\n", +"Qf = sigma*Af*ti^4*10^-3;// [kW]\n", +"\n", +"// radiation emitted by sphere is\n", +"Qs = epsilon*sigma*As*ts^4*10^-3; // [kW]\n", +"\n", +"// Hence transfer of energy is\n", +"Q = Qf-Qs;// [kW]\n", +"\n", +"mprintf('\n The transfer of energy will be from furnace to sphere and transfer rate is = %f kW\n',Q);\n", +"\n", +"// There is some calculation mistake in the book so answer is not matching\n", +"\n", +"// End\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: overall_heat_transfer_coefficient_and_heat_lost.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.6');\n", +"\n", +"// aim : To determine\n", +"// the overall transfer coefficient and the heat loss per hour\n", +"\n", +"// Given values\n", +"x1 = 25*10^-3;// Thickness of insulating board, [m]\n", +"x2 = 75*10^-3;// Thickness of fibreglass, [m]\n", +"x3 = 110*10^-3;// Thickness of brickwork, [m]\n", +"k1 = .06;// Thermal conductivity of insulating board, [W/m K]\n", +"k2 = .04;// Thermal conductivity of fibreglass, [W/m K]\n", +"k3 = .6;// Thermal conductivity of brickwork, [W/m K]\n", +"Us1 = 2.5;// surface heat transfer coefficient of the inside wall,[W/m^2 K]\n", +"Us2 = 3.1;// surface heat transfer coefficient of the outside wall,[W/m^2 K]\n", +"ta1 = 27;// internal ambient temperature, [C]\n", +"ta2 = 10;// external ambient temperature, [C]\n", +"h = 6;// height of the wall, [m]\n", +"l = 10;// length of the wall, [m]\n", +"\n", +"// solution\n", +"U = 1/(1/Us1+x1/k1+x2/k2+x3/k3+1/Us2);// overall heta transfer coefficient,[W/m^2 K]\n", +"\n", +"A = l*h;// area ,[m^2]\n", +"\n", +"Q_dot = U*A*(ta1-ta2);// heat loss [W]\n", +"\n", +"// so heat loss per hour is\n", +"Q = Q_dot*3600*10^-3;// [kJ]\n", +"mprintf('\n The overall heat transfer coefficient for the wall is = %f W/m^2 K\n',U);\n", +"mprintf('\n The heat loss per hour through the wall is = %f kJ\n',Q);\n", +"\n", +"// End" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: heat_lost_and_surafce_temperature_of_lagging.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"disp('Example 9.7');\n", +"\n", +"// aim : To determine \n", +"// the heat loss per hour and the surface temperature of the lagging\n", +"\n", +"// Given values\n", +"r1 = 75*10^-3;// External radiou of the pipe, [m]\n", +"t_l1 = 40*10^-3;// Thickness of lagging1, [m]\n", +"t_l2 = t_l1;\n", +"k1 = .07;// thermal conductivity of lagging1, [W/m K]\n", +"k2 = .1;// thermal conductivity of lagging2, [W/m K]\n", +"Us = 7;// surface transfer coefficient for outer surface, [W/m^2 K]\n", +"L = 50;// length of the pipe, [m]\n", +"ta = 27;// ambient temperature, [C]\n", +"P = 3.6;// wet steam pressure, [MN/m^2]\n", +"\n", +"// solution\n", +"// from steam table saturation temperature of the steam at given pressure is,\n", +"t1 = 244.2;// [C]\n", +"r2 = r1+t_l1;// radious of pipe with lagging1,[m]\n", +"r3 = r2+t_l2;// radious of pipe with both the lagging, [m]\n", +"\n", +"R1 = log(r2/r1)/(2*%pi*L*k1);// resistance due to lagging1,[C/W]\n", +"R2 = log(r3/r2)/(2*%pi*L*k2);// resistance due to lagging2,[C/W]\n", +"R3 = 1/(Us*2*%pi*r3*L);// ambient resistance, [C/W]\n", +"\n", +"// hence overall resistance is,\n", +"Req = R1+R2+R3;// [C/W]\n", +"tdf = t1-ta;// temperature driving force, [C]\n", +"Q_dot = tdf/Req;// rate of heat loss, [W]\n", +"// so heat loss per hour is,\n", +"Q = Q_dot*3600*10^-3;// heat loss per hour, [kJ]\n", +"\n", +"// using eqn [3]\n", +"t3 = ta+Q_dot*R3;// surface temperature of the lagging, [C]\n", +"\n", +"mprintf('\n The heat loss per hour is = %f kJ\n',Q);\n", +"mprintf('\n The surface temperature of the lagging is = %f C\n',t3);\n", +"\n", +"// there is minor variation in the answer\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 +} |