summaryrefslogtreecommitdiff
path: root/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
diff options
context:
space:
mode:
authorJovina Dsouza2014-06-18 12:43:07 +0530
committerJovina Dsouza2014-06-18 12:43:07 +0530
commit206d0358703aa05d5d7315900fe1d054c2817ddc (patch)
treef2403e29f3aded0caf7a2434ea50dd507f6545e2 /Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
parentc6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff)
downloadPython-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip
adding book
Diffstat (limited to 'Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb')
-rw-r--r--Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb557
1 files changed, 557 insertions, 0 deletions
diff --git a/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
new file mode 100644
index 00000000..00a323af
--- /dev/null
+++ b/Basic_Principles_And_Calculations_In_Chemical_Engineering/ch24.ipynb
@@ -0,0 +1,557 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "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": [
+ "# simplification of the general energy balance\n",
+ "\n",
+ "# Solution Fig. E24.1\n",
+ "\n",
+ "# Assumptions to be made in eqn. 24.1 in following segment \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": [
+ "# Application of the energy balance.\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": [
+ "# Application of the energy balance to plasma etching.\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": [
+ "# Energy balance applied to a batch process\n",
+ "\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 <U2_sys):\n",
+ " print 'Assumption is right, now find exact temperature by interpolation between 2 assumed temperatures.'\n",
+ " else:\n",
+ " print 'Assumption is wrong, assume different T2.'\n",
+ "else:\n",
+ " print 'Assumption is wrong,assume different T1.'\n",
+ "\n",
+ "# Interpolation, to get final temperature corresponding to U_sys\n",
+ "T_sys = T1 + ((T2 - T1)*(U_sys - U1_sys))/(U2_sys - U1_sys)\n",
+ "\n",
+ "print ' The final temperature obtained by interpolation between 2 assumed temperatures is %.2f degree F.'%T_sys\n",
+ " \n",
+ "# Now obtain specific volume of vapour data at final temperature from steam table and use it to calculate x(quality) , according to book it is\n",
+ "V_vap = 39.35 ;\t\t\t#specific volume of vapour data at final temperature -[cubic feet/lb]\n",
+ "x = V_sys /V_vap ;\t\t\t# Quality of gas at final temperature\n",
+ " \n",
+ " \t\t\t#Final state\n",
+ "Vap = m_total*x ;\t\t\t# Mass of vapour at final state - [lb]\n",
+ "stm_con = m_stm - Vap ;\t\t\t# Mass of steam condenses - [lb]\n",
+ "\n",
+ "print 'Therefore, mass of steam condenses is %.2f lb.'%stm_con\n",
+ "\n",
+ "print \"Answer is wrong in book.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Assumption is right, now find exact temperature by interpolation between 2 assumed temperatures.\n",
+ " The final temperature obtained by interpolation between 2 assumed temperatures is 191.03 degree F.\n",
+ "Therefore, mass of steam condenses is 2.83 lb.\n",
+ "Answer is wrong in book.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 24.6 page no : 736"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# application of the energy balance to pumping water\n",
+ "\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "# Variables\n",
+ "# Pick the system as shown in above figure of book\n",
+ "# Given\n",
+ "h1 = -15 ;\t\t\t# Initial level of water from ground level -[ft]\n",
+ "h2 = 165 ;\t\t\t#Final level of water from ground level -[ft]\n",
+ "V_rate = 200 ;\t\t\t# Volume flow rate of water - [gal/hr]\n",
+ "Q1 = 30000 ;\t\t\t# Heat input by heater - [Btu/hr]\n",
+ "Q2 = 25000 ;\t\t\t# Heat lost by system -[Btu/hr]\n",
+ "T1 = 35 ;\t\t\t# Initial temperature of water - [degree F]\n",
+ "g = 32.2 ;\t\t\t# Acceleration due to gravity - [ft/ square second]\n",
+ "p_pump = 2 ;\t\t\t# Power of pump -[hp]\n",
+ "f_w = 55./100 ;\t\t\t# Fraction of rated horsepower that i used in pumping water \n",
+ "Cp = 1 ;\t\t\t# Specific heat capacity of water - [Btu/lb*F]\n",
+ "\n",
+ "# Calculations\n",
+ "m = V_rate * 8.33 ;\t\t\t# Total mass of water pumped -[lb]\n",
+ "del_PE = (m* g *(h2 - h1))/(32.2*778) ;\t\t\t# Change in PE - [Btu/hr]\n",
+ "Q = Q1 - Q2 ;\t\t\t# Net heat exchange -[Btu/hr]\n",
+ "W = 2* f_w * 60 * 33000/778 ;\t\t\t# Work on system - [Btu/hr]\n",
+ "del_H = Q + W - del_PE ;\t\t\t# By using reduced energy balance - [Btu/hr]\n",
+ "\t\t\t# Also del_H = m* Cp * (T2 - T1), all is known except T2 , solve for T2\n",
+ "def f(T2):\n",
+ " return m*Cp*(T2-T1) - del_H\n",
+ " \n",
+ "T2 = fsolve(f,40)[0] ;\t\t\t# Boiling point temperature \n",
+ "\n",
+ "# Results\n",
+ "print ' Final temperature of water that enters storage tank is %.1f degree F .'%T2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Final temperature of water that enters storage tank is 39.5 degree F .\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
+ " improvement from the last ten iterations.\n",
+ " warnings.warn(msg, RuntimeWarning)\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 24.7 page no. 738\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# application of the energy balance, to heat a biomass.\n",
+ "\n",
+ "# Variables\n",
+ "# Pick the system as shown in above figure of book\n",
+ "# Given\n",
+ "T_stm = 250 + 273 ;\t\t\t# Temperature of entering steam - [K ]\n",
+ "Q_loss = -1.5 ;\t\t\t# Rate of heat loss from system - [kJ/s ]\n",
+ "T_mi = 20 + 273 ;\t\t\t#Temperature of entering material -[K ]\n",
+ "T_mf = 100 + 273 ;\t\t\t# Temperature of material after heating - [K]\n",
+ "m_m = 150 ;\t\t\t# Mass of charged material - [kg]\n",
+ "Cp_m = 3.26 ;\t\t\t# Average heat capacity of material - [ J/(g*K)]\n",
+ "\n",
+ "# Calculations\n",
+ "del_U = m_m*Cp_m*(T_mf - T_mi) ;\t\t\t# Change in enthalpy of system , because del_(pV) = 0 for liquid and solid charge -[kJ]\n",
+ "Q_loss_total = Q_loss * 3600; \t\t\t# Total heat loss by system n 1 hour - [kJ]\n",
+ "# We need the value of specific change in enthalpy value of saturated steam(del_H_steam), according to book we can obtain this value from steam table, it's value is -1701 kJ/kg\n",
+ "del_H_steam = -1701 ;\t\t\t# Specific change in enthalpy value of saturated steam -[kJ/kg]\n",
+ "# Get mass of steam per kg charge from reduced energy balance(eqn. (b))\n",
+ "m_stm_total = (del_U - Q_loss_total)/(-del_H_steam) ;\t\t\t# Total mass of stea used - [kg]\n",
+ "m_stm = m_stm_total/m_m ;\t\t\t# Mass of steam used per kg of charge - [kg]\n",
+ "\n",
+ "# Results\n",
+ "print ' Mass of steam used per kg of charge is %.3f kg .'%m_stm\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Mass of steam used per kg of charge is 0.174 kg .\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example 24.8 page no. 741\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Sterilization of a Fermentation Medium\n",
+ "\n",
+ "# Pick the system of whole process as shown in above figure of book\n",
+ "# Given\n",
+ "Q = 1.63 ;\t\t\t# Heat loss from the process - [ kW ]\n",
+ "m_bm = 150 ;\t\t\t# Mass flow rate of biological media into the sterlizer -[kg/min]\n",
+ "T_bm = 50 +273 ;\t\t\t# Temperature of biological media into the sterlizer - [K]\n",
+ "T_sm = 75 + 273 ;\t\t\t# Temperature of sterlize media out of the sterlizer - [K]\n",
+ "P_ss = 300 ;\t\t\t# Pressure of satureted steam entering the steam heater - [kPa]\n",
+ "P_sc = 300 ;\t\t\t# Pressure of satureted condensate exiting the steam heater - [kPa]\n",
+ "\n",
+ "H_w1 = 207.5 ;\t\t\t# Change in specific enthalpy of water at 50 degree C - [kJ/kg]\n",
+ "H_w2 = 310.3 ;\t\t\t# Change in specific enthalpy of water at 75 degree C - [kJ/kg]\n",
+ "H_ss = 2724.9 ;\t\t\t#Change in specific enthalpy of satureted steam entering the steam heater at 300 kPa - [kJ/kg]\n",
+ "H_sc = 561.2 ;\t\t\t#Change in specific enthalpy of satureted condensate exiting the steam heater at 300 kPa - [kJ/kg]\n",
+ "\n",
+ "# Calculations\n",
+ "m_sm = m_bm ;\t\t\t# By material balance -[kg/min]\n",
+ "m_stm = (Q*60 - m_sm*H_w2 + m_bm * H_w1 )/(H_sc - H_ss ) ;\t\t\t# Mass flow rate of steam entering the steam heater - [kg/min]\n",
+ "\n",
+ "# Results\n",
+ "print ' Mass flow rate of steam entering the steam heater is %.2f kg steam/min .'%m_stm\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Mass flow rate of steam entering the steam heater is 7.08 kg steam/min .\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 24.9 page no. 742\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Use of combined meterial and energy balances to solve a distillation problem.\n",
+ "\n",
+ "# Variables\n",
+ "F = 20000 ;\t\t\t# Feed rate of saturated liquid - [kg/h]\n",
+ "F_Bz = 0.5 ;\t\t\t# Fraction of benzene in feed\n",
+ "F_Tol = 0.5 ;\t\t\t# Fraction of toluene in feed\n",
+ "D_Bz = 0.98 ;\t\t\t# Fraction of benzene in distillate\n",
+ "D_Tol = 0.02 ;\t\t\t# Fraction of toluene in distillate\n",
+ "B_Bz = 0.04 ;\t\t\t# Fraction of benzene in bottoms\n",
+ "B_Tol = 0.96 ;\t\t\t# Fraction of toluene in bottoms\n",
+ "R_by_D = 4.0 ;\t\t\t# Recycle ratio \n",
+ "\n",
+ "# Calculations\n",
+ "from numpy import matrix\n",
+ "a = matrix([[1,1],[B_Bz,D_Bz]]) ;\t\t\t# Matrix formed by coefficients of unknown\n",
+ "b = matrix([[F],[F_Bz*F]]) ;\t\t\t# Matrix formed by contants\n",
+ "a = a.I\n",
+ "x = a*b ;\t\t\t# Matrix of solutions \n",
+ "B = x[0] ;\t\t\t# Bottoms - [kg/h]\n",
+ "D = x[1] ;\t\t\t#Distillate - [kg/h]\n",
+ "R = D * R_by_D ;\t\t\t# Recycle - [kg/h]\n",
+ "V = R + D ;\t\t\t# Overhead vapour - [kg/h]\n",
+ "\n",
+ "# For energy balance\n",
+ "# According to book additional data obtained from the fig.E24.9b are\n",
+ "H_F = 165 ;\t\t\t# Change in enthalpy of F - [kJ/kg]\n",
+ "H_B = 205 ;\t\t\t# Change in enthalpy of B - [kJ/kg]\n",
+ "H_D = 100 ;\t\t\t# Change in enthalpy of D - [kJ/kg]\n",
+ "H_R = 100 ;\t\t\t# Change in enthalpy of R - [kJ/kg]\n",
+ "H_V = 540 ;\t\t\t# Change in enthalpy of V - [kJ/kg]\n",
+ "\n",
+ "Qc = R*H_R + D*H_D - V*H_V ;\t\t\t# The heat duty in the condenser - [kJ]\n",
+ "Qr = D*H_D + B*H_B - F*H_F - Qc;\t\t\t# The heat duty to the reboiler - [kJ]\n",
+ "\n",
+ "# Results\n",
+ "print ' Ditillate (D) %.2e kg/h.'%D\n",
+ "print ' Bottoms (B) %.2e kg/h.'%B\n",
+ "print ' The heat duty in the condenser (Qc) %.2e kJ/h.'%Qc\n",
+ "print ' The heat duty to the reboiler (Qr) %.2e kJ/h.'%Qr\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Ditillate (D) 9.79e+03 kg/h.\n",
+ " Bottoms (B) 1.02e+04 kg/h.\n",
+ " The heat duty in the condenser (Qc) -2.15e+07 kJ/h.\n",
+ " The heat duty to the reboiler (Qr) 2.13e+07 kJ/h.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file