{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 8: Availability and Irreversibility" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.1: Availability_and_unavailability_of_heat.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa 8.1\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "Q = 16;// in MJ\n", "Q = Q * 10^3;// in kJ\n", "T_H = 227;// in °C\n", "T_H = T_H + 273;// in K\n", "T_L = 15;// in °C\n", "T_L = T_L + 273;// in K\n", "del_S = Q/T_H;// in kJ/K\n", "A = Q - (T_L * del_S);// in kJ\n", "disp(A,'The available part of heat in kJ is '); \n", "U_P_ofHeat = T_L * del_S;// unavailable part of heat in kJ\n", "disp(U_P_ofHeat,'The unavailable part of heat in kJ is :');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.2: Availability_and_unavailability_of_system.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa 8.2\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "Q = 12000;// in kJ\n", "T_H = 600;// in K\n", "T_L = 300;// in K\n", "dS = Q / T_H;//in kJ/K\n", "A = Q - (T_L * dS);//available work in kJ\n", "disp(A,'Available work is in kJ');\n", "UA = T_L * dS;//unavailable work in kJ\n", "disp(UA,'Anavailable work is in kJ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.3: Available_and_unavailable_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 8.3\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "m = 800;// in kg\n", "C_p = 0.5;// in kJ/kg K\n", "T2 = 500;// in K\n", "T1 = 1250;// in K\n", "T_o = 300;// in K\n", "del_t = T1 - T2;// in K\n", "Q = m * C_p * del_t;// in kJ\n", "dS = abs(m * C_p * log(T2/T1));// in kJ/K\n", "availableEnergy = Q - (T_o * dS);//in kJ\n", "disp(round(availableEnergy*10^-3),'Available energy in MJ is :');\n", "unavailableEnergy = T_o * dS;// UA stands for unavailable energy in kJ\n", "disp(round(unavailableEnergy*10^-3),'Unavailable energy in MJ is :');\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.4: Availability_per_kg_of_steam_entering_and_leaving_the_turbine.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa 8.4\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "h_i = 726.1;\n", "h_o = 25.03;\n", "T_o = 298;// in K\n", "s_i = 1.582;\n", "s_o = 0.087;\n", "h2 = 669;\n", "s2 = 1.677;\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));// in kcl/kg\n", "disp(sai_i,'The availablibity per kg of steam entering in kcl/kg is :');\n", "sai_e = (0.25 * ((h2 - h_o) - (T_o * (s2 - s_o)))) + (0.75 * ((h3 - h_o) - (T_o * (s3 - s_o)))) ;// in kcl/kg\n", "disp(sai_e,'The availablibity per kg of steam leaving in kcl/kg is :');\n", "w_rev = sai_i - sai_e;// in kcl/kg\n", "disp(w_rev,'reveseble work per kg of steam in kcl/kg');\n", "\n", "// Note: There is calculation error in evaluating the value of availability per kg of steam leaving in kcl/kg . so the answer in the book is wrong and coding is right." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.5: Irreversibility.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 8.5\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "T_o = 298;// in K\n", "m2 = 25000;\n", "s2 = 16775;\n", "m3 = 75000;\n", "s3 = 17448;\n", "m1 = 1000000;\n", "s1 = 1582;\n", "Q = -16;// in MJ\n", "Q = Q * 10^3;// in kJ\n", "I = (T_o * ((m2 * s2) + (m3 * s3) - (m1 * s1))) - Q;// in cal/hr\n", "I=I*10^-3;// in kcal/hr\n", "disp(I,'The irreversiblity in kcal/hr');\n", "\n", "// Note: There is calculation error in evaluating the value of the irreversibility in kcal/hr. so the answer in the book is wrong and coding is right." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.6: Availability_per_kg_of_steam.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 8.6\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "h_i = 749.2;\n", "h_o = 25.03;\n", "T_o = 298;// in K\n", "s_i = 1.6202;\n", "s_o = 0.0877;\n", "phi_i = (h_i - h_o)- (T_o * (s_i - s_o));// kcal/kg\n", "disp(phi_i,'The availablibity before adiabatic throttling in kcal/kg is : ');\n", "h_e = 749.2;\n", "s_e = 1.6936;\n", "phi_e = (h_e - h_o) - (T_o * (s_e - s_o));// in kcal/kg\n", "disp(phi_e,'The availablibity before adiabatic throttling in kcal/kg is : ');\n", "Wrev = phi_i - phi_e;// in kcal/kg\n", "disp(Wrev,'Reversible work in kcal/kg is : ');\n", "Wactual = 0;\n", "i = Wrev-Wactual;// in kcal/kg\n", "disp(i,'Irreversibility per kg of steam in kcal/kg is : ');\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 8.7: Lost_work.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa 8.7\n", "clc;\n", "clear;\n", "close;\n", "// Given data\n", "// del_W = T * ds - del_Q\n", "T = 600;// in K\n", "p_i = 7;//kgf/cm^2\n", "p_e = 1.5;//kgf/cm^2\n", "T_o = 298;// in K\n", "R = 29.27/427;\n", "del_W_lost = T * ( R *log(p_i/p_e));// in kcal/kg\n", "disp(del_W_lost,'Lost work in kcal/kg is');\n", "i = T_o * (R * (log(p_i/p_e)));// in kcal/kg\n", "disp(i,'Irreversebility per kg of air flow in kcal/kg is');" ] } ], "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 }