summaryrefslogtreecommitdiff
path: root/Elementary_Principles_of_Chemical_Processes
diff options
context:
space:
mode:
authorhardythe12014-08-06 17:26:32 +0530
committerhardythe12014-08-06 17:26:32 +0530
commitf3e94078a83634b4353ab0cd2de3b0e204a48ac7 (patch)
treef4d42d3a77bed54d4b4e18a347bb860a39dc77d3 /Elementary_Principles_of_Chemical_Processes
parent34186106dd668bb95f7c60ba60942001a490a20b (diff)
downloadPython-Textbook-Companions-f3e94078a83634b4353ab0cd2de3b0e204a48ac7.tar.gz
Python-Textbook-Companions-f3e94078a83634b4353ab0cd2de3b0e204a48ac7.tar.bz2
Python-Textbook-Companions-f3e94078a83634b4353ab0cd2de3b0e204a48ac7.zip
adding books
Diffstat (limited to 'Elementary_Principles_of_Chemical_Processes')
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter11.ipynb155
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter2.ipynb501
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter3.ipynb835
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter4.ipynb1771
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter5.ipynb807
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter6.ipynb1137
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter7.ipynb893
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter8.ipynb1053
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/Chapter9.ipynb822
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/README.txt10
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/screenshots/dev.pngbin0 -> 80892 bytes
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/screenshots/mbtT.pngbin0 -> 19516 bytes
-rwxr-xr-xElementary_Principles_of_Chemical_Processes/screenshots/vbyl.pngbin0 -> 15350 bytes
13 files changed, 7984 insertions, 0 deletions
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter11.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter11.ipynb
new file mode 100755
index 00000000..bec15476
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter11.ipynb
@@ -0,0 +1,155 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9a8a7685dfe3ac94231d04568a5fa2ca80f262b83285bc314eef1bc912a7ecc6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Balances on Transient Processes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1-2, page no. 547"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "v0=math.pow(10.,9)\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "def dv(t):\n",
+ " dv=math.pow(10,6)*math.exp(-t/100) -math.pow(10,7)\n",
+ " return dv\n",
+ "\n",
+ "vol, err=scipy.integrate.quad(dv,0,60) #integrate.quad is an inbult function used for definite integration\n",
+ "print '%s %.3E' %(\" \\n Volume at the end of 60 days=\",vol+v0)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Volume at the end of 60 days= 4.451E+08\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3-1, page no. 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "m1=1.50 #kg\n",
+ "m2=3.0 #kg\n",
+ "Cv1=0.9 #cal/g C\n",
+ "Cv2=0.12 #cal/g C\n",
+ "Qdot=500.0 #W\n",
+ "T1=250.0 #C\n",
+ "T2=25.0 #C\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "MCv=(m1*Cv1 + m2*Cv2)*1000*4.184\n",
+ "print(MCv)\n",
+ "tf=(T1-T2)*MCv/Qdot\n",
+ "print '%s %d %s %.3f' %(\" \\n Time required\",tf+1,\" in sec and in min =\",tf/60)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "7154.64\n",
+ " \n",
+ " Time required 3220 in sec and in min = 53.660\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter2.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter2.ipynb
new file mode 100755
index 00000000..6f35a4a4
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter2.ipynb
@@ -0,0 +1,501 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1e57dcb73985a42b8c9ee1409e50d4315b6a10f8a73cdae8a91714580c2fe346"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Introduction to Engineering Calculations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-1, page no. 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "AcclInitial=1.0 #cm/s^2\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "AcclFinal=AcclInitial*math.pow(3600*24*365,2)/math.pow(10,5)\n",
+ "#the calculations involved are the conversion factors\n",
+ "print '%s %.3E' %(\" \\n final acceleration (Km/Yr^2) = \",AcclFinal)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " final acceleration (Km/Yr^2) = 9.945E+09\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3-1, page no. 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "Initial=23.0 #lb.ft/min^2\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "Final=Initial*0.453593*100/(3.281*60*60)\n",
+ "#the calculations involved are conversion factors\n",
+ "print '%s %.4f' %(\"final (kg.cm/s^2) = \",Final)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "final (kg.cm/s^2) = 0.0883\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4-1, page no. 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "density=62.4 #lbm/ft^3\n",
+ "volume=2.0 #ft^3\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "mass=volume*density\n",
+ "print '%s %.3f' %(\"mass of the water = volume x density(lbm) = \",mass)\n",
+ "print(\" \\n At sealevel, g=32.174 ft/s^2\")\n",
+ "g=32.174\n",
+ "weight=mass*g/32.174\n",
+ "print '%s %.3f' %(\" \\n weight at sealevel (lbf) = \",weight)\n",
+ "print(\" \\n At denver, g=32.139 ft/s^2\")\n",
+ "g=32.139\n",
+ "weight=mass*g/32.174\n",
+ "print '%s %.3f' %(\"\\n weight at denver (lbf) = \",weight)\n",
+ "#the division with 32.174 is to convert lbm.math.pow(ft/s,2) to lbf\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass of the water = volume x density(lbm) = 124.800\n",
+ " \n",
+ " At sealevel, g=32.174 ft/s^2\n",
+ " \n",
+ " weight at sealevel (lbf) = 124.800\n",
+ " \n",
+ " At denver, g=32.139 ft/s^2\n",
+ "\n",
+ " weight at denver (lbf) = 124.664\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5-2, page no. 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "#the badbatches per week are taken as elements of a vector y\n",
+ "\n",
+ "y=[17, 27, 18, 18, 23, 19, 18, 21, 20, 19, 21, 18]\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "#Here We used standard library functions mean and st_deviation\n",
+ "ybar=numpy.mean(y)\n",
+ "sy=numpy.std(y)\n",
+ "defaultvalue=ybar+3*sy+1\n",
+ "print '%s %d' %(\"the maximum allowed value of y i.e. bad batches in a week is \", defaultvalue+1)\n",
+ "print(\" \\n in case of 2 standard deviations\")\n",
+ "defaultvalue=ybar+2*sy+1\n",
+ "print '%s %d' %(\"the limiting value of y i.e. bad batches in a week is \",defaultvalue)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the maximum allowed value of y i.e. bad batches in a week is 29\n",
+ " \n",
+ " in case of 2 standard deviations\n",
+ "the limiting value of y i.e. bad batches in a week is 26\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7-1, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "from matplotlib import pyplot\n",
+ "%pylab inline\n",
+ "x=numpy.array([10., 30., 50., 70., 90.])\n",
+ "y=numpy.array([20., 52.1, 84.6, 118.3, 151.0])\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "#this program uses least squares fit to solve for slope and intercept.\n",
+ "#hence the value differs from textbook a bit.\n",
+ "sx=sum(x)\n",
+ "sx2=sum(x*x)\n",
+ "sy=sum(y)\n",
+ "D=numpy.transpose(y)\n",
+ "sxy=sum(x*D)\n",
+ "n=len(x)\n",
+ "A=([[sx,n],[sx2,sx]])\n",
+ "B=([[sy],[sxy]])\n",
+ "p=numpy.dot(linalg.inv(A),B)\n",
+ "m=p[0,0]\n",
+ "b=p[1,0]\n",
+ "yf=m*x+b\n",
+ "pyplot.plot(x,yf)\n",
+ "pyplot.xlim(min(x)-1,max(x)+1)\n",
+ "pyplot.ylim(min(yf)-1,max(yf)+1)\n",
+ "pyplot.xlabel('R')\n",
+ "pyplot.ylabel('V')\n",
+ "pyplot.show()\n",
+ "print(\"in case 2, R=36\")\n",
+ "R=36\n",
+ "V=m*R+b\n",
+ "print '%s %.3f' %(\"then V (L/min) =\",V),\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEKCAYAAADw2zkCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtU1XW+//EnmP1q1pzjDZUUTAdHE9kgmo5W5lYjEnN1\nSgs1HVMzs9EyWzatqVmAjnWWnpbZWC3LMVM8YbOixhHE+yYvoYyiYK6xNJkDlIp4Tbxw+fz++I5M\nTpaIe+/vd7Nfj7VY4Vc3vLrtN6/v5fMJMcYYREQkqIXaHUBEROynYSAiIhoGIiKiYSAiImgYiIgI\nGgYiIgLcZHeA6+F2u8nNzbU7hohIQBkwYAAej+cn/0xANYPc3FyMMVd8pKSk/OCYkz6cnk8ZldFp\nH07P6OR827cbunQx9Ot3Zcb6/BAdUM1ARER+6MIFSEmBZctg4UIoKrr+rxFQzUBERK6Unw89e8Kh\nQ7B3Lwwf3rCvE/DNwO122x3hJzk9Hyijtyijdzg9o1PyXbwIs2fDe+/BggWQnAwhIdbvNSRjiDEm\nYNYmCgkJIYDiioj4REEBjBsHnTrBokUQHv7Tf74+7506TSQiEiCqqiAtDRITYeZM+PTTaw+C+gr4\n00QiIsGgsBCeeAJuu81qBu3be/frqxmIiDhYdTXMmQODB8O0abB6tfcHAagZiIg41v791rWBFi1g\n1y7o0MF330vNQETEYWpqYN48GDAAJk2CtWt9OwhAzUBExFEOHLCuDdx6q/UMQceO/vm+agYiIg5Q\nWwvz58Pdd8Pjj8OGDf4bBKBmICJiu4MHYcIEMAby8qBzZ/9nUDMQEbFJba21llDfvvDII5Cba88g\nAB8OgwkTJtC2bVtcLtcPfu/1118nNDSUEydO1B177bXXiI6OxuVysW7dOl/FEhFxhOJiuO8+WLEC\ntm2D6dMh1MYfz332rceP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9++SUAGzZsoFu3bgwZMsQxGS/78MMP604RgbP+f+ncuTN5\neXmcP38eYwwbNmwgKirKURkvv+kfOXKElStXkpyc3LB8vrms4X0jR440t912m2natKmJiIgwS5Ys\nqdcSFv50I0tt+EthYaHp0aOHiYuLM127djVpaWnGGOOojJd5PJ66u4mclO/rr782sbGxJi4uzvzy\nl780v//97x2X0Rhj9uzZY+68804THR1thgwZYk6cOOG4jN99951p1aqVOXPmTN0xp2VMSUkxnTt3\nNl26dDHJycnm/Pnzjsp4zz33mNjYWNOrVy+zadMmY0zD/hlqOQoREQns00QiIuIdGgYiIqJhICIi\nGgYiIoKGgYiIoGEgIiJoGIjckCZNmhAfH88dd9zB0KFDOX36tN2RRBpEw0DkBvzsZz+joKCAv//9\n77Ru3Zq3337b7kgiDaJhIOIl/fr14x//+IfdMUQaRMNAxAtqampYt24dsbGxdkcRaRAtRyFyA266\n6SZcLhdlZWV07NiRvLy8K/ZhEAkU+q9W5AbceuutFBQU8I9//IOf/exn/OUvf7E7kkiDqBmI3ID/\n+I//qFsSfM+ePYwePZovvviiwRuMiNhFzUDkBnz/Tb9Hjx507tyZjz76yMZEIg2jZiAiImoGIiKi\nYSAiImgYiIgIGgYiIoKGgYiIoGEgIiJoGIiICBoGIiIC/H8YvhS2TSiF/wAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2da0750>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "in case 2, R=36\n",
+ "then V (L/min) = 62.226\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7-2, page no. 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "from matplotlib import pyplot\n",
+ "%pylab inline\n",
+ "\n",
+ "T=[10., 20., 40., 80.]\n",
+ "M=[14.76, 20.14, 27.73, 38.47]\n",
+ "sqrtT=numpy.sqrt(T)\n",
+ "\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "sx=sum(sqrtT)\n",
+ "sx2=sum(T)\n",
+ "sy=sum(M)\n",
+ "D=numpy.transpose(M)\n",
+ "sxy=sum(sqrtT*D)\n",
+ "n=len(T)\n",
+ "A=([[sx,n],[sx2,sx]]) \n",
+ "B=([[sy],[sxy]])\n",
+ "p=numpy.dot(linalg.inv(A),B)\n",
+ "a=p[0,0]\n",
+ "b=p[1,0]\n",
+ "yf=a*sqrtT+b\n",
+ "x=sqrtT\n",
+ "pyplot.plot(x,yf)\n",
+ "pyplot.xlim(min(x)-1,max(x)+1)\n",
+ "pyplot.ylim(min(yf)-1,max(yf)+1)\n",
+ "pyplot.xlabel('sqrtT')\n",
+ "pyplot.ylabel('M')\n",
+ "pyplot.show()\n",
+ "print '%s %.3f' %(\"slope (g/s*K^.5) =\",a)\n",
+ "print '%s %.3f' %(\"\\n intercept (g/s) =\",b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEKCAYAAADzQPVvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHy9JREFUeJzt3XlY1mW+x/H345aWWyBiqalTYS6Qj5NLrg8dzTljmhbh\nTp2ypr2wvabEsbRjmUvZYtpqapqmuVGaAi6gZpnWTOqYmkshSOYCiMDv/HE3nCxARR7uZ/m8rotr\nFI0+XU6fbr6/+3ffLsdxHEREJKBVsh1ARES8T2UvIhIEVPYiIkFAZS8iEgRU9iIiQUBlLyISBKrY\nDlAcj8dDcnKy7RgiIn6le/fuJCUlFftrP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r9+vXD5XKRnZ3NwIED6du3r+1YJZo+fTpDhgwpeojoq+MGMP/x\nXLFiBW+++abtKKVq164dMTExREVFUalSJdxuN/fcc4/tWCXq378/R44coWrVqkyZMsWnN2qURMcl\niIgEAY1xRESCgMpeRCQIqOxFRIKAyl5EJAio7EVEgoDKXkQkCKjsRcro66+/ZtmyZQC88847RUcL\nV6tWrej45ieffNJyShFD++xFyqCgoID333+fTZs28fLLL5/ya82aNWPTpk2EhIRYSifyR3qDVoLa\nkSNHGDhwIPv376ewsJC///3vVK9enYcffpiQkBA6dOjArl27WLRoEQkJCezcuZO9e/dy8cUXs3bt\nWnJyclizZg1PPPEEsbGxtv9xREqkspeglpiYSNOmTVm6dCkAR48eJSIigtTUVJo2bcrgwYNPOXri\nu+++IzU1lSpVqvDuu++yadMmn74NSuQ/NLOXoOZ2u/n00095/PHHSUlJ4V//+hcRERE0bdoUgEGD\nBhUdGe1yuejbty9Vqpg1kuM4fnGctAio7CXIXX755WzatInIyEhGjhxJYmLiKb/++zI///zzi37s\ny4fNifyexjgS1H766SdCQkIYMmQIderUYeLEiezYsYM9e/bQpEkTPvzww6JS/33x16hRw6cvyRb5\nLa3sJaht2bKFq666irZt2zJ69GjGjBnD66+/To8ePejQoQNhYWGnjHF+u5qPjo5m06ZNXHnllcyZ\nM6fo81rxiy/S1kuRUiQnJ/Piiy/65QXTIr+llb3IaWilLoFAK3sRkSCglb2ISBBQ2YuIBAGVvYhI\nEFDZi4gEAZW9iEgQUNmLiASB/wN8FSViNpJblAAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2d9a8d0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "slope (g/s*K^.5) = 4.100\n",
+ "\n",
+ " intercept (g/s) = 1.798\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7-3, page no. 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "#Units are not mentioned in this example\n",
+ "import math\n",
+ "t1=15.\n",
+ "t2=30.\n",
+ "F1=0.298\n",
+ "F2=0.0527\n",
+ "#Calculations and printing:\n",
+ "print(\"Semi-log plot\")\n",
+ "b1=(math.log(F2/F1))/(t2-t1)\n",
+ "a1=math.exp(math.log(F1) -b1*t1)\n",
+ "print '%s %.3f %s %.4f %s' %(\" \\n F=\",a1,\"exp(\",b1,\"t)\")\n",
+ "print(\"\\n Log plot\")\n",
+ "b2=(math.log(F2/F1))/(math.log(t2/t1))\n",
+ "a2=math.exp(math.log(F1) -b2*math.log(t1))\n",
+ "print '%s %.1f %s %.1f %s' %(\" \\n F=\",a2,\"exp(\",b2,\"t)\")\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Semi-log plot\n",
+ " \n",
+ " F= 1.685 exp( -0.1155 t)\n",
+ "\n",
+ " Log plot\n",
+ " \n",
+ " F= 259.3 exp( -2.5 t)\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter3.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter3.ipynb
new file mode 100755
index 00000000..c4f34658
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter3.ipynb
@@ -0,0 +1,835 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9d66b3fe8b5c5765d2f891791ade4779b402bd1eb1946b5f370c5174c61892cb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Processes and Process Variables"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1-1, page no. 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "mass=215.0 #kg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "density=13.546*62.43\n",
+ "print '%s %.2f' %(\"density of mercury (lbm/ft^3) = \",density)\n",
+ "#the multiplication factor is to convert density from gm/cc to lbm/ft^3.\n",
+ "volume=mass/(.454*density) #ft^3\n",
+ "#the division by 0.454 is to convert mass in kg to lbm.\n",
+ "print '%s %.2f %s %.2f' %(\" \\n The volume of \",mass,\"kg of mercury is(ft^3) = \",volume)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of mercury (lbm/ft^3) = 845.68\n",
+ " \n",
+ " The volume of 215.00 kg of mercury is(ft^3) = 0.56\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1-2, page no. 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "T1=20.0 # \u02daC\n",
+ "T2=100.0 # \u02daC\n",
+ "Vat20=0.560 #ft^3\n",
+ "D=0.0208333 #ft\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"we know that V(T)=Vo[1+0.math.pow(18182x10,()-3)xT +0.math.pow(0078x10,()-6)xTxT]\")\n",
+ "Vat0=Vat20/(1+0.18182*math.pow(10,-3)*T1 +0.0078*math.pow(10,-6)*T1*T1)\n",
+ "#the function is defined with the variable as temperature\n",
+ "def volume(T):\n",
+ " volume=Vat0*(1+0.18182* math.pow(10,-3) *T +0.0078* math.pow(10,-6) *T*T)\n",
+ " return volume\n",
+ "\n",
+ "print '%s %.3f' %(\" vat20 (ft^3) = \",volume(T1))\n",
+ "print '%s %.3f' %(\" \\n vat100 (ft^3) =\",volume(T2))\n",
+ "change=((volume(T2))-(volume(T1)))*4/(math.pi*D*D)\n",
+ "print '%s %.3f' %(\" \\n change in the height of mercury level (ft) = \",change)\n",
+ "#the answer is a bit different due to rounding off of volume(T2) in textbook\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "we know that V(T)=Vo[1+0.math.pow(18182x10,()-3)xT +0.math.pow(0078x10,()-6)xTxT]\n",
+ " vat20 (ft^3) = 0.560\n",
+ " \n",
+ " vat100 (ft^3) = 0.568\n",
+ " \n",
+ " change in the height of mercury level (ft) = 23.931\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-1, page no. 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "mass=100.0 #g of CO2\n",
+ "M=44.01 #molecular weight\n",
+ "\n",
+ "#Calculations and print '%s %.3f' %ing :\n",
+ "\n",
+ "moles=mass/M\n",
+ "print '%s %.3f' %(\"\\n no.of moles=\",moles)\n",
+ "lbmole=moles/453.6\n",
+ "print '%s %.3f' %(\"\\n no.of lb moles=\",lbmole)\n",
+ "Cmoles=moles\n",
+ "print '%s %.3f' %(\"\\n no.of moles of carbon=\",Cmoles)\n",
+ "Omoles=2*moles\n",
+ "print '%s %.3f' %(\"\\n no.of moles of oxygen=\",Omoles)\n",
+ "O2moles=moles\n",
+ "print '%s %.3f' %(\"\\n no.of moles of dioxygen=\",O2moles)\n",
+ "gramsO=Omoles*16\n",
+ "print '%s %.3f' %(\"\\n no.of grams of oxygen=\",gramsO)\n",
+ "gramsO2=O2moles*32\n",
+ "print '%s %.3f' %(\"\\n no.of grams of oxygen=\",gramsO2)\n",
+ "moleculesCO2=moles*6.02*math.pow(10,(23))\n",
+ "print '%s %.3E' %(\"\\n no.of molecules of CO2 =\",moleculesCO2)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " no.of moles= 2.272\n",
+ "\n",
+ " no.of lb moles= 0.005\n",
+ "\n",
+ " no.of moles of carbon= 2.272\n",
+ "\n",
+ " no.of moles of oxygen= 4.544\n",
+ "\n",
+ " no.of moles of dioxygen= 2.272\n",
+ "\n",
+ " no.of grams of oxygen= 72.711\n",
+ "\n",
+ " no.of grams of oxygen= 72.711\n",
+ "\n",
+ " no.of molecules of CO2 = 1.368E+24\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-2, page no. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "xA=0.15 #mass fraction\n",
+ "yB=0.20 #mole fraction\n",
+ "mass=175.0 #kg of solution\n",
+ "flowrate1=53.0 #lbm/h\n",
+ "flowrate2=1000.0 #mol/min\n",
+ "massofA=300.0 #lbm\n",
+ "molarB=28.0 #kmolB/s\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "massA=mass*xA\n",
+ "print '%s %d %s %.3f'%(\" \\n Mass of A in\",mass,\" kg of solution (kg A) =\",massA)\n",
+ "flowrateA=flowrate1*xA\n",
+ "print '%s %d %s %.3f'%(\" \\n Mass flow rate of A in a stream flowing at\",flowrate1,\" lbm/h (lbm A/h)=\",flowrateA )\n",
+ "flowrateB=flowrate2*yB\n",
+ "print '%s %d %s %.3f'%(\" \\n Molar flowrate of B in a stream flowing at\",flowrate2,\" mol/min (molB/min)= \",flowrateB)\n",
+ "Totalflowrate=molarB/yB\n",
+ "print '%s %d %s %.3f'%(\" \\n Total flow rate of a solution with\",molarB,\"kmolB/s=\",Totalflowrate)\n",
+ "MassSolution=massofA/xA\n",
+ "print '%s %d %s %.3f'%(\" \\n Mass of solution that contains\",massofA,\" lbm of A =\",MassSolution)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \n",
+ " Mass of A in 175 kg of solution (kg A) = 26.250\n",
+ " \n",
+ " Mass flow rate of A in a stream flowing at 53 lbm/h (lbm A/h)= 7.950\n",
+ " \n",
+ " Molar flowrate of B in a stream flowing at 1000 mol/min (molB/min)= 200.000\n",
+ " \n",
+ " Total flow rate of a solution with 28 kmolB/s= 140.000\n",
+ " \n",
+ " Mass of solution that contains 300 lbm of A = 2000.000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-3, page no. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "#let the total mass be 100\n",
+ "massO2=16.0\n",
+ "massCO=4.0\n",
+ "massCO2=17.0\n",
+ "massN2=63.0\n",
+ "MO2=32.0\n",
+ "MCO=28.0\n",
+ "MCO2=44.0\n",
+ "MN2=28.0\n",
+ "\n",
+ "#Calculations and print '%s %.3f' %ing :\n",
+ "\n",
+ "molO2=massO2/MO2\n",
+ "molCO=massCO/MCO\n",
+ "molCO2=massCO2/MCO2\n",
+ "molN2=massN2/MN2\n",
+ "TotalMol=molO2+molCO+molCO2+molN2\n",
+ "print '%s %.3f' %(\" \\n molefraction of O2=\",molO2/TotalMol)\n",
+ "print '%s %.3f' %(\" \\n molefraction of CO=\",molCO/TotalMol)\n",
+ "print '%s %.3f' %(\" \\n molefraction of CO2=\",molCO2/TotalMol)\n",
+ "print '%s %.3f' %(\" \\n molefraction of N2=\",molN2/TotalMol)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \n",
+ " molefraction of O2= 0.152\n",
+ " \n",
+ " molefraction of CO= 0.044\n",
+ " \n",
+ " molefraction of CO2= 0.118\n",
+ " \n",
+ " molefraction of N2= 0.686\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-4, page no. 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "yN2=0.79\n",
+ "MN2=28.0 #g/mol\n",
+ "MO2=32.0 g/mol\n",
+ "xN2=0.767\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "Mbar=yN2*MN2+(1-yN2)*MO2\n",
+ "print '%s %.3f' %(\" \\n average molecular weight of air from molar composition (g/mol) = \",Mbar)\n",
+ "InvMbar=xN2/28 + (1-xN2)/32\n",
+ "print '%s %.3f' %(\" \\n average molecular weight of air from mass composition (g/mol) = \",1./InvMbar)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " \n",
+ " average molecular weight of air from molar composition (g/mol) = 28.840\n",
+ " \n",
+ " average molecular weight of air from mass composition (g/mol) = 28.840\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-5, page no. 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "conc=0.5 #molar\n",
+ "rate=1.25 #m^3/min\n",
+ "D=1.03 #no units\n",
+ "M=98.0\n",
+ "\n",
+ "#Calculations and print '%s %.3f' %ing :\n",
+ "\n",
+ "mass_conc=conc*98.\n",
+ "print '%s %.3f' %(\"mass concentration of sulfuric acid (kg/m^3) = \",mass_conc)\n",
+ "mass_flowrate=rate*mass_conc/60.\n",
+ "print '%s %.3f' %(\" \\n Mass flow rate of sulfuric acid (kg/s) = \",mass_flowrate)\n",
+ "massfraction=1/(rate*D*1000/60)\n",
+ "print '%s %.3f' %(\" \\n Mass fraction of sulfuric acid=\",massfraction)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass concentration of sulfuric acid (kg/m^3) = 49.000\n",
+ " \n",
+ " Mass flow rate of sulfuric acid (kg/s) = 1.021\n",
+ " \n",
+ " Mass fraction of sulfuric acid= 0.047\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4-1, page no. 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "Pressure=2.00*100000. #Pa\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "Pressure=Pressure*1000./(13600.*9.807)\n",
+ "print '%s %.3E' %(\"Pressure (mm of Hg) = \",Pressure)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure (mm of Hg) = 1.500E+03\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4-2, page no. 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "P0=10.4*1.013*100000. /10.33 #m H2O\n",
+ "D=1000.0 #kg/m^3\n",
+ "g=9.807 #m/s^2\n",
+ "h=30.0 #m\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "Ph=P0+D*g*h\n",
+ "print '%s %.3E' %(\"Pressure at the bottom of the lake (N/m^2) = \",Ph)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the bottom of the lake (N/m^2) = 3.962E+05\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4-3, page no. 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "import math\n",
+ "spg=1.05\n",
+ "h1=382. #mm of fluid\n",
+ "h2=374. #mm of fluid\n",
+ "reading= -2 #in of Hg\n",
+ "Patm=30. #in of Hg\n",
+ "#Calculations and printing:\n",
+ "deltaP=(spg-1)*980.7*(h1-h2)/10.\n",
+ "print '%s %.1f' %(\"Pressure drop between points 1 and 2 (dynes/cm^2) = \",deltaP)\n",
+ "P1=Patm+reading\n",
+ "print '%s %.1f' %(\"\\n Absolute Pressure (in Hg) = \",P1)\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure drop between points 1 and 2 (dynes/cm^2) = 39.2\n",
+ "\n",
+ " Absolute Pressure (in Hg) = 28.0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 13,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5-2, page no. 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "T1=20.0 #F\n",
+ "T2=80.0 #F\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "#In this code I used a function to achieve the conversion\n",
+ "def conversion(fahrenheit):\n",
+ " conversion=(fahrenheit-32)/1.8\n",
+ " return conversion;\n",
+ "\n",
+ "difference=conversion(T2)-conversion(T1)\n",
+ "print '%s %.2f %s %.2f' %(\"Equivalent temperature of\",T2-T1,\" temperature in C =\",difference)\n",
+ "deltaTF=T2-T1\n",
+ "deltaTC=deltaTF/1.8\n",
+ "print '%s %.2f' %(\" \\n By second method, result=\",deltaTC)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equivalent temperature of 60.00 temperature in C = 33.33\n",
+ " \n",
+ " By second method, result= 33.33\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5-3, page no. 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "import math\n",
+ "a=0.487\n",
+ "b=2.29*math.pow(10, -4)\n",
+ "print '%s %.2f %s %.1E %s' %(\"Given Cp(Btu/lbm.F) = \",a,\"+\",b,\"T (F)\")\n",
+ "print(\"\\n Step 1\")\n",
+ "af1=a+b*32\n",
+ "bf1=b*1.8\n",
+ "print(\"\\n Step 2\")\n",
+ "af2=af1*1.8/(454*9.486*math.pow(10, -4))\n",
+ "bf2=bf1*1.8/(454*9.486*math.pow(10, -4))\n",
+ "print '%s %.2f %s %.1E %s' %(\"Final Cp(J/g.C) = \",af2,\"+\",bf2,\"T (C)\")\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Given Cp(Btu/lbm.F) = 0.49 + 2.3E-04 T (F)\n",
+ "\n",
+ " Step 1\n",
+ "\n",
+ " Step 2\n",
+ "Final Cp(J/g.C) = 2.07 + 1.7E-03 T (C)\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter4.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter4.ipynb
new file mode 100755
index 00000000..0ee3fbef
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter4.ipynb
@@ -0,0 +1,1771 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cf9c0d91c794ab27af5e7da425a28b836daf2f988940f28c4a10f4b42bda95d5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: Fundamentals of Material Balances"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2-1, page no. 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "input=50000 #ppl/yr\n",
+ "generation=22000 #ppl/yr\n",
+ "consumption=19000 #ppl/yr\n",
+ "output=75000 #ppl/yr\n",
+ "print (\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "#Calculations and printing:\n",
+ "accumulation = input+generation-output-consumption\n",
+ "print (\" We know that accumulation=input+generation-output-consumption\")\n",
+ "print '%s %d %s' %('Hence, Each year population decreases by', -accumulation, 'people')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " We know that accumulation=input+generation-output-consumption\n",
+ "Hence, Each year population decreases by 22000 people\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2-2, page no. 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "inputBenzene=500 #kg/h\n",
+ "inputToluene=500 #kg/h\n",
+ "UpStreamBenzene=450 #kg/h\n",
+ "DownStreamToluene=475 #kg/h\n",
+ "#Calculations and printing:\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Using benzene balance,\")\n",
+ "m2dot=inputBenzene-UpStreamBenzene\n",
+ "print ' %s %d %s' %(' m2dot= ', m2dot, ' kg B/h')\n",
+ "print(\"Using Toluene balance\")\n",
+ "m1dot=inputToluene-DownStreamToluene\n",
+ "print ' %s %d %s' %(' m1dot= ', m1dot, ' kg T/h')\n",
+ "print(\"To check we can perform Overall mass balance\")\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using benzene balance,\n",
+ " m2dot= 50 kg B/h\n",
+ "Using Toluene balance\n",
+ " m1dot= 25 kg T/h\n",
+ "To check we can perform Overall mass balance\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2-3, page no. 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "m1=200 #g\n",
+ "m2=150 #g\n",
+ "x1=0.4 #methanol/g\n",
+ "x2=0.7 #methanol/g\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "m=m1+m2\n",
+ "print '%s %d %s' %(' Total mass after mixing m=',m, 'g',)\n",
+ "x=(m1*x1 + m2*x2)/m\n",
+ "print'%s %.2f %s %.2f' %(' The composition of the methanol in the product is', x ,' and water is', 1-x)\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " Total mass after mixing m= 350 g\n",
+ " The composition of the methanol in the product is 0.53 and water is 0.47\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2-4, page no. 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "rate=0.1 #kmol/min\n",
+ "x1=0.1 #mole fraction hexane vapour\n",
+ "vol=10 #m^3\n",
+ "d=0.659 #kg/L\n",
+ "M=86.2 #Kg/kmol\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "ndot=rate/(1-x1)\n",
+ "deltaN= -vol*d*1000 /M\n",
+ "tf=deltaN/(-0.1 * ndot)\n",
+ "print '%s %.2f %s' %(' The time Required for the Total process= ',tf, 'min')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " The time Required for the Total process= 6880.51 min\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3-1, page no. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "Vdot=20 #CC/min\n",
+ "x=0.015\n",
+ "MH2O=18.02 #g\n",
+ "DH2O=1 #g/CC\n",
+ "x1=0.2\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "n2=Vdot*DH2O/MH2O\n",
+ "print'%s %.2f %s' %('n2=', n2, ' mol/min')\n",
+ "print(\"Using Water Balance,\")\n",
+ "n3=n2/x\n",
+ "print'%s %.2f %s' %('n3=', n3, ' mol/min')\n",
+ "print(\"Using total mole balance,\")\n",
+ "n1=(n3-n2)/(1+x1)\n",
+ "print'%s %.2f %s' %('n1=', n1, ' mol/min')\n",
+ "print(\"Using N2 balance,\")\n",
+ "y=1-x-0.79*n1/n3\n",
+ "print '%s %.2f %s' %('y=',y,' mol O2/mol')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "n2= 1.11 mol/min\n",
+ "Using Water Balance,\n",
+ "n3= 73.99 mol/min\n",
+ "Using total mole balance,\n",
+ "n1= 60.73 mol/min\n",
+ "Using N2 balance,\n",
+ "y= 0.34 mol O2/mol\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3-2, page no. 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #mol\n",
+ "FinalBasis=1250.0 #lb-moles/h\n",
+ "#Calulations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "multiply=FinalBasis/basis\n",
+ "Feed=100*multiply\n",
+ "TopStream=50*multiply\n",
+ "BottomStream1=12.5*multiply\n",
+ "BottomStream2=37.5*multiply\n",
+ "print '%s %.2f %s' %(' Final Basis=',Feed,' lb-moles /h')\n",
+ "print '%s %.2f %s' %(' Final Top Stream Feed=',TopStream, 'lb-moles /h')\n",
+ "print '%s %.2f %s' %(' Final Bottom Stream Feed 1 =', BottomStream1,'lb-moles A/h')\n",
+ "print '%s %.2f %s' %(' Final Bottom Stream Feed 2 =' ,BottomStream2,' lb-moles B/h')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " Final Basis= 1250.00 lb-moles /h\n",
+ " Final Top Stream Feed= 625.00 lb-moles /h\n",
+ " Final Bottom Stream Feed 1 = 156.25 lb-moles A/h\n",
+ " Final Bottom Stream Feed 2 = 468.75 lb-moles B/h\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3-3, page no. 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #kg\n",
+ "inputx=0.2\n",
+ "outputx=0.08\n",
+ "D=1 #kg/L\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Using NaOH balance\")\n",
+ "m2=inputx*basis/outputx\n",
+ "print '%s %.2f %s' %('m2=',m2 ,'Kg NaOH')\n",
+ "print(\"Using Total mass balance\")\n",
+ "m1=m2-basis\n",
+ "print '%s %.2f %s' %('m1=',m1, 'Kg Water')\n",
+ "V1=m1/D\n",
+ "print '%s %.2f %s' %(' V1=',V1 ,'Litres')\n",
+ "Ratio1=V1/basis\n",
+ "Ratio2=m2/basis\n",
+ "print '%s %.2f %s' %(' Ratio of lt water/Kg Feed =', Ratio1,' lt water/Kg Feed')\n",
+ "print '%s %.2f %s' %(' Ratio of Kg product/Kg Feed =', Ratio2 ,'Kg product/Kg Feed')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using NaOH balance\n",
+ "m2= 250.00 Kg NaOH\n",
+ "Using Total mass balance\n",
+ "m1= 150.00 Kg Water\n",
+ " V1= 150.00 Litres\n",
+ " Ratio of lt water/Kg Feed = 1.50 lt water/Kg Feed\n",
+ " Ratio of Kg product/Kg Feed = 2.50 Kg product/Kg Feed\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3-5, page no. 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "inputx=0.45\n",
+ "outputx=0.95\n",
+ "basis=2000 #L/h\n",
+ "outputBasis=100 #Kmol\n",
+ "M1=78.11\n",
+ "M2=92.13\n",
+ "D=0.872\n",
+ "z=0.08\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "mass1=outputBasis*M1*outputx\n",
+ "mass2=outputBasis*M2*(1-outputx)\n",
+ "mass=mass1+mass2\n",
+ "yB2=mass1/mass\n",
+ "m1=basis*D\n",
+ "print '%s %.2f %s' %(' m1=',m1,' Kg/h')\n",
+ "mB3=z*inputx*m1\n",
+ "print '%s %.2f %s' %(' mB3=',mB3,' Kg/h')\n",
+ "print(\"Using Benzene balance,\")\n",
+ "m2=(inputx*m1-mB3)/yB2\n",
+ "print '%s %.2f %s' %(' m2=',m2, 'Kg/h')\n",
+ "print(\"Using Toluene balance,\")\n",
+ "mT3=(1-inputx)*m1-(1-yB2)*m2\n",
+ "print '%s %.2f %s' %(' mT3=',mT3,' Kg/h')\n",
+ "m3=mB3+mT3\n",
+ "print '%s %.2f %s' %(' m3=',m3,' Kg/h')\n",
+ "yB3=mB3/m3\n",
+ "print '%s %.2f %s' %(' yB3=',yB3,' kg B/kg')\n",
+ "yT3=1-yB3\n",
+ "print '%s %.2f %s' %(' yT3=',yT3, 'kg T/kg')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " m1= 1744.00 Kg/h\n",
+ " mB3= 62.78 Kg/h\n",
+ "Using Benzene balance,\n",
+ " m2= 766.84 Kg/h\n",
+ "Using Toluene balance,\n",
+ " mT3= 914.38 Kg/h\n",
+ " m3= 977.16 Kg/h\n",
+ " yB3= 0.06 kg B/kg\n",
+ " yT3= 0.94 kg T/kg\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4-1, page no. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "inputMass1=100 #Kg/h\n",
+ "inputMass2=30 #Kg/h\n",
+ "outputMass1=40 #Kg/h\n",
+ "outputMass2=30 #Kg/h\n",
+ "inputx1=0.5\n",
+ "inputx2=0.3\n",
+ "outputx1=0.9\n",
+ "outputx2=0.6\n",
+ "#Calculations and printing\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"using Overall Mass balance, \")\n",
+ "m3=inputMass1+inputMass2-outputMass1-outputMass2\n",
+ "print '%s %d %s' %('m3=',m3,' Kg/h')\n",
+ "print(\"using Overall balance on A, \")\n",
+ "x3=(inputMass1*inputx1+inputMass2*inputx2-outputMass1*outputx1-outputMass2*outputx2)/m3\n",
+ "print '%s %.2f %s' %('x3=',x3,' Kg A/kg')\n",
+ "print(\"using Mass balance on Unit 1, \")\n",
+ "m1=inputMass1-outputMass1\n",
+ "print '%s %d %s' %('m1=',m1,' Kg/h')\n",
+ "print(\"using A balance on Unit 1, \")\n",
+ "x1=(inputMass1*inputx1-outputMass1*outputx1)/m1\n",
+ "print '%s %.2f %s' %('x1=',x1,' Kg A/kg')\n",
+ "print(\"using Mass balance on mixing point, \")\n",
+ "m2=inputMass2+m1\n",
+ "print '%s %d %s' %('m2=',m2,'Kg/h')\n",
+ "print(\"using A balance on mixing point, \")\n",
+ "x2=(inputMass2*inputx2+m1*x1)/m2\n",
+ "print '%s %.2f %s' %('x2=',x2 ,'Kg A/kg')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "using Overall Mass balance, \n",
+ "m3= 60 Kg/h\n",
+ "using Overall balance on A, \n",
+ "x3= 0.08 Kg A/kg\n",
+ "using Mass balance on Unit 1, \n",
+ "m1= 60 Kg/h\n",
+ "using A balance on Unit 1, \n",
+ "x1= 0.23 Kg A/kg\n",
+ "using Mass balance on mixing point, \n",
+ "m2= 90 Kg/h\n",
+ "using A balance on mixing point, \n",
+ "x2= 0.26 Kg A/kg\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4-2, page no. 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "from numpy import matrix, array, dot\n",
+ "from numpy.linalg import inv\n",
+ "import math\n",
+ "massin=100 #kg\n",
+ "M1=100 #kg\n",
+ "M2=75 #Kg\n",
+ "massout=43.1 #kg\n",
+ "inputx=0.5\n",
+ "outputxA=0.053\n",
+ "outputxM=0.016\n",
+ "m1xA=0.275\n",
+ "m1xM=0.725\n",
+ "m3xW=0.03\n",
+ "m3xA=0.09\n",
+ "m3xM=0.88\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Using Balances around two-extraxtor system,\")\n",
+ "print(\"Balance on total mass,\")\n",
+ "\n",
+ "A=array([[1,1],[m1xA,m3xA]])\n",
+ "b=array([[massin+M1+M2-massout],[massin*inputx - massout*outputxA]])\n",
+ "C=dot(inv(A),b)\n",
+ "m1=C[0,0]\n",
+ "m3=C[1,0]\n",
+ "print '%s %.2f %s' %(' m1=',m1,' Kg')\n",
+ "print '%s %.2f %s' %(' m3=',m3,' Kg')\n",
+ "print(\"Balance on M\")\n",
+ "xM1=(massin+M2-massout*outputxM-m3*m3xM)/m1\n",
+ "print '%s %.2f %s' %(' xM1=',xM1,' kg MIBK/kg')\n",
+ "print(\"Balances around Extract mixing point, \")\n",
+ "print(\"Balance on A\")\n",
+ "mA4=m1*m1xA+m3*m3xA\n",
+ "print '%s %.2f %s' %(' mA4=',mA4 ,'Kg Acetone')\n",
+ "print(\"Balance on M\")\n",
+ "mM4=m1*xM1+m3*m3xM\n",
+ "print '%s %.2f %s' %(' mM4=',mM4,' Kg MIBK')\n",
+ "print(\"Balance on W\")\n",
+ "mW4=m1*(m1xM-xM1) + m3*m3xW\n",
+ "print '%s %.2f %s' %(' mW4=',mW4 ,'Kg Water')\n",
+ "print(\"Balances around the First extractor\")\n",
+ "print(\"Balance on A\")\n",
+ "mA2=massin*inputx-m1*m1xA\n",
+ "print '%s %.2f %s' %(' mA2=',mA2,' Kg Acetone')\n",
+ "print(\"Balance on M\")\n",
+ "mM2=massin-m1*xM1\n",
+ "print '%s %.2f %s' %(' xM1=',xM1, 'Kg MIBK')\n",
+ "print(\"Balance on W\")\n",
+ "mW2=massin*inputx- m1*(m1xM-xM1)\n",
+ "print '%s %.2f %s' %(' mW2=',mW2,'Kg Water')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using Balances around two-extraxtor system,\n",
+ "Balance on total mass,\n",
+ " m1= 145.11 Kg\n",
+ " m3= 86.79 Kg\n",
+ "Balance on M\n",
+ " xM1= 0.67 kg MIBK/kg\n",
+ "Balances around Extract mixing point, \n",
+ "Balance on A\n",
+ " mA4= 47.72 Kg Acetone\n",
+ "Balance on M\n",
+ " mM4= 174.31 Kg MIBK\n",
+ "Balance on W\n",
+ " mW4= 9.87 Kg Water\n",
+ "Balances around the First extractor\n",
+ "Balance on A\n",
+ " mA2= 10.10 Kg Acetone\n",
+ "Balance on M\n",
+ " xM1= 0.67 Kg MIBK\n",
+ "Balance on W\n",
+ " mW2= 42.73 Kg Water\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5-1, page no. 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "x1=0.960\n",
+ "x2=0.977\n",
+ "x3=0.983\n",
+ "basis=100 #mol\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Overall dry Air balance,\")\n",
+ "n1=x3*basis/x1\n",
+ "print '%s %.2f %s' %('n1=',n1,' mol Fresh feed')\n",
+ "print(\"Overall mole balance,\")\n",
+ "n3=n1-basis\n",
+ "print '%s %.2f %s' %('n3=',n3,' mol Water condensed')\n",
+ "print(\"Mole balance on mixing point,\")\n",
+ "print(\"n1+n5=n2\")\n",
+ "print(\"Water balance on mixing point\")\n",
+ "print ' %.2f %s %.2f %s %.2f %s' %(1-x1,' n1+ ', 1-x3,' n5 =', 1-x2,'n2')\n",
+ "A=([[1 ,-1],[1-x2,-(1-x3)]])\n",
+ "b=([[n1],[(1-x1)*n1]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "n2=C[0,0]\n",
+ "n5=C[1,0]\n",
+ "print '%s %.2f %s' %(' \\n n2=',n2,' mol')\n",
+ "print '%s %.2f %s' %(' \\n n5=',n5,' mol Recycled')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Overall dry Air balance,\n",
+ "n1= 102.40 mol Fresh feed\n",
+ "Overall mole balance,\n",
+ "n3= 2.40 mol Water condensed\n",
+ "Mole balance on mixing point,\n",
+ "n1+n5=n2\n",
+ "Water balance on mixing point\n",
+ " 0.04 n1+ 0.02 n5 = 0.02 n2\n",
+ " \n",
+ " n2= 392.52 mol\n",
+ " \n",
+ " n5= 290.12 mol Recycled\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5-2, page no. 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "feed=4500 #kg/h\n",
+ "feedx=0.333\n",
+ "m3x=0.494\n",
+ "m5x=0.364\n",
+ "x=0.95\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "m6x=m5x\n",
+ "print '%s %.2f %s' %('Given, m4=',x,' (m4+m5)')\n",
+ "print(\"using Overall K2CrO4 balance, \")\n",
+ "print ' %.2f %s %.2f %s %.2f %s' %(feedx,' *', feed ,'= m4+', m6x,'m5')\n",
+ "A=([[1-x,-x],[1,m6x]])\n",
+ "b=([[0],[feedx*feed]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "m4=C[0,0]\n",
+ "m5=C[1,0]\n",
+ "print '%s %.2f %s' %(' \\n m4=',m4,' K2CrO4 crystals/h')\n",
+ "print '%s %.2f %s' %(' \\n m5=',m5,' entrained solution/h')\n",
+ "print(\"Overall Total mass balance , \")\n",
+ "m2=feed-m4-m5\n",
+ "print '%s %.2f %s' %('m2=',m2,' Kg H2O evaporated/h')\n",
+ "print(\"Mass balance around the crystallizer,\")\n",
+ "print(\"m3=m4+m5+m6\")\n",
+ "print(\"Water balance around the crystallizer, \")\n",
+ "print ' %.2f %s %.2f %s %.2f %s' %(1-m3x, 'm3=', 1-m5x,' m5 + ',1-m6x,' m6')\n",
+ "D=([[1,-1],[1,(-1+m6x)/(1-m3x)]])\n",
+ "e=([[m4+m5],[(1-m5x)*m5/(1-m3x)]])\n",
+ "F=numpy.dot(linalg.inv(D),e)\n",
+ "m3=F[0,0]\n",
+ "m6=F[1,0]\n",
+ "print '%s %.2f %s' %(' \\n m3=',m3,' Kg/h fed to the crystallizer')\n",
+ "print '%s %.2f %s' %(' \\n m6=',m6,' Kg/h')\n",
+ "ratio=m6/feed\n",
+ "print '%s %.2f %s' %(' \\n ratio=',ratio,' Kg recycle/ Kg fresh feed')\n",
+ "print(\"mass balance around Recycle-fresh feed mixing point, \")\n",
+ "m1=feed+m6\n",
+ "print '%s %.2f %s' %('m1=',m1,' kg/h feed to the evaporator')\n",
+ "print(\"With out recycle, \")\n",
+ "print(\"m3=622 Kg/h\")\n",
+ "print(\"m5=2380 Kg/h\")\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Given, m4= 0.95 (m4+m5)\n",
+ "using Overall K2CrO4 balance, \n",
+ " 0.33 * 4500.00 = m4+ 0.36 m5\n",
+ " \n",
+ " m4= 1470.33 K2CrO4 crystals/h\n",
+ " \n",
+ " m5= 77.39 entrained solution/h\n",
+ "Overall Total mass balance , \n",
+ "m2= 2952.28 Kg H2O evaporated/h\n",
+ "Mass balance around the crystallizer,\n",
+ "m3=m4+m5+m6\n",
+ "Water balance around the crystallizer, \n",
+ " 0.51 m3= 0.64 m5 + 0.64 m6\n",
+ " \n",
+ " m3= 7193.31 Kg/h fed to the crystallizer\n",
+ " \n",
+ " m6= 5645.60 Kg/h\n",
+ " \n",
+ " ratio= 1.25 Kg recycle/ Kg fresh feed\n",
+ "mass balance around Recycle-fresh feed mixing point, \n",
+ "m1= 10145.60 kg/h feed to the evaporator\n",
+ "With out recycle, \n",
+ "m3=622 Kg/h\n",
+ "m5=2380 Kg/h\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6-1, page no. 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #mol\n",
+ "xP=0.1\n",
+ "xN=0.12\n",
+ "xA=0.78\n",
+ "x=0.3\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "nP=basis*xP\n",
+ "nN=basis*xN\n",
+ "nO2=basis*xA*0.21\n",
+ "nN2=basis-nP-nN-nO2\n",
+ "if nN/nP>1:\n",
+ " print(\"NH3 is in excess\")\n",
+ "else:\n",
+ " print(\"Propene is in excess\")\n",
+ "\n",
+ "if nO2/nP>1:\n",
+ " print(\"O2 is in excess\")\n",
+ "else:\n",
+ " print(\"propene is in excess\")\n",
+ "\n",
+ "nO2reacted=nP*1.5\n",
+ "nNreacted=nP*1\n",
+ "ExcessAmmonia=(nN-nNreacted)*100/nNreacted\n",
+ "ExcessO2=(nO2-nO2reacted)*100/nO2reacted\n",
+ "print '%s %.2f' %(' \\n percentage excess Ammonia=',ExcessAmmonia)\n",
+ "print '%s %.2f' %(' \\n percentage excess Oxygen=',ExcessO2)\n",
+ "nPout=(1-x)*nP\n",
+ "print '%s %.2f %s' %(' \\n no.of moles of Propylene left=', nPout,' mol')\n",
+ "E=nP-nPout\n",
+ "nNout=nN-E\n",
+ "nO2out=nO2-1.5*E\n",
+ "nAc=E\n",
+ "nW=3*E\n",
+ "print'%s %.2f %s' %(' \\n no.of moles of Ammonia left=', nNout,' mol')\n",
+ "print'%s %.2f %s' %(' \\n no.of moles of oxygen left=' ,nO2out,' mol')\n",
+ "print'%s %.2f %s' %(' \\n no.of moles of ACN formed= ',nAc ,'mol')\n",
+ "print'%s %.2f %s' %(' \\n no.of moles of water formed=', nW ,'mol')\n",
+ "print'%s %.2f %s' %(' \\n no.of moles of Nirtogen present= ',nN2 ,'mol')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "NH3 is in excess\n",
+ "O2 is in excess\n",
+ " \n",
+ " percentage excess Ammonia= 20.00\n",
+ " \n",
+ " percentage excess Oxygen= 9.20\n",
+ " \n",
+ " no.of moles of Propylene left= 7.00 mol\n",
+ " \n",
+ " no.of moles of Ammonia left= 9.00 mol\n",
+ " \n",
+ " no.of moles of oxygen left= 11.88 mol\n",
+ " \n",
+ " no.of moles of ACN formed= 3.00 mol\n",
+ " \n",
+ " no.of moles of water formed= 9.00 mol\n",
+ " \n",
+ " no.of moles of Nirtogen present= 61.62 mol\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 17,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6-2, page no. 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "print(\"Given, Reaction is CO(g)+ H2O(g) --> CO2(g)+ H2(g)\")\n",
+ "nCO=1.\n",
+ "nH2O=2.\n",
+ "#Calculations and printing:\n",
+ "nt=nCO+nH2O\n",
+ "print(\"\\n It is found that Ee=0.667\")\n",
+ "Ee=0.667\n",
+ "yCO=(nCO-Ee)/nt\n",
+ "yH2O=(nH2O-Ee)/nt\n",
+ "yCO2=Ee/nt\n",
+ "yH2=Ee/nt\n",
+ "print(\"\\n Ee is obtained by solving the quadratic yCO2*yH2/(yCO*yH2O)=1\")\n",
+ "print(\"\\n Limiting reactant is CO\")\n",
+ "print '%s %.3f' %(\"\\n yCO = \",yCO)\n",
+ "print '%s %.3f' %(\"\\n yCO2 = \",yCO2)\n",
+ "print '%s %.3f' %(\"\\n yH2O = \",yH2O)\n",
+ "print '%s %.3f' %(\"\\n yH2 = \",yH2)\n",
+ "nCOF=yCO*nt\n",
+ "fCO=(nCO-nCOF)/nCO\n",
+ "print '%s %.3f' %(\"\\n Fractional conversion of CO at equilibrium is \", fCO)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Given, Reaction is CO(g)+ H2O(g) --> CO2(g)+ H2(g)\n",
+ "\n",
+ " It is found that Ee=0.667\n",
+ "\n",
+ " Ee is obtained by solving the quadratic yCO2*yH2/(yCO*yH2O)=1\n",
+ "\n",
+ " Limiting reactant is CO\n",
+ "\n",
+ " yCO = 0.111\n",
+ "\n",
+ " yCO2 = 0.222\n",
+ "\n",
+ " yH2O = 0.444\n",
+ "\n",
+ " yH2 = 0.222\n",
+ "\n",
+ " Fractional conversion of CO at equilibrium is 0.667\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 18,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6-3, page no. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #mol\n",
+ "x=0.850\n",
+ "conv1=0.501\n",
+ "conv2=0.471\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "n1=(1-conv1)*basis*x\n",
+ "n2=conv2*basis*x\n",
+ "E1=n2\n",
+ "E2=basis*x - E1-n1\n",
+ "n3=E1-E2\n",
+ "n4=2*E2\n",
+ "n5=basis*(1-x)\n",
+ "nt=n1+n2+n3+n4+n5\n",
+ "selectivity=n2/n4\n",
+ "print '%s %.2f %s ' %('selectivity=',selectivity,' mol Ethene/mol methane')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "selectivity= 7.85 mol Ethene/mol methane \n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 19,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7-2, page no. 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #mol\n",
+ "x=0.850\n",
+ "conv1=0.501\n",
+ "conv2=0.471\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "n1=(1-conv1)*basis*x\n",
+ "n2=conv2*basis*x\n",
+ "E1=n2\n",
+ "E2=basis*x - E1-n1\n",
+ "n3=E1-E2\n",
+ "n4=2*E2\n",
+ "n5=basis*(1-x)\n",
+ "nt=n1+n2+n3+n4+n5\n",
+ "selectivity=n2/n4\n",
+ "print '%s %.2f %s ' %('selectivity=',selectivity,' mol Ethene/mol methane')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "selectivity= 7.85 mol Ethene/mol methane \n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 20,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7-3, page no. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "x0=0.996\n",
+ "basis=100 #mol combined feed to the reactor\n",
+ "inputxH2=0.7\n",
+ "single_pass=0.6\n",
+ "inputxCO2=0.28\n",
+ "molI=2\n",
+ "Ix=0.004\n",
+ "final=155 #kmol/h\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Reactor analysis, \")\n",
+ "n2=(1-single_pass)*basis*inputxH2\n",
+ "print '%s %.2f %s' %('n2=',n2,' mol H2')\n",
+ "print(\"H2 balance\")\n",
+ "consH2=basis*inputxH2-n2\n",
+ "print '%s %.2f %s' %('H2 moles consumed=',consH2,' mol H2')\n",
+ "print(\"CO2 balance\")\n",
+ "n1=basis*inputxCO2-consH2/3\n",
+ "print '%s %.2f %s' %('n1=',n1,'mol CO2')\n",
+ "print(\"Methanol balance\")\n",
+ "n3=consH2/3\n",
+ "print '%s %.2f %s' %('n3=',n3,'mol Methanol')\n",
+ "print(\"H2O balance\")\n",
+ "n4=consH2/3\n",
+ "print '%s %.2f %s' %('n4=',n4,' mol H2O')\n",
+ "print(\"condenser analysis\")\n",
+ "print(\"Total mole balance\")\n",
+ "n5=n1+n2+molI\n",
+ "print '%s %.2f %s' %('n5=',n5 ,'mol')\n",
+ "print(\"CO2 balance\")\n",
+ "x5C=n1/n5\n",
+ "print '%s %.2f %s' %('x5C=',x5C,' mol CO2/mol')\n",
+ "print(\"H2 balance\")\n",
+ "x5H=n2/n5\n",
+ "print '%s %.2f %s' %('x5H=', x5H,'mol CO2/mol')\n",
+ "x1=1-x5C-x5H\n",
+ "print '%s %.2f %s' %('x1=',x1,' mol I/mol')\n",
+ "print(\"Fresh Feed-Recycle mixing point analysis\")\n",
+ "print(\"Total mole balance\")\n",
+ "print '%s %.2f' %('n0+nr=',basis)\n",
+ "print(\"I balance\")\n",
+ "print '%s %.2f %s %.2f %s %.2f' %('n0', Ix,' + nr ',x1,' = ',molI)\n",
+ "A=([[1, 1],[Ix, x1]])\n",
+ "b=([[basis],[molI]])\n",
+ "C=numpy.dot(linalg.inv(A),b) #Here We solve two linear equations simultaneously\n",
+ "n0=C[0,0]\n",
+ "nr=C[1,0]\n",
+ "print '%s %.2f %s' %(' \\n n0=',n0,' mol fresh feed')\n",
+ "print '%s %.2f %s' %(' \\n nr=', nr ,'mol recycle')\n",
+ "x0C=(basis*inputxCO2-nr*x5C)/n0\n",
+ "print '%s %.2f %s' %(' \\n x0C=',x0C,' mol CO2/mol')\n",
+ "x0H=1-x0C-Ix\n",
+ "print '%s %.2f %s' %(' \\n x0H=',x0H ,'mol H2/mol')\n",
+ "print(\"Recycle-Purge splitting Analysis\")\n",
+ "print(\"Total mole balance\")\n",
+ "np=n5-nr\n",
+ "print '%s %.2f %s' %('np=',np,' mol purge')\n",
+ "print(\"Flow chart scaling\")\n",
+ "Factor=final/n3\n",
+ "print '%s %.2f %s' %('Factor for scaling=',Factor,' Kmol/h/mol')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Reactor analysis, \n",
+ "n2= 28.00 mol H2\n",
+ "H2 balance\n",
+ "H2 moles consumed= 42.00 mol H2\n",
+ "CO2 balance\n",
+ "n1= 14.00 mol CO2\n",
+ "Methanol balance\n",
+ "n3= 14.00 mol Methanol\n",
+ "H2O balance\n",
+ "n4= 14.00 mol H2O\n",
+ "condenser analysis\n",
+ "Total mole balance\n",
+ "n5= 44.00 mol\n",
+ "CO2 balance\n",
+ "x5C= 0.32 mol CO2/mol\n",
+ "H2 balance\n",
+ "x5H= 0.64 mol CO2/mol\n",
+ "x1= 0.05 mol I/mol\n",
+ "Fresh Feed-Recycle mixing point analysis\n",
+ "Total mole balance\n",
+ "n0+nr= 100.00\n",
+ "I balance\n",
+ "n0 0.00 + nr 0.05 = 2.00\n",
+ " \n",
+ " n0= 61.40 mol fresh feed\n",
+ " \n",
+ " nr= 38.60 mol recycle\n",
+ " \n",
+ " x0C= 0.26 mol CO2/mol\n",
+ " \n",
+ " x0H= 0.74 mol H2/mol\n",
+ "Recycle-Purge splitting Analysis\n",
+ "Total mole balance\n",
+ "np= 5.40 mol purge\n",
+ "Flow chart scaling\n",
+ "Factor for scaling= 11.07 Kmol/h/mol\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 21,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8-1, page no. 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "xN2wet=0.6\n",
+ "xCO2wet=0.15\n",
+ "xO2wet=0.1\n",
+ "xH2O=0.15\n",
+ "basis=100 #mol Wet gas \n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"part 1\")\n",
+ "wet=xN2wet+xCO2wet+xO2wet\n",
+ "xN2dry=xN2wet/wet\n",
+ "xCO2dry=xCO2wet/wet\n",
+ "xO2dry=xO2wet/wet\n",
+ "print '%s %f %s' %(' \\n xN2 dry =', xN2dry,' mol N2/mol dry gas')\n",
+ "print '%s %f %s' %(' \\n xO2 dry =',xO2dry,' mol O2/mol dry gas')\n",
+ "print '%s %f %s' %(' \\n xCO2 dry =', xCO2dry ,'mol CO2/mol dry gas')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "part 1\n",
+ " \n",
+ " xN2 dry = 0.705882 mol N2/mol dry gas\n",
+ " \n",
+ " xO2 dry = 0.117647 mol O2/mol dry gas\n",
+ " \n",
+ " xCO2 dry = 0.176471 mol CO2/mol dry gas\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 22,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8-2, page no. 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basisButane=100. #mol/h butane\n",
+ "basisAir=5000. #mol/h\n",
+ "#calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "nO2Theoretical=basisButane*6.5\n",
+ "nAirTheoretical=nO2Theoretical*4.76\n",
+ "percent=(basisAir-nAirTheoretical)*100/nAirTheoretical\n",
+ "print '%s %.2f' %(' \\n percent excess air=',percent)\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " percent excess air= 61.60\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 23,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8-3, page no. 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100. #mol ethane feed\n",
+ "E1=0.9\n",
+ "E2=0.25\n",
+ "excess=0.5\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\" 50percent excess air\")\n",
+ "nO2theoretical=basis*3.5\n",
+ "n0=nO2theoretical*(1+excess)/0.21\n",
+ "print '%s %.4f %s' %(' n0=',n0,' mol air fed')\n",
+ "print(\"90% ethane conversion\")\n",
+ "n1=(1-E1)*basis\n",
+ "print '%s %.4f' %('No. of moles of ethane unreacted=',n1)\n",
+ "print(\"25% conversion to CO\")\n",
+ "n4=E2*(basis-n1)*2\n",
+ "print '%s %.4f %s' %('n4=', n4 ,'mol CO')\n",
+ "print(\"nitrogen balance\")\n",
+ "n3=0.79*n0\n",
+ "print '%s %.4f %s' %('n3=', n3,' mol N2')\n",
+ "print(\"Atomic carbon balance\")\n",
+ "n5=2*basis-2*n1-n4\n",
+ "print '%s %.4f %s' %('n5=', n5 ,'mol CO2')\n",
+ "print(\"Atomic hydrogen balance\")\n",
+ "n6=(basis*6-n1*6)/2\n",
+ "print '%s %.4f %s' %('n6=', n6,' mol H2O')\n",
+ "print(\"Atomic oxygen balance\")\n",
+ "n2=(nO2theoretical*1.5*2-n4-n5*2-n6)/2\n",
+ "print '%s %.4f %s' %('n2=', n2 ,'mol O2')\n",
+ "dry=n1+n2+n3+n4+n5\n",
+ "wet=dry+n6\n",
+ "y1=n1/dry\n",
+ "print '%s %.4f %s' %('\\n y1=', y1,' mol C2H6/mol')\n",
+ "y2=n2/dry\n",
+ "print '%s %.4f %s' %('\\n y2=', y2 ,'mol O2/mol')\n",
+ "y3=n3/dry\n",
+ "print '%s %.4f %s' %('\\n y3=', y3,' mol N2/mol')\n",
+ "y4=n4/dry\n",
+ "print '%s %.4f %s' %('\\n y4=', y4 ,'mol CO/mol')\n",
+ "y5=n5/dry\n",
+ "print '%s %.4f %s' %('\\n y5=',y5,' mol CO2/mol')\n",
+ "ratio=n6/dry\n",
+ "print '%s %.4f %s' %(' \\n ratio=',ratio,' mol H2O/mol dry stack gas')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " 50percent excess air\n",
+ " n0= 2500.0000 mol air fed\n",
+ "90% ethane conversion\n",
+ "No. of moles of ethane unreacted= 10.0000\n",
+ "25% conversion to CO\n",
+ "n4= 45.0000 mol CO\n",
+ "nitrogen balance\n",
+ "n3= 1975.0000 mol N2\n",
+ "Atomic carbon balance\n",
+ "n5= 135.0000 mol CO2\n",
+ "Atomic hydrogen balance\n",
+ "n6= 270.0000 mol H2O\n",
+ "Atomic oxygen balance\n",
+ "n2= 232.5000 mol O2\n",
+ "\n",
+ " y1= 0.0042 mol C2H6/mol\n",
+ "\n",
+ " y2= 0.0970 mol O2/mol\n",
+ "\n",
+ " y3= 0.8238 mol N2/mol\n",
+ "\n",
+ " y4= 0.0188 mol CO/mol\n",
+ "\n",
+ " y5= 0.0563 mol CO2/mol\n",
+ " \n",
+ " ratio= 0.1126 mol H2O/mol dry stack gas\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 24,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8-4, page no. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "basis=100 #mol pf product gas\n",
+ "xCO=0.015\n",
+ "xCO2=0.060\n",
+ "xO2=0.082\n",
+ "xN2=0.843\n",
+ "#Calculations and printing:\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"N2 balance\")\n",
+ "na=basis*xN2/0.79\n",
+ "print '%s %.2f %s' %('na=',na,' mol air')\n",
+ "print(\"Atomic C balance\")\n",
+ "nc=basis*xCO + basis*xCO2\n",
+ "print '%s %.2f %s' %('nc=',nc ,'mol C')\n",
+ "print(\"Atomic O balance\")\n",
+ "nw=0.21*na*2-basis*(xCO + xCO2*2 + xO2*2)\n",
+ "print '%s %.2f %s' %('nw=',nw,' mol oxygen')\n",
+ "print(\"Atomic H2 balance\")\n",
+ "nh=nw*2\n",
+ "print '%s %.2f %s' %('nh=',nh ,'mol H2')\n",
+ "ratio=nh/nc\n",
+ "print '%s %.2f %s' %('\\n C/H ratio in fuel=',ratio,' mol H/mol C')\n",
+ "print(\"percent excess air\")\n",
+ "nO2theoretical=nc + nh/4\n",
+ "print '%s %.2f %s' %('nO2 theoretical=',nO2theoretical ,'mol O2')\n",
+ "nO2fed=0.21*na\n",
+ "print '%s %.2f %s' %(' \\n nO2fed=',nO2fed,' mol O2')\n",
+ "percent=(nO2fed-nO2theoretical)*100/nO2theoretical\n",
+ "print '%s %.2f %s' %('\\n percentage excess air=',percent ,'excess air')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "N2 balance\n",
+ "na= 106.71 mol air\n",
+ "Atomic C balance\n",
+ "nc= 7.50 mol C\n",
+ "Atomic O balance\n",
+ "nw= 14.92 mol oxygen\n",
+ "Atomic H2 balance\n",
+ "nh= 29.84 mol H2\n",
+ "\n",
+ " C/H ratio in fuel= 3.98 mol H/mol C\n",
+ "percent excess air\n",
+ "nO2 theoretical= 14.96 mol O2\n",
+ " \n",
+ " nO2fed= 22.41 mol O2\n",
+ "\n",
+ " percentage excess air= 49.80 excess air\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 25,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9-1, page no. 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "feed=59.6 #mol/s\n",
+ "x=0.2\n",
+ "TopFlow1=48.7 #mol/s\n",
+ "outputx1=0.021\n",
+ "BottomFlow1=10.9\n",
+ "TopFlow2=48.3\n",
+ "outputx2=0.063\n",
+ "BottomFlow2=6.4\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Design\")\n",
+ "MEKin1=feed*x\n",
+ "MEKout1=TopFlow1*outputx1 + BottomFlow1\n",
+ "closure1=MEKout1*100/MEKin1\n",
+ "print '%s %d %s' %('closure1=',closure1,' percent')\n",
+ "print(\"Experiment\")\n",
+ "MEKin2=feed*x\n",
+ "MEKout2=TopFlow2*outputx2 + BottomFlow2\n",
+ "closure2=MEKout2*100/MEKin2\n",
+ "print '%s %d %s' %('closure2=',closure2, 'percent')\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Design\n",
+ "closure1= 100 percent\n",
+ "Experiment\n",
+ "closure2= 79 percent\n"
+ ]
+ }
+ ]
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter5.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter5.ipynb
new file mode 100755
index 00000000..344fae37
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter5.ipynb
@@ -0,0 +1,807 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dfc2bc36e1576488bcd07ee5435a22145b28c649187a0989b470c7cdd7161f42"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: Single-Phase Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1-1, page no. 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "wtperct=0.5\n",
+ "Dwater=0.998 #g/cm^3\n",
+ "Dsulfuric=1.834 #g/cm^3\n",
+ "\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "invPbar=wtperct/Dwater + (1-wtperct)/Dsulfuric\n",
+ "print '%s %.3f' %(\"Density calculated using volume additvity (g/cm^3) =\",1/invPbar)\n",
+ "Pbar=wtperct*Dwater + (1-wtperct)*Dsulfuric\n",
+ "print '%s %.3f' %(\" \\n Density calculated using mass additivity (g/cm^3) =\",Pbar)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density calculated using volume additvity (g/cm^3) = 1.293\n",
+ " \n",
+ " Density calculated using mass additivity (g/cm^3) = 1.416\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2-1, page no. 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T=23.0+273 #kelvin\n",
+ "P=3.0+14.7 #psi \n",
+ "#conversion of pressure from psig to psi requires addition of 14.67 which is 1 atm\n",
+ "R=0.08206 #lt-atm\n",
+ "MN2=28.0 #molecular wt.\n",
+ "weight=100.0 #grams\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "n=weight/MN2 #mol\n",
+ "V=n*R*T*14.7/P #lt\n",
+ "print '%s %.3f' %(\"assuming ideal gas behaviour, volume (litres) = \",V)\n",
+ "Vcap=V/n\n",
+ "if(Vcap>5):\n",
+ " print(\"ideal gas equation yields error less than 1 percent for diatomic gas\")\n",
+ "else:\n",
+ " print(\"ideal gas equation yields error greater than 1 percent for diatomic gases\")\n",
+ "\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "assuming ideal gas behaviour, volume (litres) = 72.046\n",
+ "ideal gas equation yields error less than 1 percent for diatomic gas\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2-2, page no. 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T=360.0+273 #Kelvin\n",
+ "P=3.0 #atm\n",
+ "Vdot=1100.0 #kg/h\n",
+ "M=58.1 \n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "ndot=Vdot/M #kmol/h\n",
+ "vdot=ndot*22.4*T/(273*P)\n",
+ "print '%s %.3f' %(\"The volumetric flow rate of the stream (m^3/h) = \",vdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volumetric flow rate of the stream (m^3/h) = 327.781\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2-3, page no. 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "V1=10.0 #ft^3\n",
+ "T1=70.0+460 #R\n",
+ "P1=1.0 #atm\n",
+ "P2=2.5 #atm\n",
+ "T2=610.0+460 #R\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "V2=V1*P1*T2/(P2*T1)\n",
+ "print '%s %.3f' %(\"Volume in final state (ft^3) = \",V2)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume in final state (ft^3) = 8.075\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2-4, page no. 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "#all the calculations are done in R scale\n",
+ "T2=285.0+460 #R\n",
+ "T1=32.0+460 #R\n",
+ "P2=1.30 #atm\n",
+ "P1=1.0 #atm\n",
+ "V1dot=3.95*100000. #ft^3/h\n",
+ "\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "#SCFH means ft^3(STP/h)\n",
+ "ndot=3.95*math.pow(10,5)/359.\n",
+ "print '%s %.3f' %(\" Molar flowrate (lb-moles/hr) = \",ndot)\n",
+ "V2dot=V1dot*T2*P1/(T1*P2)\n",
+ "print '%s %.3E' %(\" \\n True volumetric flowrate (ft^3/h) = \",V2dot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Molar flowrate (lb-moles/hr) = 1100.279\n",
+ " \n",
+ " True volumetric flowrate (ft^3/h) = 4.601E+05\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2-5, page no. 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "flowinA=400.0 #L/min\n",
+ "flowinN=419.0 # m^3 STP /min\n",
+ "Pfinal=6.3 #gauge\n",
+ "Tfinal=325.0 # C\n",
+ "Pacetone=501.0 #mm of Hg\n",
+ "Dacetone=791.0 #g/L\n",
+ "Macetone=58.08 #g\n",
+ "T1=300.0 #k\n",
+ "P1=1238.0 #mm Hg original\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "n2cap=flowinA*Dacetone/Macetone\n",
+ "print '%s %.3f' %(\" \\n Molar flowrate of Acetone (mol Acetone/min) = \",n2cap)\n",
+ "P=Pfinal*760 + 763\n",
+ "y4=Pacetone/P\n",
+ "print '%s %.3f' %(\" \\n Mole fraction of Acetone in the final flow (mol Acetone/mol) = \",y4)\n",
+ "print '%s %.3f' %(\" \\n Mole fraction of Nitrogen in the final flow (mol Nitrogen/mol) = \",1-y4)\n",
+ "n3cap=flowinN/0.0224\n",
+ "n4cap=n2cap/y4\n",
+ "print(\"By using Overall Molar balance,\")\n",
+ "n1cap=n4cap-n2cap-n3cap\n",
+ "V1cap=n1cap*0.0224*T1*760/(1*273*P1)\n",
+ "print '%s %.3f' %(\"Volumetric Flowrate of Nitrogen (Nitrogen/min) = \",V1cap)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Molar flowrate of Acetone (mol Acetone/min) = 5447.658\n",
+ " \n",
+ " Mole fraction of Acetone in the final flow (mol Acetone/mol) = 0.090\n",
+ " \n",
+ " Mole fraction of Nitrogen in the final flow (mol Nitrogen/mol) = 0.910\n",
+ "By using Overall Molar balance,\n",
+ "Volumetric Flowrate of Nitrogen (Nitrogen/min) = 547.119\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3-1, page no. 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T= -150.8 + 273.2 #k\n",
+ "Vcap= 3./2. #L/mol\n",
+ "Tc=126.2 #k\n",
+ "Pc=33.5 #atm\n",
+ "w=0.040\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Pideal=0.08206*T/Vcap\n",
+ "print '%s %.3f' %(\" \\n The value of pressure as per Ideal gas equation (atm) = \",Pideal)\n",
+ "Tr=T/Tc\n",
+ "B0=0.083 - (0.422/math.pow(Tr,1.6))\n",
+ "B1=0.139 - (0.172/math.pow(Tr,4.2))\n",
+ "B=0.08206*Tc*(B0+w*B1)/Pc\n",
+ "Pvirial=0.08206*T*(1+ B/Vcap)/Vcap\n",
+ "print '%s %.3f' %(\"\\n The value of pressure as per Virial gas equation (atm) = \",Pvirial)\n",
+ "e=(Pideal-Pvirial)*100/Pvirial\n",
+ "print '%s %.3f' %(\" \\n Percentage error due to Ideal gas Equation =\",e)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " The value of pressure as per Ideal gas equation (atm) = 6.696\n",
+ "\n",
+ " The value of pressure as per Virial gas equation (atm) = 6.196\n",
+ " \n",
+ " Percentage error due to Ideal gas Equation = 8.072\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3-2, page no. 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "V=2.5 #m^3\n",
+ "n=1.00 #Kmol\n",
+ "T= 300 #K\n",
+ "Tc=304.2 #K\n",
+ "Pc=72.9 #atm\n",
+ "w=0.225\n",
+ "R=0.08206\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Vcap=V/n\n",
+ "a=0.42747*math.pow(R*Tc,2) /Pc\n",
+ "b=0.08664*R*Tc/Pc\n",
+ "m=0.48508+ 1.5171*w -0.1561*w*w\n",
+ "Tr=T/Tc\n",
+ "alpha=math.pow(1+ m*(1-math.sqrt(Tr)),2)\n",
+ "P=(R*T/(Vcap-b))-(alpha*a/(Vcap*(Vcap+b)))\n",
+ "print '%s %.3f' %(\" \\n Pressure of gas calculated using SRK equation (atm) = \",P)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Pressure of gas calculated using SRK equation (atm) = 9.381\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4-1, page no. 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "Vcap=50.0 #M^3/hr\n",
+ "P=40.0 #bar\n",
+ "T=300.0 #K\n",
+ "R=8.314\n",
+ "M=16.04 #kg/kmol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "z=0.934\n",
+ "print '%s %.3f' %(\" \\n From the Table, z= \",z)\n",
+ "ncap=P*Vcap*101.325/(z*R*T*1.01325)\n",
+ "mcap=ncap*M\n",
+ "print '%s %.3f' %(\" \\n Mass flow rate of Methane (Kg/hr) = \",mcap)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " From the Table, z= 0.934\n",
+ " \n",
+ " Mass flow rate of Methane (Kg/hr) = 1377.071\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4-2, page no. 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "n=100.0 #gm-moles\n",
+ "V=5.0 #ltr\n",
+ "T= -20.6 + 273.2 #K\n",
+ "Tc=126.2 #K\n",
+ "Pc=33.5 #atm\n",
+ "R=0.08206\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Tr=T/Tc\n",
+ "Vrideal=V*Pc/(n*R*Tc)\n",
+ "print '%s %.3f' %(\" \\n Tr= \",Tr)\n",
+ "print '%s %.3f' %(\"\\n Vrideal=\",Vrideal)\n",
+ "z=1.77\n",
+ "print '%s %.3f' %(\"\\n From the graphs, z=\",z)\n",
+ "P=z*R*T*n/V\n",
+ "Pr=P/Pc\n",
+ "print '%s %.3f' %(\" \\n Pr= \",Pr)\n",
+ "print '%s %.3f' %(\" \\n Pressure in the cylinder (atm) = \",P)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Tr= 2.002\n",
+ "\n",
+ " Vrideal= 0.162\n",
+ "\n",
+ " From the graphs, z= 1.770\n",
+ " \n",
+ " Pr= 21.904\n",
+ " \n",
+ " Pressure in the cylinder (atm) = 733.784\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4-3, page no. 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "yN2=0.25\n",
+ "yH2=1.0-yN2\n",
+ "P=800.0 #atm\n",
+ "T= -70+273.2 #K\n",
+ "TcH2=33.0 #K\n",
+ "TcN2=126.2 #K\n",
+ "PcH2=12.8 #atm\n",
+ "PcN2=33.5 #atm\n",
+ "R=0.0083\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\"All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Applying newton corrections for Hydrogen,\")\n",
+ "TcaH2=TcH2+8.\n",
+ "PcaH2=PcH2+8.\n",
+ "Tcbar=yH2*TcaH2 + yN2*TcN2\n",
+ "Pcbar=yH2*PcaH2 + yN2*PcN2\n",
+ "Trbar=T/Tcbar\n",
+ "Prbar=P/Pcbar\n",
+ "print '%s %.3f' %(\" \\n Trbar = \",Trbar)\n",
+ "print '%s %.3f' %(\" \\n Prbar = \",Prbar)\n",
+ "Zm=1.86\n",
+ "print '%s %.4f' %(\" \\n From the graph, Zm = \",Zm)\n",
+ "Vcap=Zm*R*T/P\n",
+ "print '%s %.5f' %(\" \\n Specific Volume of Mixture (L/mol) = \",Vcap)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Applying newton corrections for Hydrogen,\n",
+ " \n",
+ " Trbar = 3.262\n",
+ " \n",
+ " Prbar = 33.368\n",
+ " \n",
+ " From the graph, Zm = 1.8600\n",
+ " \n",
+ " Specific Volume of Mixture (L/mol) = 0.00392\n"
+ ]
+ }
+ ]
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter6.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter6.ipynb
new file mode 100755
index 00000000..e1ddd7be
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter6.ipynb
@@ -0,0 +1,1137 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:27df12dd9928a7234ef95007770cbb19da31332c34bb007953024d3646517da2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Multiphase Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1-1, page no. 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T2=15.4+273.2 #K\n",
+ "T1=7.6+273.2 #K\n",
+ "P1=40.0 #mm of Hg\n",
+ "P2=60.0 #mm of Hg\n",
+ "T=42.2+273.2 #K\n",
+ "R=8.314 #J/mol.k\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"let deltaHv/R = S\")\n",
+ "S= - (T1*T2* math.log(P2/P1))/(T1-T2)\n",
+ "deltahv=S*R\n",
+ "print '%s %d' %(\" \\n Latent Heat of Vaporization (J/mol) =\",deltahv)\n",
+ "B=math.log(P1) + S/T1\n",
+ "print '%s %.3f' %(\"\\n B=\",B)\n",
+ "P=math.exp(-S/T + B)\n",
+ "print '%s %.3f %s %.3f' %(\"\\n P* at\",T,\" K is (mm Hg)= \",P)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "let deltaHv/R = S\n",
+ " \n",
+ " Latent Heat of Vaporization (J/mol) = 35023\n",
+ "\n",
+ " B= 18.691\n",
+ "\n",
+ " P* at 315.400 K is (mm Hg)= 207.400\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3-1, page no. 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "P=760.0 #mm of Hg\n",
+ "Pstar=289.0 #mm of Hg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "y=Pstar/P\n",
+ "print '%s %.3f %s %.3f' %(\" \\n Molar composition of Water is\",y,\" and Air is\",1-y)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Molar composition of Water is 0.380 and Air is 0.620\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3-2, page no. 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T=100.0+273.2 #K\n",
+ "PT=5260.0 #mm of Hg\n",
+ "y=0.1 #by volume\n",
+ "basis= 100 #mol of feed gas\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "P=y*PT\n",
+ "if(P<760):\n",
+ " print(\"The Vapour is Super heated\")\n",
+ "elif(P==760): \n",
+ " print(\"The vapour is At Dew point\")\n",
+ "else:\n",
+ " print(\"The vapour is not Super heated\")\n",
+ "\n",
+ "print(\"From tables Tdp=90 C\")\n",
+ "print(\"Superheat = 100-90=10 C \")\n",
+ "print(\"Using Raoult law at the outlet\")\n",
+ "y1=355/PT\n",
+ "print '%s %.3f' %(\"y1=\",y1)\n",
+ "print(\"Balance on Dry Air\")\n",
+ "n2=basis*(1-y)/(1-y1)\n",
+ "print '%s %.3f' %(\"n2 (mol) = \",n2)\n",
+ "print(\"Total mole balance\")\n",
+ "n1=basis-n2\n",
+ "print '%s %.3f' %(\"n1 (mol) = \",n1)\n",
+ "print '%s %.3f' %(\" \\n Percentage condesation=\",n1*100/(y*basis))\n",
+ "Psaturation=760/y\n",
+ "print '%s %.3f %s' %(\"\\n Any increase in pressure above\", Psaturation,\" mm of Hg must cause condensation \")\n",
+ "print(\" \\n For the next part of the problem use the same code by modifying PT to be 8500 mm of Hg\")\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "The Vapour is Super heated\n",
+ "From tables Tdp=90 C\n",
+ "Superheat = 100-90=10 C \n",
+ "Using Raoult law at the outlet\n",
+ "y1= 0.067\n",
+ "Balance on Dry Air\n",
+ "n2 (mol) = 96.514\n",
+ "Total mole balance\n",
+ "n1 (mol) = 3.486\n",
+ " \n",
+ " Percentage condesation= 34.862\n",
+ "\n",
+ " Any increase in pressure above 7600.000 mm of Hg must cause condensation \n",
+ " \n",
+ " For the next part of the problem use the same code by modifying PT to be 8500 mm of Hg\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3-3, page no. 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "T=75.0 +273 #K\n",
+ "P75=289.0 #mm of Hg\n",
+ "hr=0.3\n",
+ "Porig=825.0 #mm of Hg\n",
+ "PorigBar=1.1 #bar\n",
+ "Vdot=1000.0 #M^3/h\n",
+ "R=0.0831\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print (\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "P=hr*P75\n",
+ "y=P/Porig\n",
+ "ndot=PorigBar*Vdot/(R*T)\n",
+ "ndotWater=ndot*y\n",
+ "print '%s %.3f' %(\" \\n Molar flowrate of Water (Kmol/h) = \",ndotWater)\n",
+ "ndotBDA=ndot*(1-y)\n",
+ "print '%s %.3f' %(\" \\n Molar flowrate of Dry Air (Kmol/h) = \",ndotBDA)\n",
+ "ndotO2=ndotBDA*0.21\n",
+ "print '%s %.3f' %(\" \\n Molar flowrate of Oxygen (Kmol/h) = \",ndotO2)\n",
+ "hm=P/(Porig-P)\n",
+ "ha=hm*18/29\n",
+ "hmdot=P75/(Porig-P75)\n",
+ "hp=100*hm/hmdot\n",
+ "print '%s %.3f' %(\" \\n Molal Humidity (mol water/mol BDA) = \",hm)\n",
+ "print '%s %.3f' %(\" \\n Absolute Humidity (kg water/kg BDA) = \",ha)\n",
+ "print '%s %.3f' %(\" \\n Percentage Humidity=\",hp)\n",
+ "print(\"\\n From table B.3, Tdp=48.7 C\")\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Molar flowrate of Water (Kmol/h) = 3.997\n",
+ " \n",
+ " Molar flowrate of Dry Air (Kmol/h) = 34.040\n",
+ " \n",
+ " Molar flowrate of Oxygen (Kmol/h) = 7.148\n",
+ " \n",
+ " Molal Humidity (mol water/mol BDA) = 0.117\n",
+ " \n",
+ " Absolute Humidity (kg water/kg BDA) = 0.073\n",
+ " \n",
+ " Percentage Humidity= 21.780\n",
+ "\n",
+ " From table B.3, Tdp=48.7 C\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4-1, page no. 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "basis=100.0 #lb-mole/h\n",
+ "x=0.45\n",
+ "PH2O=31.6 #mm of Hg\n",
+ "PSO2=176.0 #mm of Hg\n",
+ "P=760.0 #mm of Hg\n",
+ "y=2.0\n",
+ "M1=64.0 \n",
+ "M2=18.0\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "yH2O=PH2O/P\n",
+ "ySO2=PSO2/P\n",
+ "yAir=1-yH2O-ySO2\n",
+ "print(\"Using Air balance, \")\n",
+ "nG2=(1-x)*basis/yAir\n",
+ "print '%s %.3f' %(\"nG2 (lbm/h) = \",nG2)\n",
+ "xSO2=y/102\n",
+ "xH2O=1-xSO2\n",
+ "print(\"Using SO2 balance, \")\n",
+ "nL2=(basis*x-nG2*ySO2)*M1/(xSO2)\n",
+ "print '%s %.3f' %(\"nL2 (lbm/h) = \",nL2)\n",
+ "print(\"Using H2O balance, \")\n",
+ "nL1=nG2*yH2O*M2 + nL2*xH2O\n",
+ "print '%s %.3f' %(\"nL1 (lbm H2O/h) = \",nL1)\n",
+ "SO2Absorbed=nL2*xSO2\n",
+ "SO2Fed=basis*x*M1\n",
+ "Fraction=SO2Absorbed/SO2Fed\n",
+ "print '%s %.3f' %(\" \\n Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = \",Fraction)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using Air balance, \n",
+ "nG2 (lbm/h) = 75.670\n",
+ "Using SO2 balance, \n",
+ "nL2 (lbm/h) = 89683.186\n",
+ "Using H2O balance, \n",
+ "nL1 (lbm H2O/h) = 87981.325\n",
+ " \n",
+ " Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = 0.611\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4-2, page no. 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "basis=100.0 #lb-mole/h\n",
+ "x=0.45\n",
+ "PH2O=31.6 #mm of Hg\n",
+ "PSO2=176.0 #mm of Hg\n",
+ "P=760.0 #mm of Hg\n",
+ "y=2.0\n",
+ "M1=64.0 \n",
+ "M2=18.0\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "yH2O=PH2O/P\n",
+ "ySO2=PSO2/P\n",
+ "yAir=1-yH2O-ySO2\n",
+ "print(\"Using Air balance, \")\n",
+ "nG2=(1-x)*basis/yAir\n",
+ "print '%s %.3f' %(\"nG2 (lbm/h) = \",nG2)\n",
+ "xSO2=y/102\n",
+ "xH2O=1-xSO2\n",
+ "print(\"Using SO2 balance, \")\n",
+ "nL2=(basis*x-nG2*ySO2)*M1/(xSO2)\n",
+ "print '%s %.3f' %(\"nL2 (lbm/h) = \",nL2)\n",
+ "print(\"Using H2O balance, \")\n",
+ "nL1=nG2*yH2O*M2 + nL2*xH2O\n",
+ "print '%s %.3f' %(\"nL1 (lbm H2O/h) = \",nL1)\n",
+ "SO2Absorbed=nL2*xSO2\n",
+ "SO2Fed=basis*x*M1\n",
+ "Fraction=SO2Absorbed/SO2Fed\n",
+ "print '%s %.3f' %(\" \\n Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = \",Fraction)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using Air balance, \n",
+ "nG2 (lbm/h) = 75.670\n",
+ "Using SO2 balance, \n",
+ "nL2 (lbm/h) = 89683.186\n",
+ "Using H2O balance, \n",
+ "nL1 (lbm H2O/h) = 87981.325\n",
+ " \n",
+ " Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = 0.611\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5-1, page no. 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "basis=150.0 #kg feed\n",
+ "S100=0.905 #g AgNO3/g\n",
+ "S20=0.689 #g AgNO3/g\n",
+ "inputx=0.095 #kg water/kg\n",
+ "outputx=0.311 #kg water/kg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"\\n Composition of Filter cake,\")\n",
+ "print(\"\\n m2=4m3\")\n",
+ "print(\"\\n Water balance around the crystallizer,\")\n",
+ "print '%s' %(\"\\n basis*inputx* kg H2O = outputx m1 + outputx m1 \\n\")\n",
+ "print(\"Mass balance around crystallizer, \\n\")\n",
+ "print '%d %s' %(basis,\"=m1+m2+m3\")\n",
+ "A=([[0, 1, -4],[outputx, 0, outputx],[1, 1, 1]])\n",
+ "b=([[0],[basis*inputx],[basis]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "#Here we solved two linear equations simultaneously\n",
+ "m1=C[0,0]\n",
+ "print '%s %.2f' %(\" \\n m1 (Kg) = \",m1)\n",
+ "m2=C[1,0]\n",
+ "print '%s %d' %(\" \\n m2 (Kg) = \",m2)\n",
+ "m3=C[2,0]\n",
+ "print '%s %d' %(\" \\n m3 (Kg) = \",m3)\n",
+ "print(\"\\n Overall AgNO3 balance,\")\n",
+ "m5=(1-inputx)*basis - (1-outputx)*m1\n",
+ "print '%s %d' %(\"\\n m5 (kg AgNO3 crystals recovered) = \",m5)\n",
+ "percentage=m5*100/(basis*(1-inputx))\n",
+ "print '%s %.3f' %(\" \\n Percentage recovery=\",percentage)\n",
+ "print(\"\\n Overall mass balance\")\n",
+ "m4=basis-m1-m5\n",
+ "print '%s %d' %(\"\\n m4 (Kg water removed in the Dryer) = \",m4)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "\n",
+ " Composition of Filter cake,\n",
+ "\n",
+ " m2=4m3\n",
+ "\n",
+ " Water balance around the crystallizer,\n",
+ "\n",
+ " basis*inputx* kg H2O = outputx m1 + outputx m1 \n",
+ "\n",
+ "Mass balance around crystallizer, \n",
+ "\n",
+ "150 =m1+m2+m3\n",
+ " \n",
+ " m1 (Kg) = 19.77\n",
+ " \n",
+ " m2 (Kg) = 104\n",
+ " \n",
+ " m3 (Kg) = 26\n",
+ "\n",
+ " Overall AgNO3 balance,\n",
+ "\n",
+ " m5 (kg AgNO3 crystals recovered) = 122\n",
+ " \n",
+ " Percentage recovery= 89.963\n",
+ "\n",
+ " Overall mass balance\n",
+ "\n",
+ " m4 (Kg water removed in the Dryer) = 8\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5-2, page no. 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "inputx=0.6\n",
+ "basis=100.0 #kg Feed\n",
+ "S=63.0 #Kg KNO3/100 Kg H2O\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "outputx=S/(S+100)\n",
+ "print '%s %.3f' %(\"x (Kg KNO3/Kg) = \",outputx)\n",
+ "print(\"Water balance\")\n",
+ "m1=basis*(1-inputx)/(1-outputx)\n",
+ "print '%s %.3f' %(\" \\n m1 (Kg) = \",m1)\n",
+ "print(\"Mass balance\")\n",
+ "m2=basis-m1\n",
+ "print '%s %.3f' %(\" \\n m2 (kg) = \",m2)\n",
+ "percentage=m2*100/(basis*inputx)\n",
+ "print '%s %.3f' %(\" \\n Percentage of KNO3 in the feed that crystallizes is \",percentage)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "x (Kg KNO3/Kg) = 0.387\n",
+ "Water balance\n",
+ " \n",
+ " m1 (Kg) = 65.200\n",
+ "Mass balance\n",
+ " \n",
+ " m2 (kg) = 34.800\n",
+ " \n",
+ " Percentage of KNO3 in the feed that crystallizes is 58.000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5-3, page no. 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "basis=1.0 #Tonne Epsom salt produced/h\n",
+ "inputx=0.301 #Tonne MgSO4/tonne\n",
+ "outputx=0.232 #Tonne MgSO4/tonne\n",
+ "M=120.4\n",
+ "M1=246.4\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Total mass balance\")\n",
+ "print(\"m1=1+m2\")\n",
+ "print(\"MgSO4 balance\")\n",
+ "print(\" \\n inputx m1 = bassis* M/ M1 + m2 outputx\")\n",
+ "A=([[1, -1],[inputx, -outputx]])\n",
+ "b=([[1],[basis*M/M1]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "#Here we solved two linear equations simultaneously\n",
+ "m1=C[0,0]\n",
+ "m2=C[1,0]\n",
+ "print '%s %.3f' %(\" \\n m1 (Tonne/h) = \",m1)\n",
+ "print '%s %.3f' %(\" \\n m2 (Tonne/h) = \",m2)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Total mass balance\n",
+ "m1=1+m2\n",
+ "MgSO4 balance\n",
+ " \n",
+ " inputx m1 = bassis* M/ M1 + m2 outputx\n",
+ " \n",
+ " m1 (Tonne/h) = 3.719\n",
+ " \n",
+ " m2 (Tonne/h) = 2.719\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5-4, page no. 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "m1=5.0 #g of solute\n",
+ "m2=100.0 #g of Water\n",
+ "P=1.0 #atm\n",
+ "Tf=100.421 #C\n",
+ "Ti=25.0 #C\n",
+ "R=8.314 #J/mol.K\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "x=(Tf-100.)*40656./(R*373.16*373.16)\n",
+ "y=m2/18.016\n",
+ "Ms=m1*(1-x)/(y*x)\n",
+ "print '%s %.3f' %(\" \\n Ms (g/mol) =\",Ms)\n",
+ "deltaTm=R*273.16*273.16*x/6009.5\n",
+ "Tms=0-deltaTm\n",
+ "print '%s %.3f' %(\" \\n Tms (C)=\",Tms)\n",
+ "Pstar=(1-x)*23.756\n",
+ "print '%s %.3f' %(\" \\n Solvent Vapour pressure (mm Hg) = \",Pstar)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Ms (g/mol) = 60.028\n",
+ " \n",
+ " Tms (C)= -1.526\n",
+ " \n",
+ " Solvent Vapour pressure (mm Hg) = 23.405\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-1, page no. 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "V1=200.0 #CC Acetone\n",
+ "x=0.1 #Wt acetone \n",
+ "V2=400.0 #CC chloroform\n",
+ "DA=0.792 #g/cc\n",
+ "DC=1.489 #g/cc\n",
+ "DW=1.0 #g/cc\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Dbar=DA*DW/(x*DW + (1-x)*DA)\n",
+ "mass1=V1*Dbar\n",
+ "mass2=V2*DC\n",
+ "print(\"C balance\")\n",
+ "m4=mass2\n",
+ "print '%s %.3f' %(\" \\n m4=\",m4)\n",
+ "print(\"W balance\")\n",
+ "m2=(1-x)*mass1\n",
+ "print '%s %.3f' %(\" \\n m2=\",m2)\n",
+ "print(\"A balance\")\n",
+ "print(\"m1+m3=x * mass1\")\n",
+ "print(\"Distribution Cooefficient ,K=m3*(m1+m2)/m1*(m3+m4)\")\n",
+ "print(\"On solving, \")\n",
+ "m1=2.7\n",
+ "m3=16.8\n",
+ "percentage=m3*100/(x*mass1)\n",
+ "print '%s %.3f' %(\" \\n m1=\",m1)\n",
+ "print '%s %.3f' %(\" \\n m3=\",m3)\n",
+ "print '%s %.3f' %(\" \\n percentage of acetone transferred to chloroform=\",percentage)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "C balance\n",
+ " \n",
+ " m4= 595.600\n",
+ "W balance\n",
+ " \n",
+ " m2= 175.394\n",
+ "A balance\n",
+ "m1+m3=x * mass1\n",
+ "Distribution Cooefficient ,K=m3*(m1+m2)/m1*(m3+m4)\n",
+ "On solving, \n",
+ " \n",
+ " m1= 2.700\n",
+ " \n",
+ " m3= 16.800\n",
+ " \n",
+ " percentage of acetone transferred to chloroform= 86.206\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-2, page no. 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "basis=1000.0 #Kg of solution\n",
+ "inputxA=0.3 #Wt. fraction of acetone\n",
+ "outputxA1=0.05\n",
+ "outputxM1=0.02\n",
+ "outputxA2=0.1\n",
+ "outputxM2=0.87\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Mass balance\")\n",
+ "print(\"ms + basis = mE + mR\")\n",
+ "print(\"acetone balance\")\n",
+ "print(\"inputxA *basis = outputxA2 *mE + outputxA1* mR\")\n",
+ "print(\"Water balance\")\n",
+ "print(\" \\n 1-inputxA *basis = 1-outputxA2-outputxM2 *mE + 1-outputxA1-outputxM1* mR\")\n",
+ "A=([[1, 1, -1],[outputxA2, outputxA1, 0],[1-outputxA2-outputxM2, 1-outputxA1-outputxM1, 0]])\n",
+ "b=([[basis],[inputxA*basis],[(1-inputxA)*basis]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "#Here We solved three linear equations simultaneously\n",
+ "mE=C[0,0]\n",
+ "mR=C[1,0]\n",
+ "mS=C[2,0]\n",
+ "print '%s %.3f' %(\" \\n mE (Kg) = \",mE)\n",
+ "print '%s %.3f' %(\" \\n mR (Kg) = \",mR)\n",
+ "print '%s %.3f' %(\" \\n mS (Kg MIBK) = \",mS)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Mass balance\n",
+ "ms + basis = mE + mR\n",
+ "acetone balance\n",
+ "inputxA *basis = outputxA2 *mE + outputxA1* mR\n",
+ "Water balance\n",
+ " \n",
+ " 1-inputxA *basis = 1-outputxA2-outputxM2 *mE + 1-outputxA1-outputxM1* mR\n",
+ " \n",
+ " mE (Kg) = 2666.667\n",
+ " \n",
+ " mR (Kg) = 666.667\n",
+ " \n",
+ " mS (Kg MIBK) = 2333.333\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7-1, page no. 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "V=50.0 #L\n",
+ "P=1.0 #atm\n",
+ "T=34.0+273.2 #K\n",
+ "y=0.3\n",
+ "xF=0.001\n",
+ "R=0.08206\n",
+ "Pstar=169.0 #mm of Hg\n",
+ "Pmm=760.0 #mm of Hg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "n=P*V/(R*T)\n",
+ "print '%s %.3f' %(\" \\n No.of moles (mol) = \",n)\n",
+ "y0=y*Pstar/Pmm\n",
+ "print '%s %.3f' %(\" \\n Y0= (mol CCl4/mol) = \",y0)\n",
+ "Pfinal=xF*Pmm\n",
+ "b=0.096*Pfinal\n",
+ "Xstar=0.794*b/(1+b)\n",
+ "print '%s %.3f' %(\" \\n Mass of CCl4 adsorbed to Carbon at equilibrium (g CCl4 ads/g C) = \",Xstar)\n",
+ "Mads=(y0*n- xF*n)*154\n",
+ "print '%s %.3f' %(\" \\n Mass of CCl4 adsorbed (g) = \",Mads)\n",
+ "Mc=Mads/Xstar\n",
+ "print '%s %.3f' %(\" \\n Mass of carbon Required (g) = \",Mc)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " No.of moles (mol) = 1.983\n",
+ " \n",
+ " Y0= (mol CCl4/mol) = 0.067\n",
+ " \n",
+ " Mass of CCl4 adsorbed to Carbon at equilibrium (g CCl4 ads/g C) = 0.054\n",
+ " \n",
+ " Mass of CCl4 adsorbed (g) = 20.071\n",
+ " \n",
+ " Mass of carbon Required (g) = 371.750\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter7.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter7.ipynb
new file mode 100755
index 00000000..6fdddf6a
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter7.ipynb
@@ -0,0 +1,893 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:140795a2dc739119552fbce01ad304d2882d8bdd1339a30f3767fc2e9c80a840"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Energy and Energy Balances"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2-1, page no. 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "ID=2.0 #cm\n",
+ "Vdot=2.0 #m^3/h\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "u=Vdot*100*100 /(math.pi*math.pow(ID/2,2) *3600)\n",
+ "mdot=Vdot*math.pow(10,3) /3600.\n",
+ "Ek=mdot*math.pow(u,2) /2\n",
+ "print '%s %.3f' %(\" \\n Ek (J/s) = \",Ek)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Ek (J/s) = 0.869\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2-2, page no. 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "g=9.81 #m/s^2\n",
+ "mdot=15.0 #Kg/s\n",
+ "z2=20.0 #m\n",
+ "z1=-220. #m\n",
+ "\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Power=mdot*g*(z2-z1)\n",
+ "print '%s %d' %(\" \\n Power (J/s) = \",Power)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Power (J/s) = 35316\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3-1, page no. 319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initilization of variables\n",
+ "Q1=2. #Kcal\n",
+ "Ek1=0#System is stationary\n",
+ "Ep1=0#No vertical displacement\n",
+ "W1=0#No moving boundaries\n",
+ "deltaU1=Q1-W1-Ek1-Ep1\n",
+ "deltaU1J=deltaU1*1000./0.23901 \n",
+ "print '%s %.2f' %(\"Energy gained by the gas in going from 25C to 100C is (J)\",deltaU1J)\n",
+ "W2=100. #J\n",
+ "Ek2=0 #The system is stationary at the initial and final states\n",
+ "Ep2=0#Assumed negligible by hypothesis\n",
+ "deltaU2=0#U depends only on T for an ideal gas and T doesn't change\n",
+ "Q2=deltaU2+W2+Ek2+Ep2\n",
+ "print '%s %.1f' %(\"Heat transferred to the gas while it expands and reequilibrates at 100C is (J)\",Q2)\n",
+ "raw_input(\"Press the Enter key to quit\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy gained by the gas in going from 25C to 100C is (J) 8367.85\n",
+ "Heat transferred to the gas while it expands and reequilibrates at 100C is (J) 100.0\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Press the Enter key to quit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4-1, page no. 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "U=3800.0 #J/mol\n",
+ "P=1.0 #atm\n",
+ "Vcap=24.63 #L/mol\n",
+ "ndot=250.0 #Kmol/h\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Hcap=U+P*Vcap*101.3\n",
+ "H=ndot*Hcap*math.pow(10,3)\n",
+ "print '%s %d' %(\" \\n Specific Enthalpy (J/mol) = \",Hcap)\n",
+ "print '%s %.3E' %(\"\\n Enthalpy of Helium (J/h) = \",H)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Specific Enthalpy (J/mol) = 6295\n",
+ "\n",
+ " Enthalpy of Helium (J/h) = 1.574E+09\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4-2, page no. 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "mdot=500.0/3600.#Kg/s\n",
+ "u1=60.0 #m/s\n",
+ "u2=360.0 #m/s\n",
+ "deltaZ=-5. #m\n",
+ "g=9.81 #m/s^2\n",
+ "Qdot= -10000.#Kcal/h\n",
+ "Ws=70.0 #KW\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Ek=mdot*math.pow(10,-3)*(math.pow(u2,2)-math.pow(u1,2))/2\n",
+ "Ep=mdot*g*deltaZ/math.pow(10,3)\n",
+ "Qdot=Qdot/(0.239*3600.)\n",
+ "Hdot=Qdot-Ws-Ek-Ep\n",
+ "print '%s %f' %(\" \\n DeltaH (KW) = \",Hdot)\n",
+ "Hcap=Hdot/mdot\n",
+ "print '%s %f' %(\"\\n Specific Enthalpy (Kj/Kg) = \",Hcap)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " DeltaH (KW) = -90.365689\n",
+ "\n",
+ " Specific Enthalpy (Kj/Kg) = -650.632958\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5-1, page no. 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "H0=196.23 #Btu/lbm\n",
+ "H50=202.28 #Btu/lbm\n",
+ "Pfinal=51.99 #psia\n",
+ "Pinitial=18.90 #psia\n",
+ "Vfinal=1.920 #ft^3/lbm\n",
+ "Vinitial=4.969 #ft^3/lbm\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "deltaH=H0-H50\n",
+ "deltaU=deltaH+((Pfinal*Vfinal-Pinitial*Vinitial)*1.987/10.73)\n",
+ "print '%s %.3f' %(\" \\n change in Specific Enthalpy (Btu/lbm) = \",deltaH)\n",
+ "print '%s %.3f' %(\" \\n change in Specific Internal Energy (Btu/lbm) = \",deltaU)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " change in Specific Enthalpy (Btu/lbm) = -6.050\n",
+ " \n",
+ " change in Specific Internal Energy (Btu/lbm) = -4.956\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5-3, page no. 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "mdot=2000.0 #Kg/h\n",
+ "P=10.0 #bar\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"From Steam tables, \")\n",
+ "Hin=3201. #Kj/Kg\n",
+ "Hout=2675. #Kj/Kg\n",
+ "Ws= -mdot*(Hout-Hin)/3600.\n",
+ "print '%s %d' %(\"Work delivered by Turbine to surroundings (Kw) = \",Ws)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "From Steam tables, \n",
+ "Work delivered by Turbine to surroundings (Kw) = 292\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6-1, page no. 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "m1=120.0 #kg\n",
+ "m2=175.0 #kg\n",
+ "m3=295.0 #kg\n",
+ "ID=6.0 #cm\n",
+ "P=17.0 #bar\n",
+ "H1=125.7 #Kj/Kg\n",
+ "H2=271.9 #Kj/Kg\n",
+ "H3=2793.0 #Kj/kg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "deltaH=m3*H3-m1*H1-m2*H2\n",
+ "print(\"From tables, Vdot=0.1166 m^3/kg\")\n",
+ "Vdot=0.1166 \n",
+ "A=math.pi*math.pow(ID/2,2) /math.pow(10,4)\n",
+ "u=m3*Vdot/(A*60)\n",
+ "Ek=m3*math.pow(u,2) /(2*math.pow(10,3))\n",
+ "Qdot=deltaH+Ek\n",
+ "print '%s %.3E' %(\"Heat required (Kj/min) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "From tables, Vdot=0.1166 m^3/kg\n",
+ "Heat required (Kj/min) = 7.673E+05\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6-2, page no. 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "basis=1.0 #Kg/s\n",
+ "x=0.6 #ethane\n",
+ "T1=150.0 #K\n",
+ "T2=250.0 #K\n",
+ "P=5.0 #bar\n",
+ "Hout1=434.5 #KJ/Kg\n",
+ "Hout2=130.2 #KJ/Kg\n",
+ "Hin1=314.3 #KJ/Kg\n",
+ "Hin2=30.0 #KJ/Kg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Qdot=basis*(x*Hout1+(1-x)*Hout2-x*Hin1-(1-x)*Hin2)\n",
+ "print '%s %.3f' %(\" \\n Heat required (KJ/Kg) = \",Qdot/basis)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Heat required (KJ/Kg) = 112.200\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6-3, page no. 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "m3=1150.0 #Kg/h\n",
+ "H3=2676.0 #KJ/Kg\n",
+ "H2=3074.0 #KJ/Kg\n",
+ "H1=3278.0 #KJ/Kg\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Mass balance on Water,\")\n",
+ "print(\"m3+m1=m2\")\n",
+ "print(\"Energy balance,\")\n",
+ "print(\"m3*H3+m1*H1=m2*H2\")\n",
+ "A=([[1,-1],[H2,-H1]])\n",
+ "b=([[m3],[m3*H3]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "#here we solved two linear equations simultaneously.\n",
+ "m2=C[0,0]\n",
+ "m1=C[1,0]\n",
+ "print '%s %.3f' %(\" Input flowrate,m1 (Kg/h) = \",m1)\n",
+ "print '%s %.3f' %(\" \\n Output flowrate, m2 (Kg/h) = \",m2)\n",
+ "print(\"From tables,Vdot=3.11 m^3/Kg\")\n",
+ "Vdot=3.11\n",
+ "print '%s %.3f' %(\" Volumetric input flowrate (m^3/h) = \",m1*Vdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Mass balance on Water,\n",
+ "m3+m1=m2\n",
+ "Energy balance,\n",
+ "m3*H3+m1*H1=m2*H2\n",
+ " Input flowrate,m1 (Kg/h) = 2243.627\n",
+ " \n",
+ " Output flowrate, m2 (Kg/h) = 3393.627\n",
+ "From tables,Vdot=3.11 m^3/Kg\n",
+ " Volumetric input flowrate (m^3/h) = 6977.681\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 12,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-1, page no. 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "Vdot=20.0 #L/min\n",
+ "P2=1.01325*100000. #atm\n",
+ "ID1=0.5 #cm\n",
+ "ID2=1.0 #cm\n",
+ "g=9.81 #m/s^2\n",
+ "deltaZ=50.0 #m\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "u1=Vdot*math.pow(10,4) /(math.pow(10,3) *60*math.pi*math.pow(ID1/(2),2))\n",
+ "u2=Vdot*math.pow(10,4) /(math.pow(10,3) *60*math.pi*math.pow(ID2/(2),2))\n",
+ "deltaP=-((u2*u2-u1*u1)/2 +g*deltaZ)*1000.\n",
+ "P1=P2-deltaP\n",
+ "print '%s %.3f' %(\" \\n P1 (Pa) = \",P1)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " P1 (Pa) = 456730.088\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 13,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-2, page no. 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "deltaZ= -2.5 #ft\n",
+ "u1=0.0\n",
+ "D=50.0 #lbm/ft^3\n",
+ "F=0.80 #ft.lbf/lbm\n",
+ "V=5.0 #gal\n",
+ "g=32.174 #ft/s^2\n",
+ "ID=0.25 #in\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "u2=math.sqrt(2*32.174*(-F-g*deltaZ/32.174))\n",
+ "Vdot=u2*math.pi*math.pow(ID/(2),2) /144.\n",
+ "t=V*0.1337/(Vdot*60.)\n",
+ "print '%s %.3f' %(\"Total time taken (min) = \",t)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Total time taken (min) = 3.125\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-3, page no. 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "Ws=1000000. #N.m/s\n",
+ "deltaP= -83.*1000. #N/m^2\n",
+ "g=9.81 #m/s^2\n",
+ "deltaZ= -103 #m\n",
+ "D=1000. #kg/m^3\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "mdot= -Ws/(deltaP/D + g*deltaZ)\n",
+ "print'%s %.3f' %(\" \\n Water flow rate (kg/s) = \",mdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Water flow rate (kg/s) = 914.553\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter8.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter8.ipynb
new file mode 100755
index 00000000..34aa53f2
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter8.ipynb
@@ -0,0 +1,1053 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:96d9d4935cd6f3c8e019e8d452a9980bb4f36e96fb606a03b9b38b11670ead8c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Balances on Nonreactive Processes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1-1, page no. 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "basis=100. #mol/s\n",
+ "ninAcv=66.9 #mol/s\n",
+ "noutAcv=3.35 #mol/s\n",
+ "noutAcl=63.55 #mol/s\n",
+ "ninN2=33.1 #mol/s\n",
+ "noutN2=ninN2\n",
+ "HinAcv=35.7 #Kj/mol\n",
+ "HoutAcv=32.0 #Kj/mol\n",
+ "HinN2=1.16 #Kj/mol\n",
+ "HoutN2= -0.10 #Kj/mol\n",
+ "#Calculations and printing:\n",
+ "deltaH=noutAcv*HoutAcv+ noutN2*HoutN2-ninN2*HinN2-ninAcv*HinAcv\n",
+ "Q=deltaH\n",
+ "print '%s %.2f' %(\"Heat transferred from condenser to achieve required cooling and condensation at the rate of (kW) \",Q)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred from condenser to achieve required cooling and condensation at the rate of (kW) -2322.84\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3-1, page no. 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "mass=200.0 #kg\n",
+ "Ti=20.0 #C\n",
+ "Tf=150.0 #C\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "def Cv(T):\n",
+ " Cv=0.855+ T*9.42*math.pow(10,-4)\n",
+ " return Cv\n",
+ "\n",
+ "Ucap, err= scipy.integrate.quad(Cv,Ti,Tf) #integrate.quad is an inbult function used for definite integration\n",
+ "Q=mass*Ucap\n",
+ "print '%s %.3f' %(\"Heat Required (KJ) = \",Q)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ "Heat Required (KJ) = 24311.820\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3-2, page no. 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "T1=20.0 #C\n",
+ "T2=100.0 #C\n",
+ "T3=90.0 #C\n",
+ "T4=30.0 #C\n",
+ "P=3.0 #bar\n",
+ "V=5.0 #L\n",
+ "R=0.08314 #L.bar/mol.K\n",
+ "T=363.0 #K\n",
+ "ndot=100.0 #mol/min\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "print(\"part 1\")\n",
+ "def fun1(T):\n",
+ " fun1=0.02900+ T*0.2199*math.pow(10,-5) + math.pow(T,2) * 0.5723 *math.pow(10,-8) - math.pow(T,3) * 2.871 * math.pow(10,-12)\n",
+ " return fun1\n",
+ "\n",
+ "deltaH, err=scipy.integrate.quad(fun1,T1,T2) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "Qdot=ndot*deltaH\n",
+ "print '%s %.3f' %(\"Heat Transferred (KJ/min) = \",Qdot)\n",
+ "print(\"part2\")\n",
+ "def fun2(T):\n",
+ " fun2=0.02900+ T*0.2199*math.pow(10,-5) + math.pow(T,2) * 0.5723 *math.pow(10,-8) - math.pow(T,3) * 2.871 * math.pow(10,-12)-8.14* math.pow(10,-3)\n",
+ " return fun2\n",
+ "\n",
+ "deltaU, err2=scipy.integrate.quad(fun2,T3,T4) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "n=P*V/(R*T)\n",
+ "Q=n*deltaU\n",
+ "print '%s %.3f' %(\"Heat transferred (KJ) = \",Q)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ "part 1\n",
+ "Heat Transferred (KJ/min) = 233.238\n",
+ "part2\n",
+ "Heat transferred (KJ) = -0.627\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3-3, page no. 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "T1=430.0 #C\n",
+ "T2=100.0 #C\n",
+ "ndot=15.0 #Kmol/min\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "def fun(T):\n",
+ " fun=0.02894 + T* 0.4147 *math.pow(10,-5) + math.pow(T,2) * 0.3191 * math.pow(10,-8) - math.pow(T,3) * 1.965 * math.pow(10,-12)\n",
+ " return fun\n",
+ "\n",
+ "deltaH, err=scipy.integrate.quad(fun,T1,T2) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "Qdot=ndot*deltaH*math.pow(10,3) /60.\n",
+ "print '%s %.3f' %(\" \\n Rate of heat removal (KW) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ " \n",
+ " Rate of heat removal (KW) = -2494.904\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3-4, page no. 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "x=0.6\n",
+ "T1=0.0\n",
+ "T2=400.0\n",
+ "ndot=150.0 #mol/h\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "def fun1(T):\n",
+ " fun1=0.04937 + T*13.92*math.pow(10,-5) - math.pow(T,2) *5.816*math.pow(10,-8) + math.pow(T,3) *7.280 * math.pow(10,-12)\n",
+ " return fun1\n",
+ "\n",
+ "def fun2(T):\n",
+ " fun2=0.06803 +T*22.59*math.pow(10,-5) - math.pow(T,2) *13.11*math.pow(10,-8) + math.pow(T,3) *31.71 * math.pow(10,-12)\n",
+ " return fun2\n",
+ "\n",
+ "def fun(T):\n",
+ " fun=x*fun1(T)+ (1-x)*fun2(T)\n",
+ " return fun\n",
+ "\n",
+ "deltaH , err=scipy.integrate.quad(fun,T1,T2) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "print '%s %.3f' %(\" \\n Heat capacity of Mixture (KJ/mol) = \",deltaH)\n",
+ "Qdot=ndot*deltaH\n",
+ "print '%s %.3f' %(\" \\n Heat Required (KJ/h) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ " \n",
+ " Heat capacity of Mixture (KJ/mol) = 34.890\n",
+ " \n",
+ " Heat Required (KJ/h) = 5233.495\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3-5, page no. 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "x=0.1 #CH4\n",
+ "T1=20.0\n",
+ "T2=300.0\n",
+ "Vdot=2000.0 #L/min\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "ndot=Vdot/22.4\n",
+ "def fun(T):\n",
+ " fun=0.03431 + T*5.469*math.pow(10,-5) + math.pow(T,2) *0.3661*math.pow(10,-8) + math.pow(T,3) *11*math.pow(10,-12)\n",
+ " return fun\n",
+ "\n",
+ "H1 ,err=scipy.integrate.quad(fun,T1,T2) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "print '%s %.3f' %(\"H1 (Kj/mol) = \",H1)\n",
+ "print(\"From Tables H2= -0.15 Kj/mol , H3=8.17 Kj/mol\")\n",
+ "H2= -0.15\n",
+ "H3=8.17\n",
+ "Qdot=(ndot*x*H1+ ndot*(1-x)*(H3-H2))/60.\n",
+ "print '%s %.3f' %(\"Heat Input (KW) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ "H1 (Kj/mol) = 12.112\n",
+ "From Tables H2= -0.15 Kj/mol , H3=8.17 Kj/mol\n",
+ "Heat Input (KW) = 12.945\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4-1, page no. 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "mdot=1500.0 #g/min\n",
+ "M=32.0 #g/mol\n",
+ "deltaHv=35.3 #Kj/mol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \\n \")\n",
+ "Qdot=mdot*deltaHv/(M*60.)\n",
+ "print '%s %.3f' %(\"Rate of Heat transfer (KW) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook \n",
+ " \n",
+ "Rate of Heat transfer (KW) = 27.578\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4-2, page no. 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "deltaHv=28.85 #Kj/mol at 69 C\n",
+ "T1=25.0 #C\n",
+ "T2=69.0 #C\n",
+ "Cp=0.2163 #Kj/mol C\n",
+ "V=1.0 #L\n",
+ "P=7.0 #bar\n",
+ "D=0.659 #KG/L\n",
+ "M=86.17 #Kg\n",
+ "ndot=100.0 #mol/h\n",
+ "T3=300.0 #C\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"We have deltaHv at 69C hence We follow path ADG\")\n",
+ "deltaHA=Cp*(T2-T1) + V*(1.013-P)*M/(D*math.pow(10,4))\n",
+ "print '%s %.3f' %(\" \\n deltaHA (Kj/mol) =\",deltaHA)\n",
+ "deltaHD=deltaHv\n",
+ "print '%s %.3f' %(\" \\n deltaHD (Kj/Kg) =\",deltaHD)\n",
+ "def fun1(T):\n",
+ " fun1=0.13744 + T*40.85*math.pow(10,-5) - math.pow(T,2) *23.92*math.pow(10,-8) + math.pow(T,3) *57.66*math.pow(10,-12)\n",
+ " return fun1\n",
+ "\n",
+ "deltaHG, err=scipy.integrate.quad(fun1,T2,T3) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "print '%s %.3f' %(\" \\n deltaHG (KJ/mol) = \",deltaHG)\n",
+ "Qdot=ndot*(deltaHA+deltaHD+deltaHG)/3600\n",
+ "print '%s %.3f' %(\" \\n rate of Heat supply (KJ/mol) = \",Qdot)\n",
+ "print(\" \\n In this problem we neglected V*deltaP as it is negligible \")\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "We have deltaHv at 69C hence We follow path ADG\n",
+ " \n",
+ " deltaHA (Kj/mol) = 9.439\n",
+ " \n",
+ " deltaHD (Kj/Kg) = 28.850\n",
+ " \n",
+ " deltaHG (KJ/mol) = 47.149\n",
+ " \n",
+ " rate of Heat supply (KJ/mol) = 2.373\n",
+ " \n",
+ " In this problem we neglected V*deltaP as it is negligible \n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4-3, page no. 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "T1=337.9 #K\n",
+ "T2=473.0 #K\n",
+ "Tc=513.2 #K\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"using Trouton rule,\")\n",
+ "deltaHvT1=0.109*T1\n",
+ "print(\"In this case, trouton rule gives a better estimate\")\n",
+ "print(\"using Watson correction\")\n",
+ "deltaHvT2=36.8*math.pow(((Tc-T2)/(Tc-T1)),0.38)\n",
+ "print '%s %.3f' %(\"Estimated value using Trouton rule (Kj/mol) = \",deltaHvT1)\n",
+ "print '%s %.3f' %(\" \\n Estimated value using watson correction (Kj/mol) = \",deltaHvT2)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "using Trouton rule,\n",
+ "In this case, trouton rule gives a better estimate\n",
+ "using Watson correction\n",
+ "Estimated value using Trouton rule (Kj/mol) = 36.831\n",
+ " \n",
+ " Estimated value using watson correction (Kj/mol) = 21.029\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 11,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4-4, page no. 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "basis=1.0 #mol feed\n",
+ "x=0.684 #mole fraction Of B\n",
+ "y=0.4\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "A=([[1, 1],[x ,y]])\n",
+ "b=([[basis],[basis/2]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "#Here We solved two linear equations simultaneously\n",
+ "nV=C[0,0]\n",
+ "nL=C[1,0]\n",
+ "H1=5.332\n",
+ "H2=6.340\n",
+ "H3=37.52\n",
+ "H4=42.93\n",
+ "Q=nV*x*H1 + nV*(1-x)*H2 + nL*y*H3 + nL*(1-y)*H4\n",
+ "print '%s %.3f' %(\" \\n Heat transferred (KJ) = \",Q)\n",
+ "print(\"The answer for this problem in Text is wrong\")\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Heat transferred (KJ) = 28.401\n",
+ "The answer for this problem in Text is wrong\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4-6, page no. 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "basis=1. #lbm dry air\n",
+ "Tin=80. #F Inlet temperature\n",
+ "Tout=51. #F Outlet temperature\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations and printing:\n",
+ "print(\"For 80F and 80 percent RH, ha=0.018 lbm H20/lbm DA H1=38.8 Btu/lbm DA\")\n",
+ "ha=0.018 #lbm H20/lbm DA\n",
+ "H1=38.8 #Btu/lbm DA\n",
+ "m1=basis*ha\n",
+ "print(\"\\n For 51F and saturated, ha=0.0079 lbm H20/lbm DA H2=20.9 Btu/lbm DA\")\n",
+ "ha2=0.0079 #lbm H20/lbm DA\n",
+ "H2=20.9 #Btu/lbm DA\n",
+ "m2=basis*ha2\n",
+ "print(\"\\n Balance on H2O\")\n",
+ "m3=m1-m2\n",
+ "Fraction=m3/m1\n",
+ "print '%s %.3f' %(\"\\n Fraction H2O condensed = \",Fraction)\n",
+ "H3=basis*(Tout-32.)\n",
+ "Q=basis*H2+m3*H3-basis*H1\n",
+ "print(\"\\n From psychrometric chart, Vh=13.0 ft^3/lbm DA\")\n",
+ "Vbasis=basis*13.0\n",
+ "Qdot=Q*1000./Vbasis\n",
+ "print '%s %.2f' %(\"Rate at which heat must be removed (Btu/min) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For 80F and 80 percent RH, ha=0.018 lbm H20/lbm DA H1=38.8 Btu/lbm DA\n",
+ "\n",
+ " For 51F and saturated, ha=0.0079 lbm H20/lbm DA H2=20.9 Btu/lbm DA\n",
+ "\n",
+ " Balance on H2O\n",
+ "\n",
+ " Fraction H2O condensed = 0.561\n",
+ "\n",
+ " From psychrometric chart, Vh=13.0 ft^3/lbm DA\n",
+ "Rate at which heat must be removed (Btu/min) = -1362.16\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 13,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5-1, page no. 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "M1=35.6 #g/mol\n",
+ "M2=18.0 #g/mol\n",
+ "x=0.2\n",
+ "mdot=1000.0 #kg/h\n",
+ "T1=25.0 #C\n",
+ "T2=100.0 #C\n",
+ "T3=40.0 #C\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "nHCl=mdot*x*math.pow(10,3) /M1\n",
+ "nH2O=mdot*(1-x)*math.pow(10,3) /M2\n",
+ "def fun(T):\n",
+ " fun=29.13*math.pow(10,-3) - T*0.1341*math.pow(10,-5) +math.pow(T,2) *0.9715*math.pow(10,-8) - math.pow(T,3) *4.335*math.pow(10,-12)\n",
+ " return fun\n",
+ "\n",
+ "H1, err=scipy.integrate.quad(fun,T1,T2) #scipy.integrate.quad is an inbult function used for definite integration\n",
+ "r=nH2O/nHCl\n",
+ "print(\"From table B.11, deltaHa= -67.4 Kj/mol HCl\")\n",
+ "deltaHa= -67.4\n",
+ "y=nHCl/(nHCl+nH2O)\n",
+ "Cp=0.73*mdot*4.184/nHCl\n",
+ "deltaHb=Cp*(T3-T1)\n",
+ "H2=deltaHa+deltaHb\n",
+ "Qdot=nHCl*(H2-H1)\n",
+ "print '%s %.3E' %(\"Heat (kJ/h) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "From table B.11, deltaHa= -67.4 Kj/mol HCl\n",
+ "Heat (kJ/h) = -3.451E+05\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5-2, page no. 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "x=0.05\n",
+ "y=0.4\n",
+ "mdot=1000.0 #lbm/h\n",
+ "Hf=10.0 #Btu/lbm\n",
+ "Hl= -17 #Btu/lbm\n",
+ "Hv=1138.0 #Btu/lbm\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"\\n sulphuric acid balance\")\n",
+ "m2=x*mdot/y\n",
+ "print(\"\\n Total Mass balance\")\n",
+ "m1=mdot-m2\n",
+ "Qdot=m1*Hv+m2*Hl-mdot*Hf\n",
+ "print '%s %.3f' %(\" Rate of Heat transfer (Btu/h) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "\n",
+ " sulphuric acid balance\n",
+ "\n",
+ " Total Mass balance\n",
+ " Rate of Heat transfer (Btu/h) = 983625.000\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5-5, page no. 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "basis=100.0 #lbm/h\n",
+ "Hv=728.0 #Btu/lbm\n",
+ "Hl=45.0 #Btu/lbm\n",
+ "HF=100.0 #Btu/lbm\n",
+ "T=120.0 #F\n",
+ "xF=0.30\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"From figure 8.5-2, \")\n",
+ "xL=0.185\n",
+ "xV=0.89\n",
+ "mL=basis*((xV-xF)/(xV-xL))\n",
+ "mV=basis-mL\n",
+ "Qdot=mV*Hv + mL*Hl - basis*HF\n",
+ "print '%s %.3f' %(\"Rate of heat transfer (Btu/h) =\",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "From figure 8.5-2, \n",
+ "Rate of heat transfer (Btu/h) = 5641.135\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 16,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/Chapter9.ipynb b/Elementary_Principles_of_Chemical_Processes/Chapter9.ipynb
new file mode 100755
index 00000000..230963f2
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/Chapter9.ipynb
@@ -0,0 +1,822 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e681b00ee14cb4ba49bab5814ba58d8e293c97db9c72b39fdd9bbdd0d2223049"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Balances on Reactive Processes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-1, page no. 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "ndot=2400.0 #mol/s\n",
+ "Hr1= -2878 #Kj/mol\n",
+ "HvWater=44.0 #Kj/mol\n",
+ "HvButane=19.2 #Kj/mol\n",
+ "\n",
+ "#Calculations and print '%s %.3f' %ing :\n",
+ "\n",
+ "print (\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print (\"Part 1\")\n",
+ "E1= ndot/4\n",
+ "deltaH1=E1*Hr1\n",
+ "print '%s %.3E' %(\"enthalpy change (KJ/s) = \",deltaH1)\n",
+ "print (\"part2\")\n",
+ "Hr2=2*Hr1\n",
+ "E2=ndot/8\n",
+ "deltaH2=E2*Hr2\n",
+ "print '%s %.3E' %(\"Enthalpy change (kJ/s) = \",deltaH2)\n",
+ "print (\"part 3\")\n",
+ "Hr3=Hr1+5*HvWater+HvButane\n",
+ "deltaH3=E1*Hr3\n",
+ "print '%s %.3E' %(\"Enthalpy change (kJ/s) = \",deltaH3)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Part 1\n",
+ "enthalpy change (KJ/s) = -1.727E+06\n",
+ "part2\n",
+ "Enthalpy change (kJ/s) = -1.727E+06\n",
+ "part 3\n",
+ "Enthalpy change (kJ/s) = -1.583E+06\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1-2, page no. 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "deltaHr= -420.8 #kj/mol\n",
+ "R=8.314\n",
+ "T=298.0 #K\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"From reaction, only gaseous are counted\")\n",
+ "left=1+2\n",
+ "right=1+1\n",
+ "deltaUr=deltaHr-R*T*(right-left)/math.pow(10,3)\n",
+ "print '%s %.3f' %(\"deltaUr (KJ/mol) = \",deltaUr)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "From reaction, only gaseous are counted\n",
+ "deltaUr (KJ/mol) = -418.322\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3-1, page no. 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "HCO2= -393.5 #KJ/mol\n",
+ "HH2O= -285.84 #KJ/mol\n",
+ "HC5H12= -173. #KJ/mol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Hr=5*HCO2+6*HH2O-HC5H12\n",
+ "print '%s %.3f' %(\" \\n Heat of the rxn (KJ/mol) = \",Hr)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Heat of the rxn (KJ/mol) = -3509.540\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4-1, page no. 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "Hethane= -1559.9 #Kj/mol\n",
+ "Hethene= -1411 #Kj/mol\n",
+ "Hhydrogen= -285.84 #Kj/mol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "Hr=Hethane-Hethene-Hhydrogen\n",
+ "print '%s %.3f' %(\" \\n Heat of the rxn (KJ/mol) = \",Hr)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Heat of the rxn (KJ/mol) = 136.940\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5-1, page no. 453"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "nNH3=100.0 #mol/s\n",
+ "nO2in=200.0 #mol/s\n",
+ "H1=8.470 #Kj/mol\n",
+ "H3=9.570 #Kj/mol\n",
+ "T1=25.0\n",
+ "T2=300.0\n",
+ "Hr= -904.7 #Kj/mol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "def fun(T):\n",
+ " fun=29.50*math.pow(10,-3)+ T*0.8188*math.pow(10,-5) - math.pow(T,2) * 0.2925 *math.pow(10,-8) + math.pow(T,3) * 0.3652 * math.pow(10,-12)\n",
+ " return fun\n",
+ "\n",
+ "H2, err=scipy.integrate.quad(fun,T1,T2) #scipy.integrate.quad is an inbuilt function which can calculate definite integrals\n",
+ "E=nNH3/4.\n",
+ "nO2out=nO2in-nNH3*5./4.\n",
+ "nNO=nNH3\n",
+ "nH2O=nNH3*6./4.\n",
+ "deltaH=E*Hr+(nO2out*H1+nNO*H2+nH2O*H3)\n",
+ "Qdot=deltaH\n",
+ "print '%s %.3f' %(\" \\n Heat Transferred (kW) = \",Qdot)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Heat Transferred (kW) = -19701.467\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5-2, page no. 454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "NinMethane=100.0 #mol\n",
+ "NinOxygen=100.0 #mol\n",
+ "NinNitrogen=376.0 #mol\n",
+ "NoutMethane=60.0 #mol\n",
+ "NoutOxygen=50.0 #mol\n",
+ "NoutNitrogen=376.0 #mol\n",
+ "NoutFormal=30.0 #mol\n",
+ "NoutCarbon=10.0 #mol\n",
+ "NoutWater=50.0 #mol\n",
+ "H1= -74.85 #Kj/mol\n",
+ "H2= 2.235 #Kj/mol\n",
+ "H3= 2.187 #Kj/mol\n",
+ "H5=3.758#Kj/mol\n",
+ "H6=3.655 #Kj/mol\n",
+ "H8= -393.5+4.75 #Kj/mol\n",
+ "H9= -241.83+4.27 #Kj/mol\n",
+ "T1=25.0 #C\n",
+ "T2=150.0 #C\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "def fun1(T):\n",
+ " fun1=34.31*math.pow(10,-3)+ T*5.469*math.pow(10,-5) + math.pow(T,2) * 0.3661 *math.pow(10,-8) - math.pow(T,3) * 11 * math.pow(10,-12)\n",
+ " return fun1\n",
+ "\n",
+ "HoutMethane, err=scipy.integrate.quad(fun1,T1,T2)\n",
+ "H4= -74.85 + HoutMethane\n",
+ "def fun2(T):\n",
+ " fun2=34.28*math.pow(10,-3)+ T*4.268*math.pow(10,-5) - math.pow(T,3) * 8.694 * math.pow(10,-12)\n",
+ " return fun2\n",
+ "\n",
+ "HoutFormal, err2=scipy.integrate.quad(fun2,T1,T2) #scipy.integrate.quadis an inbuilt function which can calculate definite integrals\n",
+ "H7= -115.90+ HoutFormal\n",
+ "deltaH=NoutWater*H9+NoutCarbon*H8+NoutFormal*H7+NoutNitrogen*H6+NoutOxygen*H5+NoutMethane*H4-NinNitrogen*H3-NinOxygen*H2-NinMethane*H1\n",
+ "Q=deltaH\n",
+ "print '%s %.3f' %(\" \\n Q (KJ) = \",Q)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " Q (KJ) = -15296.233\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 6,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5-4, page no. 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "basis=150.0 #mol/s\n",
+ "x=0.9\n",
+ "HinEthanol= -212.19\n",
+ "HinEthanone= -147.07\n",
+ "HoutEthanol= -216.81\n",
+ "HoutEthanone= -150.9\n",
+ "HoutHydrogen=6.595\n",
+ "NinEthanol=135.0\n",
+ "NinEthanone=15.0\n",
+ "Q=2440.0 #KW\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Carbon Balance\")\n",
+ "print(\"basis*x *2 + basis* (1-x) *2=2 n1+2 n2\")\n",
+ "print(\"Hydrogen Balance\")\n",
+ "print(\"basis * x *6 + basis * (1-x)*4 = 6 n1+4 n2+2 n3\")\n",
+ "print(\"Energy Balance\")\n",
+ "print(\"Q= HoutEthanol n1 HoutEthanone n2 + HoutHydrogen n3 -NinEthanol * HinEthanol -NinEthanone* HinEthanone\")\n",
+ "A=([[1, 1, 0],[3, 2, 1],[216.81, 150.9, -6.595]])\n",
+ "b=([[150],[435],[28412]])\n",
+ "C=numpy.dot(linalg.inv(A),b)\n",
+ "n1=C[0,0]\n",
+ "print '%s %.3f' %(\" \\n n1 (mol Ethanol/s) = \",n1)\n",
+ "n2=C[1,0]\n",
+ "print '%s %.3f' %(\" \\n n2 (mol Ethanone/s) = \",n2)\n",
+ "n3=C[2,0]\n",
+ "print '%s %.3f' %(\" \\n n3 (mol Hydrogen/s) = \",n3)\n",
+ "print(\"The solutions in the Text are Wrong\")\n",
+ "fraction=(NinEthanol-n1)/NinEthanol\n",
+ "print '%s %.3f' %(\"Fractional conversion of Ethanol = \",fraction)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Carbon Balance\n",
+ "basis*x *2 + basis* (1-x) *2=2 n1+2 n2\n",
+ "Hydrogen Balance\n",
+ "basis * x *6 + basis * (1-x)*4 = 6 n1+4 n2+2 n3\n",
+ "Energy Balance\n",
+ "Q= HoutEthanol n1 HoutEthanone n2 + HoutHydrogen n3 -NinEthanol * HinEthanol -NinEthanone* HinEthanone\n",
+ " \n",
+ " n1 (mol Ethanol/s) = 91.957\n",
+ " \n",
+ " n2 (mol Ethanone/s) = 58.043\n",
+ " \n",
+ " n3 (mol Hydrogen/s) = 43.043\n",
+ "The solutions in the Text are Wrong\n",
+ "Fractional conversion of Ethanol = 0.319\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5-5, page no. 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "print(\"from tables,\")\n",
+ "HfAcid= -1294. #Kj/mol\n",
+ "HfBase= -469.1 #Kj/mol\n",
+ "HfSalt= -1974. #Kj/mol \n",
+ "HfWater= -285.8 #Kj/mol\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"part 1\")\n",
+ "Hr=HfSalt+3*HfWater-HfAcid-3*HfBase\n",
+ "print '%s %.3f' %(\"Hr of the rxn (KJ/mol) = \",Hr)\n",
+ "print(\"part 2\")\n",
+ "deltaH=Hr*5./3.\n",
+ "print '%s %.3f' %(\"deltaH (KJ) = \",deltaH)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "from tables,\n",
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "part 1\n",
+ "Hr of the rxn (KJ/mol) = -130.100\n",
+ "part 2\n",
+ "deltaH (KJ) = -216.833\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5-6, page no. 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "x=0.1\n",
+ "y=0.2\n",
+ "MAcid=98.1\n",
+ "MS=32.0\n",
+ "MSalt=142.0\n",
+ "MBase=40.0\n",
+ "MWater=18.0\n",
+ "MNa=46.0\n",
+ "basis=1000.0 #g\n",
+ "T2=35.0\n",
+ "T1=25.0\n",
+ "T3=40.0\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "print(\"Using S balance, \")\n",
+ "m2=basis*x*MS*MSalt/(MAcid*MS)\n",
+ "print '%s %.3f' %(\" \\n m2 (g Na2SO4) = \",m2)\n",
+ "print(\"Using Na balance, \")\n",
+ "m1=2*MNa*m2*MBase/(y*MNa*MSalt)\n",
+ "print '%s %.3f' %(\" \\n m1 (g NaOH) = \",m1)\n",
+ "print(\"Total mass balance, \")\n",
+ "m3=basis+m1-m2\n",
+ "print '%s %.3f' %(\" \\n m3 (g H2O) = \",m3)\n",
+ "print '%s %.3f' %(\" \\n Mass of product solution = \",m2+m3)\n",
+ "m=m2+m3\n",
+ "Water=m2*2/MSalt\n",
+ "print '%s %.3f' %(\" \\n Water Formed in the reaction (mol H2O) = \",Water)\n",
+ "print(\"H2SO4(aq):\")\n",
+ "a1=basis*(1-x)/MWater\n",
+ "b1=basis*x/MAcid\n",
+ "rAcid=a1/b1\n",
+ "print '%s %.3f' %(\" \\n rAcid (mol Water/mol Acid) = \",rAcid)\n",
+ "print(\"NaOH(aq):\")\n",
+ "a2=m1*(1-y)/MWater\n",
+ "b2=m1*y/MBase\n",
+ "rBase=a2/b2\n",
+ "print '%s %.3f' %(\" \\n rBase (mol Water/mol Base) = \",rBase)\n",
+ "print(\"Na2SO4(aq):\")\n",
+ "a3=m3/MWater\n",
+ "b3=m2/MSalt\n",
+ "rSalt=a3/b3\n",
+ "print '%s %.3f' %(\" \\n rSalt (mol Water/mol Salt) =\",rSalt)\n",
+ "E=b1\n",
+ "print '%s %.3f' %(\" \\n Extent of reaction (mol) = \",E)\n",
+ "nHAcid=basis*3.85*(T3-T1)/1000\n",
+ "nHSalt=m*4.184*(T2-T1)/1000\n",
+ "nHBase=0\n",
+ "HfSalt= -1384\n",
+ "HfAcid= -884.6\n",
+ "HfBase= -468.1\n",
+ "HfWater= -285.84\n",
+ "deltaHr=HfSalt+ 2*HfWater - HfAcid - 2*HfBase\n",
+ "print '%s %.3f' %(\" \\n Entahlpy change in the rxn (KJ/mol) = \",deltaHr)\n",
+ "Q=E*deltaHr + (nHSalt-nHAcid-nHBase)\n",
+ "print '%s %.3f' %(\" \\n Q of the rxn (KJ) = \",Q)\n",
+ "print(\"The answer in the Text is wrong.\")\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ "Using S balance, \n",
+ " \n",
+ " m2 (g Na2SO4) = 144.750\n",
+ "Using Na balance, \n",
+ " \n",
+ " m1 (g NaOH) = 407.747\n",
+ "Total mass balance, \n",
+ " \n",
+ " m3 (g H2O) = 1262.997\n",
+ " \n",
+ " Mass of product solution = 1407.747\n",
+ " \n",
+ " Water Formed in the reaction (mol H2O) = 2.039\n",
+ "H2SO4(aq):\n",
+ " \n",
+ " rAcid (mol Water/mol Acid) = 49.050\n",
+ "NaOH(aq):\n",
+ " \n",
+ " rBase (mol Water/mol Base) = 8.889\n",
+ "Na2SO4(aq):\n",
+ " \n",
+ " rSalt (mol Water/mol Salt) = 68.833\n",
+ " \n",
+ " Extent of reaction (mol) = 1.019\n",
+ " \n",
+ " Entahlpy change in the rxn (KJ/mol) = -134.880\n",
+ " \n",
+ " Q of the rxn (KJ) = -136.342\n",
+ "The answer in the Text is wrong.\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6-1, page no. 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "\n",
+ "x=0.85\n",
+ "H1= 802 #KJ/mol\n",
+ "H2= 1428 #kJ/mol\n",
+ "M1=16.0\n",
+ "M2=30.0\n",
+ "\n",
+ "#Calculations and printing :\n",
+ "\n",
+ "print(\" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\")\n",
+ "y1=x*16\n",
+ "y2=(1-x)*30\n",
+ "xCH4=y1/(y1+y2)\n",
+ "HHVMethane=(H1+ 2*44.013)/M1\n",
+ "HHVEthane=(H2+ 3*44.013)/M2\n",
+ "HHV=xCH4*HHVMethane + (1-xCH4)*HHVEthane\n",
+ "print '%s %.3f' %(\" \\n HHV of Fuel (KJ/g) = \",HHV)\n",
+ "raw_input('press enter key to exit')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " All the values in the textbook are Approximated hence the values in this code differ from those of Textbook\n",
+ " \n",
+ " HHV of Fuel (KJ/g) = 54.725\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 10,
+ "text": [
+ "''"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/README.txt b/Elementary_Principles_of_Chemical_Processes/README.txt
new file mode 100755
index 00000000..5cf37f06
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Chaitanya Potti
+Course: btech
+College/Institute/Organization: IITB
+Department/Designation: Chemical engineering
+Book Title: Elementary Principles of Chemical Processes
+Author: Richard M. Felder & Ronald W. Rousseau
+Publisher: John Wiley & Sons Inc
+Year of publication: 2005
+Isbn: 047168757X
+Edition: 3rd \ No newline at end of file
diff --git a/Elementary_Principles_of_Chemical_Processes/screenshots/dev.png b/Elementary_Principles_of_Chemical_Processes/screenshots/dev.png
new file mode 100755
index 00000000..917c800c
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/screenshots/dev.png
Binary files differ
diff --git a/Elementary_Principles_of_Chemical_Processes/screenshots/mbtT.png b/Elementary_Principles_of_Chemical_Processes/screenshots/mbtT.png
new file mode 100755
index 00000000..5bf3b94f
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/screenshots/mbtT.png
Binary files differ
diff --git a/Elementary_Principles_of_Chemical_Processes/screenshots/vbyl.png b/Elementary_Principles_of_Chemical_Processes/screenshots/vbyl.png
new file mode 100755
index 00000000..dc004dbf
--- /dev/null
+++ b/Elementary_Principles_of_Chemical_Processes/screenshots/vbyl.png
Binary files differ