From 238d7e632aecde748a97437c2b5774e136a3b4da Mon Sep 17 00:00:00 2001 From: nice Date: Wed, 27 Aug 2014 16:12:51 +0530 Subject: adding book --- Chemical_Engineering_Thermodynamics/ch5.ipynb | 974 ++++++++++++++++++++++++++ 1 file changed, 974 insertions(+) create mode 100755 Chemical_Engineering_Thermodynamics/ch5.ipynb (limited to 'Chemical_Engineering_Thermodynamics/ch5.ipynb') diff --git a/Chemical_Engineering_Thermodynamics/ch5.ipynb b/Chemical_Engineering_Thermodynamics/ch5.ipynb new file mode 100755 index 00000000..9cf5b1c8 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics/ch5.ipynb @@ -0,0 +1,974 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Second law of thermodynamics and its applications" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "Q = 1000.;\t\t \t #amount of energy absorbed by the heat engine in kJ/s\n", + "W = 650.;\t\t\t #work delivered by the heat engine in kW\n", + "T_source = 500. \t\t #temperature of the source in degree celsius\n", + "T_sink = 25.\t\t\t #temperature of the sink in degree celsius\n", + "\n", + "# Calculations\n", + "n_claimed = W/Q\n", + "T1 = T_source+273.15\n", + "T2 = T_sink+273.15\n", + "n_carnot = 1-(T2/T1)\n", + "\n", + "# Results\n", + "print \" The efficiency of the Carnot engine = %0.3f \"%(n_carnot);\n", + "print \" The efficiency of the engine claimed by the inventor = %0.2f \"%(n_claimed);\n", + "if n_claimed0 or S_G == 0 :\n", + " print \" As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \"\n", + "else:\n", + " print \" As both the first and second law or either the first or second law of thermodynamics \\\n", + " are not satisfied, the device is not feasible \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The LHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.4 kJ\n", + " The RHS of the equation applied to the flow device to check if the first law of thermodynamics is satisfied = 2745.5 kJ\n", + " The entropy generated by applying the second law of thermodynamics to the flow device = 0.3552 kJ/kgK\n", + " As the first and second law of thermodynamics are satisfied, the device is theoretically feasible \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 30.\t\t\t #pressure of superheated steam entering the turbine in bar\n", + "Ti = 300.\t\t\t #temperature of superheated steam entering the turbine in degree celsius\n", + "Pe = 0.1\t\t\t #pressure at which steam exits the turbine in bar\n", + "Xe = 0.9\t\t\t #quality of steam at the exit (no unit)(for the actual turbine)\n", + "\n", + "# Calculations\n", + "#For superheated steam at Pi and Ti\n", + "hi = 2995.1;\t\t\t #enthalpy of superheated steam at the entrance in kJ/kg\n", + "si = 6.5422;\t\t\t #entropy of superheated steam at the entrance in kJ/kgK\n", + "\n", + "#For steam at Pe\n", + "hf = 191.83;\t\t\t #enthalpy of saturated liquid in kJ/kg\n", + "hg = 2584.8;\t\t\t #enthalpy of saturated vapour in kJ/kg\n", + "sf = 0.6493;\t\t\t #entropy of saturated liquid in kJ/kgK\n", + "sg = 8.1511;\t\t\t #entropy of saturated vapour in kJ/kgK\n", + "\n", + "X2 = (si-sf)/(sg-sf)\n", + "h2 = (hf*(1-X2))+(X2*hg)\n", + "he = (hf*(1-Xe))+(Xe*hg)\n", + "n_T = (hi-he)/(hi-h2)\n", + "\n", + "# Results\n", + "print \" The isentropic efficiency of the turbine = %f \"%(n_T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isentropic efficiency of the turbine = 0.703395 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ti = 25.\t\t\t #temperature of air taken in by the adiabatic air compressor in degree celsius\n", + "Pi = 0.1\t\t\t #pressure of air taken in by the adiabatic air compressor in MPa\n", + "Pe = 1.\t \t\t #discharge pressure of air in MPa\n", + "n_c = 0.8\t\t\t #isentropic efficiency of the compressor (no unit)\n", + "gaamma = 1.4\t\t #ratio of molar specific heat capacities (no unit)\n", + "R = 8.314\t\t\t #universal gas constant in J/molK\n", + "\n", + "# Calculations\n", + "Ti = Ti+273.15\n", + "Te = Ti*(((Pe*10**6)/(Pi*10**6))**((gaamma-1)/gaamma))\n", + "W_s = (((R*gaamma)/(gaamma-1))*(Te-Ti))*10**-3;\t\t\t\n", + "Ws = W_s/n_c\n", + "Te_actual = ((Ws*10**3*(gaamma-1))/(R*gaamma))+Ti\n", + "\n", + "# Results\n", + "print \" The exit temperature of air = %0.2f K\"%(Te_actual);\n", + "print \" The power consumed by the compressor = %f kW/mol\"%(Ws);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The exit temperature of air = 645.01 K\n", + " The power consumed by the compressor = 10.093262 kW/mol\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ti = 30.\t\t\t #temperature of saturated liquid water in degree celsius\n", + "m = 500.\t\t\t #mass flow rate of water being pumped in kg/s\n", + "P2 = 3. \t\t\t #preesure maintained in the boiler in MPa\n", + "n_p = 0.75;\t\t\t #isentropic efficiency of the pump (no unit)\n", + "\n", + "# Calculations\n", + "#For saturated liquid water at Ti\n", + "vf = 0.0010043\n", + "P1 = 4.241;\t\t\n", + "\n", + "Ws_m = (vf*((P2*10**6)-(P1*10**3)))*10**-3\n", + "Ws_act_m = Ws_m/n_p;\t\t\t \n", + "P = ((Ws_act_m*10**3)*m)*10**-6;\n", + "\n", + "# Results\n", + "print \" The power consumed by the pump = %d MW\"%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power consumed by the pump = 2 MW\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 3.\t\t\t #pressure of dry saturated steam entering the nozzle in bar\n", + "Xe = 0.98\t\t #quality of steam exiting the nozzle (no unit)\n", + "Pe = 2.\t\t\t #pressure of steam exiting the nozzle in bar\n", + "\n", + "# Calculations\n", + "#For steam at Pi\n", + "hi = 2724.7\n", + "he = 2652.8\n", + "V2_2_s = hi-he\n", + "\n", + "#For steam at Pe\n", + "hf = 504.70\n", + "hg = 2706.3\n", + "he_act = ((1-Xe)*hf)+(Xe*hg)\n", + "V2_2 = hi-he_act;\t\t\t\n", + "n_N = (V2_2)/(V2_2_s)\t\t\n", + "\n", + "# Results\n", + "print \" The isentropic efficiency of the nozzle = %0.3f \"%(n_N);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isentropic efficiency of the nozzle = 0.868 \n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit