{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: Second Law of Thermodynamics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.10: Theoretical_problem.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.10\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//The given example is a theoretical problem and it does not involve any numerical computation\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1: EX4_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.1\n", "clear;\n", "clc;\n", "\n", "//Given\n", "Q1 = 250;//Heat absorbed in Kcal\n", "T1 = (260+273);//Temperature at which engine absorbs heat\n", "T0 = (40+273);//Temperature at which engine discards heat\n", "//To Calculate work output, heat rejected, entropy change of system,surronding & total change in entropy and the efficiency of the heat engine\n", "\n", "//(i)Calculation of work output\n", "W = (Q1*((T1-T0)/T1));//Work done using equations 4.7 & 4.9 given on page no 98\n", "mprintf('(i)The work output of the heat engine is %f Kcal',W);\n", "\n", "//(ii)Calculation of heat rejected\n", "Q2 = (Q1*T0)/T1;\n", "mprintf('\n (ii)The heat rejected is %f Kcal',Q2);\n", "\n", "//(iii)Calculation of entropy\n", "del_S1 = -(Q1/T1);//Change in the entropy of source in Kcal/Kg K\n", "del_S2 = Q2/T0;//Change in the entropy of sink in Kcal/Kg K\n", "del_St = del_S1+del_S2;//Total change in entropy in Kcal/Kg K\n", "mprintf('\n (iii)Total change in entropy is %d confirming that the process is reversible',del_St);\n", "\n", "//(iv)Calculation of efficiency\n", "n = (W/Q1)*100;\n", "mprintf('\n (iv)The efficiency of the heat engine is %f percent',n);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2: EX4_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.2\n", "clear;\n", "clc;\n", "\n", "//Given\n", "T1 = 373;//Temperature of the saturated steam in K\n", "T2 = 298;//Temperature of the saturated water in K\n", "//To calculate the total change in entropy and hence determine the reversibility of the process\n", "\n", "//del_H = del_Q+(V*del_P)\n", "//del_H =del_Q; since it is a constant pressure process\n", "\n", "//From steam table,\n", "//enthalpy of saturated steam at 373K is\n", "H1 = 6348.5;// in Kcal/Kg\n", "//enthalpy of saturated liquid water at 373K is\n", "H2 = 99.15;//in Kcal/Kg\n", "Q = H2-H1;//heat rejected in Kcal/Kg\n", "del_S1 = Q/T1;//change in entropy of the system in Kcal/Kg K\n", "del_S2 = Q/T2;//change in entropy of the surronding in Kcal/Kg K\n", "del_St = del_S1+del_S2;//total change in the entropy in Kcal/Kg K\n", "if(del_St == 0)\n", " mprintf('Process is reversible');\n", "else\n", " mprintf('Process is irreversible');\n", "end\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3: To_find_out_entropy_change_of_block_air_and_total_entropy_change.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.3\n", "clear;\n", "clc;\n", "\n", "//Given\n", "Cp = 0.09;//specific heat of metal block in Kcal/Kg K\n", "m = 10;//mass of metal block in Kg\n", "T1 = 323;//initial temperature of the block in K\n", "T2 = 298;//final temperature of the block in K\n", "//constant pressure process\n", "//To find out entropy change of block,air and total entropy change\n", "\n", "//(i)To calculate the entropy change of block\n", "del_S1 = m*Cp*log(T2/T1);\n", "mprintf('(i)Entropy change of block is %f Kcal/Kg K',del_S1);\n", "\n", "//(ii)To calculate the entropy change of air\n", "Q = m*Cp*(T1-T2);//heat absorbed by air = heat rejected by block in Kcal\n", "del_S2 = (Q/T2);\n", "mprintf('\n (ii)Entropy change of air is %f Kcal/Kg K',del_S2);\n", "\n", "//(iii)To calculate the total entropy change\n", "del_St = del_S1+del_S2;\n", "mprintf('\n (iii)Total entropy change is %f Kcal/Kg K',del_St);\n", "if(del_St == 0)\n", " mprintf('\n Process is reversible');\n", "else\n", " mprintf('\n Process is irreversible');\n", "end\n", "//end " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4: To_calculate_the_total_change_in_entropy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.4\n", "clear;\n", "clc;\n", "\n", "//Given\n", "m1 = 10;//mass of metal block in Kg\n", "m2 = 50;//mass of water in Kg\n", "Cp1 = 0.09;//Specific heat of metal block in Kcal/Kg K\n", "Cp2 = 1;//Specific heat of water in Kcal/Kg K\n", "T1 = 50;//Initial temperature of block in deg celsius\n", "T2 = 25;//Final temperature of block in deg celsius\n", "\n", "//To calculate the total change in entropy\n", "//Heat lost by block = Heat gained by water\n", "Tf = ((m1*Cp1*T1)+(m2*Cp2*T2))/((m1*Cp1)+(m2*Cp2));//final temperature of water in deg celsius\n", "Tf1 = Tf+273.16;//final temperature in K\n", "del_S1 = m1*Cp1*log(Tf1/(T1+273));//change in entropy of the block in Kcal/K\n", "del_S2 = m2*Cp2*log(Tf1/(T2+273));//change in entropy of the block in Kcal/K\n", "del_St = del_S1+del_S2;\n", "mprintf('The total change entropy is %f Kcal/K',del_St);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5: To_calculate_the_entropy_change.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.5\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//Air at 20 deg celsius\n", "//P1 = 250;initial pressure in atm\n", "//P2 = 10;final pressure after throttling in atm\n", "\n", "//To calculate the entropy change\n", "//According to the given conditions from figure4.5(page no 103)\n", "S1 = -0.38;//initial entropy in Kcal/Kg K\n", "S2 = -0.15;//final entroy in Kcal/Kg K\n", "del_S = S2-S1;\n", "mprintf('Change in entropy for the throttling process is %f Kcal/Kg K',del_S);\n", "//From figure 4.6(page no 104), the final temperature is -10 deg celsius\n", "//end " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6: Theoretical_problem.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.6\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//The given problem does not involve any numerical comptation\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7: To_calculate_the_horse_power_of_the_compressor.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.7\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//Basis: 1 hour\n", "m = 10;//mass of air in Kg\n", "T = 293;//Constant temperature throughout the process in K\n", "//P1 = 1;//Initial pressure in atm\n", "//P2 = 30;//Final pressure in atm\n", "//According to the given data and using the graph or figure A.2.7 given in page no 105\n", "S1 = 0.02;//Initial entropy in Kcal/Kg\n", "S2 = -0.23;//Final entropy in Kcal/Kg\n", "H1 = 5;//Initial enthalpy in Kcal/Kg\n", "H2 = 3;//Final enthalpy in Kcal/Kg\n", "\n", "W = -((H2-H1)+T*(S2-S1))*m*(427/(3600*75));\n", "mprintf('The horse power of the compressor is %f hp',W);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.8: To_calculate_the_effectiveness_of_the_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.1\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//Basis: 1 Kg of steam\n", "//P1 = 30;Intial pressure in Kgf/cm^2\n", "//P2 = 3;Final pressure in Kgf/cm^2\n", "//T = 300;//Operating temperature\n", "//From figure A.2.8, \n", "H1 = 715;//Initial enthalpy of steam in Kcal/Kg\n", "H2 = 625;//Final enthalpy of steam in Kcal/Kg\n", "S1 = 1.56;//Initial entropy of steam in Kcal/Kg K\n", "S2 = 1.61;//Final entropy of steam in Kcal/Kg K\n", "Q = -1;//heat loss in Kcal/Kg\n", "To = 298;//The lowest surronding temperature in K\n", "\n", "//To calculate the effectiveness of the process\n", "W = (-(H2-H1)+Q);//Actual work output by the turbine in Kcal\n", "//The maximum or available work can be calculated from equation 4.14\n", "del_B = -((H2-H1)-(To*(S2-S1)));// Maximum work that can be obtained in Kcal\n", "E = (W/del_B)*100;\n", "mprintf('The effectiveness of the process is %f percent',E);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.9: To_Calculate_the_maximum_work_obtained_and_the_entropy_change.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 4\n", "//Second Law of Thermodynamics\n", "\n", "//Example 4.9\n", "clear;\n", "clc;\n", "\n", "//Given\n", "m = 1;//mass of liquid water in Kg\n", "T1 = 1350;//initial temperature in deg celsius\n", "T2 = 400;//final temperature in deg celsius\n", "Cp = 1;//Specific heat of water in Kcal/Kg K\n", "Cpg = 0.2;//Specific heat of combustion gases in Kcal/Kg K\n", "Hv = 468.35;//Heat of vapourisation at 14 Kgf/cm^2 and 194.16 deg celsius in Kcak/Kg\n", "To = 298;//Surronding temperature\n", "Tb = 194.16+273;//Boiling point of liquid water\n", "\n", "//To Calculate the maximum work obtained and the entropy change\n", "//(i)Calculation of maximum work\n", "//Q = del_H = m*Cp*(T2-T1); gas can be assumed to cool at constant pressure\n", "//From equation 4.14 (page no 110)\n", "del_B = -((m*Cpg*(T2-T1))-(To*m*Cp*log((T2+273)/(T1+273))));\n", "mprintf('(i)The maximum work that can be obtained is %f Kcal/Kg of gas',del_B);\n", "\n", "//(ii)To Calculate the change in entropy\n", "del_S =(m*Cp*log(Tb/To))+((m*Hv)/Tb);\n", "mprintf('\n(ii)The entropy change per Kg of water is %f',del_S);\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 }