{ "metadata": { "name": "", "signature": "sha256:81bdcd8b52f99578fa3372035df0b4461d5784b0d3f676ae0e588533ba351cbf" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 24 : Applications of Energy Balances in the Absence of Chemical Reactions" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.1 page no. 720\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "print 'Assumptions to be made in eqn. 24.1 in following segments are:'\n", "#(a)- 1 to 5\n", "print '(a)- 1 to 5.'\n", "print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : Q + W = del_H.'\n", "\n", "#(b) 4 to 5\n", "print '(b) 4 to 5.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : del_H = -del_PE . '\n", "\n", "#(c) 3 to 4\n", "print '(c) 3 to 4.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : del_H = -del_PE . '\n", "\n", "#(d) 3 to 5\n", "print '(d) 3 to 5.'\n", "print ' 1. Q = W = 0 '\n", "print ' 2. Probably change in kinetic energy(del_KE)=0.'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' 4. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' Result : del_H = 0 . '\n", "\n", "#(e)- 1 to 3\n", "print '(e) 1 to 3.'\n", "print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n", "print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n", "print ' 3. Change in energy = 0 (process appears to be steady).'\n", "print ' Result : Q + W = del_H.'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Assumptions to be made in eqn. 24.1 in following segments are:\n", "(a)- 1 to 5.\n", " 1. Change in potential energy(del_PE) = 0(no change in level) .\n", " 2. Probably change in kinetic energy(del_KE)=0 .\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : Q + W = del_H.\n", "(b) 4 to 5.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : del_H = -del_PE . \n", "(c) 3 to 4.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : del_H = -del_PE . \n", "(d) 3 to 5.\n", " 1. Q = W = 0 \n", " 2. Probably change in kinetic energy(del_KE)=0.\n", " 3. Change in energy = 0 (process appears to be steady).\n", " 4. Change in potential energy(del_PE) = 0(no change in level) .\n", " Result : del_H = 0 . \n", "(e) 1 to 3.\n", " 1. Change in potential energy(del_PE) = 0(no change in level) .\n", " 2. Probably change in kinetic energy(del_KE)=0 .\n", " 3. Change in energy = 0 (process appears to be steady).\n", " Result : Q + W = del_H.\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.3 page no. 728\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# Variables\n", "# Given\n", "m_CO2 = 10. ;\t\t\t# mass of CO2 - [lb]\n", "Ti_CO2 = 80. ;\t\t\t# Initial temperature of CO2 - [degree F]\n", "Vi = 4.0 ;\t\t\t# Initial volume of CO2-[cubic feet]\n", "f_CO2 = 40./100 ;\t\t\t# Fraction of CO2 that convert to liquid finally \n", "s_Vi = Vi /m_CO2 ;\t\t\t# Initial specific volume of CO2 - [cubic feet/lb]\n", "s_Vf = s_Vi ;\t\t\t# Constant volume -[cubic feet/lb]\n", "Pi = 300. ;\t\t\t# Intial pressure - [psia]\n", "del_Hi = 160. ;\t\t\t# Intial change in specific enthalpy - [Btu/lb]\n", "# Now again use chart to get fnal condition fixed by constant volume line and quality 0.6 , according to book it is \n", "del_Hf = 81. ;\t\t\t# Final change in specific enthalpy - [Btu/lb]\n", "Pf = 140. ;\t\t\t#Final pressure - [psia]\n", "\n", "# Calculations\n", "Q = ((del_Hf - del_Hi) - (Pf * s_Vf * 144/778.2 - Pi * s_Vi * 144/778.2))*m_CO2 ;\t\t\t# Heat removed from the extinguisher -[Btu]\n", "\n", "# Results\n", "print ' Heat removed from the extinguisher is %i Btu .'%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Heat removed from the extinguisher is -671 Btu .\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.4 page no. 730" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "from scipy.optimize import fsolve\n", "\n", "# Pick the system as gas plus heater \n", "# Given\n", "Pi = 1.5 ;\t\t\t# Intial pressure - [Pa]\n", "Vi = 2*10**-3 ;\t\t\t# Initial volume of gas - [cubic metre]\n", "Ti = 300 ;\t\t\t# Initial temperature - [K]\n", "W = 480 ;\t\t\t# Work done by heater on system\n", "t = 5 ;\t\t\t# Time for which current is supplied -[ min]\n", "m_ht = 12 ;\t\t\t# Mass of the heater - [g]\n", "C_ht = 0.35 ;\t\t\t# Heat capacity of heater - [ J/gK]\n", "R = 8.314 ;\t\t\t# Ideal gas constant - [(Pa*cubic metre)/(g mol* K)]\n", "\n", "# It is assumed that heat transfer across system boundary for this short time is negligible , therefore Q = 0\n", "# Using the above assumption the equation reduces to del_U = W, therefore \n", "del_U = W ;\t\t\t# Change in nternal energy - [J]\n", "\n", "# Calculations\n", "# Gas is assumed to be ideal, therefore get n by using pv = nRT\n", "n = (Pi*Vi)/(R*Ti) ;\t\t\t# Number of moles of argon gas -[g mol]\n", "Cp = (5./2)* R ;\t\t\t# Specific heat capacity of argon gas at constant pressure - [ J/gK]\n", "Cv = Cp - R ;\t\t\t# Specific heat capacity of argon gas at constant volume - [ J/gK]\n", "\n", "def f(Tf):\n", " return m_ht*C_ht*(Tf - Ti) + n*Cv*(Tf - Ti) - del_U\n", " \n", "Tf=fsolve(f,400) ;\t\t\t# Final temperature -[K] \n", "\n", "# Results\n", "print ' Final temperature of gas is %.0f K .'%Tf\n", " \n", "Pf = (Tf/Ti)*Pi ;\t\t\t# Final pressure - [Pa]\n", "print ' Final pressure in chamber is %.2f Pa .'%Pf\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Final temperature of gas is 414 K .\n", " Final pressure in chamber is 2.07 Pa .\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 24.5 page no. 732\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# Pick the system as shown in above figure of book\n", "# Given\n", "m_water = 10. ;\t\t\t# Mass of water - [lb]\n", "T_water = 35. ;\t\t\t# Temperature of water - [degree F]\n", "m_ice = 4. ;\t\t\t# Mass of ice - [lb]\n", "T_ice = 32. ;\t\t\t# Temperature of ice - [degree F]\n", "m_stm = 6. ;\t\t\t# Initial mass of steam -[lb]\n", "T_stm = 250. ;\t\t\t# Temperature of stm - [degree F]\n", "p = 20. ;\t\t\t# Pressure of system -[psia]\n", "\n", "m_total = m_water + m_ice + m_stm ;\t\t\t# Mass of H2O in three phases initially -[lb]\n", "\n", "U_ice = -143.6 ;\t\t\t# Specific internal energy of ice -[Btu/lb]\n", "U_water = 3.025 ;\t\t\t# Specific internal energy of water -[Btu/lb]\n", "U_stm = 1092.25 ;\t\t\t# Specific internal energy of steam -[Btu/lb]\n", "V_water = 0.0162 ;\t\t\t# Specific volume of water -[cubic feet/lb]\n", "V_stm = 20.80 ;\t\t\t# Specific volume of steam -[cubic feet/lb]\n", "V_total = m_stm*V_stm ;\t\t\t#Total volume of container ignoring volume of water and ice as they are neglgible\n", "\n", "# Calculations\n", "V_sys = V_total/m_total ;\t\t\t# Specific volume of system -[cubic feet/lb]\n", "U_sys =(m_water*U_water + m_ice*U_ice + m_stm*U_stm)/m_total ;\t\t\t# Final specific internal energy of system -[Btu/lb]\n", "\n", "T1 = 190 ;\t\t\t# assumed temperature\n", "U1 = [157.17,1071.83] ;\t\t\t#specific internal energy of liquid and vapour respetively -[Btu/lb]\n", "V1 = [0.0165,41.01] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n", "x1 = V_sys/V1[1] ;\t\t\t# Quality of vapour\n", "U1_sys = (1-x1)*U1[0] + x1*U1[1] \t\t\t# Specific internal energy of system at T1-[Btu/lb] \n", "\n", "T2 = 200. ;\t\t\t# assumed temperature\n", "U2 = [168.11, 1073.96];\t\t\t# specific internal energy of liquid and vapour respetively -[Btu/lb]\n", "V2 = [0.017, 33.601] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n", "x2 = V_sys/V2[1] ; \t\t\t# Quality of vapour\n", "U2_sys = (1-x2)*U2[0] + x2*U2[1] ;\t\t\t# Specific internal energy of system at T2-[Btu/lb] \n", "\n", "# Results\n", "# Check whether assumption is right\n", "if (U_sys > U1_sys ):\n", " if ( U_sys