{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 8 : Availability and Irreversibility" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.1 Page No : 185" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The available part of heat in kJ is 6784.0\n", "The unavailable part of heat in kJ is : 9216.0\n" ] } ], "source": [ "\n", "# Variables\n", "Q = 16.;\t\t\t# in MJ\n", "Q = Q * 10**3;\t\t\t# in kJ\n", "T_H = 227.;\t\t\t# in °C\n", "T_H = T_H + 273;\t\t\t# in K\n", "T_L = 15.;\t\t\t# in °C\n", "T_L = T_L + 273;\t\t\t# in K\n", "\n", "# Calculations and Results\n", "del_S = Q/T_H;\t\t\t# in kJ/K\n", "A = Q - (T_L * del_S);\t\t\t# in kJ\n", "print \"The available part of heat in kJ is \",A\n", "\n", "U_P_ofHeat = T_L * del_S;\t\t\t# unavailable part of heat in kJ\n", "print \"The unavailable part of heat in kJ is :\",U_P_ofHeat\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.2 Page No : 185" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Available work is in kJ 6000.0\n", "Unavailable work is in kJ 6000.0\n" ] } ], "source": [ "\n", "# Variables\n", "Q = 12000.;\t\t\t# in kJ\n", "T_H = 600.;\t\t\t# in K\n", "T_L = 300.;\t\t\t# in K\n", "\n", "# Calculations and Results\n", "dS = Q / T_H;\t\t\t#in kJ/K\n", "A = Q - (T_L * dS);\t\t\t#available work in kJ\n", "print \"Available work is in kJ\",A\n", "\n", "UA = T_L * dS;\t\t\t#unavailable work in kJ\n", "print \"Unavailable work is in kJ\",UA\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.3 Page No : 185" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Available energy in MJ is : 190.0\n", "Unavailable energy in MJ is : 110.0\n" ] } ], "source": [ "import math \n", "\n", "# Variables\n", "m = 800.;\t\t\t# in kg\n", "C_p = 0.5;\t\t\t# in kJ/kg K\n", "T2 = 500.;\t\t\t# in K\n", "T1 = 1250.;\t\t\t# in K\n", "T_o = 300.;\t\t\t# in K\n", "\n", "# Calculations and Results\n", "del_t = T1 - T2; \t\t\t# in K\n", "Q = m * C_p * del_t; \t \t\t# in kJ\n", "dS = abs(m * C_p * math.log(T2/T1));\t\t\t# in kJ/K\n", "availableEnergy = Q - (T_o * dS);\t\t\t#in kJ\n", "print \"Available energy in MJ is :\",round(availableEnergy*10**-3)\n", "\n", "unavailableEnergy = T_o * dS;\t\t\t# UA for unavailable energy in kJ\n", "print \"Unavailable energy in MJ is :\",(round(unavailableEnergy*10**-3))\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.4 Page No : 197" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The availablibity per kg of steam entering in kcl/kg is : 255.56\n", "The availablibity per kg of steam leaving in kcl/kg is : 75.50\n", "reversible work per kg of steam in kcl/kg is : 180.0598\n" ] } ], "source": [ "\n", "# Variables\n", "h_i = 726.1;\n", "h_o = 25.03;\n", "T_o = 298;\t\t\t# in K\n", "s_i = 1.582;\n", "s_o = 0.087;\n", "h2 = 669.;\n", "s2 = 1.677;\n", "\n", "# Calculations and Results\n", "h3 = 52.17 + (0.9 * 567.7);\n", "s3 = 0.1748 + (0.9 * 1.7448);\n", "sai_i = (h_i - h_o) - (T_o * (s_i - s_o));\t\t\t# in kcl/kg\n", "print \"The availablibity per kg of steam entering in kcl/kg is : %.2f\"%sai_i\n", "\n", "sai_e = (0.25 * ((h2 - h_o) - (T_o * (s2 - s_o)))) + (0.75 * ((h3 - h_o) - (T_o * (s3 - s_o)))) ;\t\t\t# in kcl/kg\n", "print \"The availablibity per kg of steam leaving in kcl/kg is : %.2f\"%sai_e\n", "\n", "w_rev = sai_i - sai_e;\t\t\t# in kcl/kg\n", "print \"reversible work per kg of steam in kcl/kg is : %.4f\"%w_rev\n", "\n", "# Note: There is calculation error in evaluating the value of availability per kg of \n", "# steam leaving in kcl/kg . so the answer in the book is wrong and coding is right.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.5 Page No : 198" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The irreversiblity in kcal/hr 43500566.0\n" ] } ], "source": [ "\n", "# Variables\n", "T_o = 298;\t\t\t# in K\n", "m2 = 25000;\n", "s2 = 16775;\n", "m3 = 75000;\n", "s3 = 17448;\n", "m1 = 1000000;\n", "s1 = 1582;\n", "Q = -16;\t\t\t# in MJ\n", "\n", "# Calculations\n", "Q = Q * 10**3;\t\t\t# in kJ\n", "I = (T_o * ((m2 * s2) + (m3 * s3) - (m1 * s1))) - Q;\t\t\t# in cal/hr\n", "I=I*10**-3;\t\t\t# in kcal/hr\n", "\n", "# Results\n", "print \"The irreversiblity in kcal/hr\",I\n", "\n", "# Note: There is calculation error in evaluating the value of the irreversibility\n", "# in kcal/hr. so the answer in the book is wrong and coding is right.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.6 Page No : 198" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The availablibity before adiabatic throttling in kcal/kg is : 267.49\n", "The availablibity before adiabatic throttling in kcal/kg is : 245.61\n", "Reversible work in kcal/kg is : 21.87\n", "Irreversibility per kg of steam in kcal/kg is : 21.87\n" ] } ], "source": [ "\n", "# Variables\n", "h_i = 749.2;\n", "h_o = 25.03;\n", "T_o = 298;\t\t\t# in K\n", "s_i = 1.6202;\n", "s_o = 0.0877;\n", "\n", "# Calculations and Results\n", "phi_i = (h_i - h_o)- (T_o * (s_i - s_o));\t\t\t# kcal/kg\n", "print \"The availablibity before adiabatic throttling in kcal/kg is : %.2f\"%phi_i\n", "\n", "h_e = 749.2;\n", "s_e = 1.6936;\n", "phi_e = (h_e - h_o) - (T_o * (s_e - s_o));\t\t\t# in kcal/kg\n", "print \"The availablibity before adiabatic throttling in kcal/kg is : %.2f\"%phi_e\n", "\n", "Wrev = phi_i - phi_e;\t\t\t# in kcal/kg\n", "print \"Reversible work in kcal/kg is : %.2f\"%Wrev\n", "\n", "Wactual = 0;\n", "i = Wrev-Wactual;\t\t\t# in kcal/kg\n", "print \"Irreversibility per kg of steam in kcal/kg is : %.2f\"%i\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.7 Page No : 199" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Lost work in kcal/kg is 63.3567\n", "Irreversebility per kg of air flow in kcal/kg is : 31.467\n" ] } ], "source": [ "import math \n", "\n", "# Variables\n", "# del_W = T * ds - del_Q\n", "T = 600;\t\t\t# in K\n", "p_i = 7;\t\t\t#kgf/cm**2\n", "p_e = 1.5;\t\t\t#kgf/cm**2\n", "T_o = 298;\t\t\t# in K\n", "\n", "# Calculations and Results\n", "R = 29.27/427;\n", "del_W_lost = T * ( R *math.log(p_i/p_e));\t\t\t# in kcal/kg\n", "print \"Lost work in kcal/kg is\",round(del_W_lost,4)\n", "\n", "i = T_o * (R * (math.log(p_i/p_e)));\t\t\t# in kcal/kg\n", "print \"Irreversebility per kg of air flow in kcal/kg is : %.3f\"%i\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }