summaryrefslogtreecommitdiff
path: root/A_Textbook_Of_Chemical_Engineering_Thermodynamics
diff options
context:
space:
mode:
authorJovina Dsouza2014-06-18 12:43:07 +0530
committerJovina Dsouza2014-06-18 12:43:07 +0530
commit206d0358703aa05d5d7315900fe1d054c2817ddc (patch)
treef2403e29f3aded0caf7a2434ea50dd507f6545e2 /A_Textbook_Of_Chemical_Engineering_Thermodynamics
parentc6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff)
downloadPython-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip
adding book
Diffstat (limited to 'A_Textbook_Of_Chemical_Engineering_Thermodynamics')
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt10
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb378
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb710
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb724
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb960
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb1393
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb787
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb888
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb1489
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb1102
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.pngbin0 -> 26170 bytes
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.pngbin0 -> 20908 bytes
-rw-r--r--A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.pngbin0 -> 25062 bytes
13 files changed, 8441 insertions, 0 deletions
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt
new file mode 100644
index 00000000..38541c7e
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Giriraj Dodiya
+Course: mca
+College/Institute/Organization: Freelancer
+Department/Designation: Freelancer
+Book Title: A Textbook Of Chemical Engineering Thermodynamics
+Author: K. V. Narayanan
+Publisher: Prentice Hall Of India, New Delhi
+Year of publication: 2011
+Isbn: 978-81-203-1732-1
+Edition: 15th \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb
new file mode 100644
index 00000000..e56a9323
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch1.ipynb
@@ -0,0 +1,378 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Introduction and Basic Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page no:5 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#To find mans mass and weight on earth\n",
+ "\n",
+ "# Variables\n",
+ "F = 300; \t\t\t #[N]\n",
+ "g_local = 4.5; \t\t\t#local gravitational acceleration[m/s**2]\n",
+ "g_earth = 9.81; \t\t#earth's gravitational acceleration[m/s**2]\n",
+ "\n",
+ "# Calculations\n",
+ "#To find man's mass and weight on earth\n",
+ "m = F/g_local;\t\t\t#mass of man[kg]\n",
+ "w = m*g_earth; \t\t\t# weight of man on earth[N]\n",
+ "\n",
+ "# Results\n",
+ "print 'Mass of man is %f kg'%m\n",
+ "print '\\nWeight of man on earth is %f N'%w\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of man is 66.666667 kg\n",
+ "\n",
+ "Weight of man on earth is 654.000000 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page no:6 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find height of manometer fluid\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1.15*10**5; \t\t\t#measured pressure[N/m**2]\n",
+ "p2 = 1.01325*10**5; \t\t#atmospheric pressure[N/m**2]\n",
+ "rho = 2.95*10**3; \t\t\t#specific gravity of fluid\n",
+ "g = 9.8067\n",
+ "\n",
+ "# Calculations\n",
+ "#To find height of manometer fluid\n",
+ "p = p1-p2; \t \t\t#difference in pressure\n",
+ "h = p/(rho*g); \t\t\t#height of manometer fluid[m]\n",
+ "\n",
+ "# Results\n",
+ "print 'Height of manometer fluid is %f m'%h\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height of manometer fluid is 0.472697 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page no:8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find height from ground and Kinetic Energy\n",
+ "\n",
+ "# Variables\n",
+ "PE = 1.5*10**3; \t#potential energy[J]\n",
+ "m = 10; \t\t\t#mass in kg\n",
+ "u = 50; \t\t\t# velocity in m/s\n",
+ "g = 9.8067\n",
+ "\n",
+ "# Calculations\n",
+ "h = PE/(m*g);\t\t\t# height from ground in m\n",
+ "#Using equation 1.9 (Page no. 8)\n",
+ "KE = 0.5*m*(u**2);\t\t\t# Kinetic energy in J\n",
+ "\n",
+ "# Results\n",
+ "print 'Height from ground is %f m'%h\n",
+ "print '\\nKinetic Energy of body is %3.2e J'%KE\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Height from ground is 15.295665 m\n",
+ "\n",
+ "Kinetic Energy of body is 1.25e+04 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page no:9 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the power developed in man\n",
+ "\n",
+ "# Variables\n",
+ "#Given\n",
+ "F = 600.; \t\t\t#weight in N\n",
+ "t = 120.; \t\t\t#time in sec\n",
+ "h = 0.18; \t\t\t#height of stairs in m\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the power developed in man\n",
+ "S = 20*h; \t\t\t#total vertical displacement in m\n",
+ "W = F*S; \t\t\t#work done in J\n",
+ "P = W/t; \t\t\t#power developed\n",
+ "\n",
+ "# Results\n",
+ "print 'Power developed is %i W'%P\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power developed is 18 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page no:9 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the force exerted pressure work done and change in potential energy\n",
+ "\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "A = (math.pi/4)*(0.1**2); \t\t\t#area in m**2\n",
+ "P = 1.01325*10**5; \t\t\t#pressure in N/m**2\n",
+ "m = 50; \t\t\t#mass of piston and weight in kg\n",
+ "g = 9.81; \t\t\t#acceleration due to gravity (N/m**2)\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine the force exerted pressure work done and change in potential energy\n",
+ "#(a)\n",
+ "Fa = P*A; \t\t\t#force exerted by atmosphere in N\n",
+ "Fp = m*g; \t\t\t#force exerted by piston and weight in N\n",
+ "F = Fp+Fa; \t\t\t#total force exerted in N\n",
+ "print 'Total force exerted by the atmosphere, the piston and the weight is %f N'%F\n",
+ "\n",
+ "#(b)\n",
+ "Pg = F/A; \t\t\t#pressure of gas in N/m**2\n",
+ "print 'Pressure of gas is %5.4e N/m^2'%Pg\n",
+ "\n",
+ "#(c)\n",
+ "S = 0.4; \t\t\t#displacement of gas in m\n",
+ "W = F*S; \t\t\t#work done by gas in J\n",
+ "print 'Work done by gas is %f J'%W\n",
+ "\n",
+ "#(d)\n",
+ "PE = m*g*S; \t\t\t#change in potential energy in J\n",
+ "print 'Change in potential energy is %f J'%PE\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force exerted by the atmosphere, the piston and the weight is 1286.304689 N\n",
+ "Pressure of gas is 1.6378e+05 N/m^2\n",
+ "Work done by gas is 514.521876 J\n",
+ "Change in potential energy is 196.200000 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page no:10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine work done by gas\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "#P =(2*10**5)*D\n",
+ "Df = 2.5; \t\t\t#final diameter (m)\n",
+ "Di = 0.5; \t\t\t#initial diameter(m)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine work done by gas\n",
+ "W = (math.pi/4)*10**5*((Df**4)-Di**4);\n",
+ "\n",
+ "# Results\n",
+ "print 'Work done by gas is %6.4e J'%W\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by gas is 3.0631e+06 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 1.7, Page no:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the work done on surrounding\n",
+ "\n",
+ "# Variables\n",
+ "T = 300.; \t\t\t #temperature in K\n",
+ "P = 6.5*10**5; \t\t\t#pressure in N/m**2\n",
+ "Pa = 1.01325*10**5; \t#atmospheric pressure in N/m**2\n",
+ "R = 8.314; \t\t\t #ideal gas constant\n",
+ "m = 2.; \t\t\t #mass of gas (kg)\n",
+ "M = 44.; \t\t\t #molecular weihgt of gas\n",
+ "\n",
+ "# Calculations\n",
+ "#To find the work done on surrounding\n",
+ "n = m/M; \t\t\t # n is number of kmoles\n",
+ "Vi = (n*R*10**3*T)/P; \t\t\t# initial volume in m**3\n",
+ "Vf = 2*Vi; \t\t \t#final volume in m**3\n",
+ "V = Vf-Vi; \t\t\t #change in volume\n",
+ "Ps = Pa+(5000*9.8067); \t\t\t#pressure on surroundings\n",
+ "W = Ps*V; \t\t\t #work done on the surroundings\n",
+ "\n",
+ "# Results\n",
+ "print 'Work done on surroundings is %5.2e J'%W\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done on surroundings is 2.62e+04 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "\n",
+ "#Taking 3rd and 2nd order derivative respectively, we get the following expression \n",
+ "#x = ((2*10**5*math.pi)/2)*\n",
+ "D = lambda x: x**3\n",
+ "integ,err = integrate.quad(D,0.5,2.5)\n",
+ "print integ\n",
+ "#integ,err = integrate.quad(D**3,0.5,2.5)\n",
+ "#print integ"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "9.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb
new file mode 100644
index 00000000..d5f58800
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch2.ipynb
@@ -0,0 +1,710 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find change in internal energy\n",
+ "\n",
+ "# Variables\n",
+ "#Given\n",
+ "W = -2.25*745.7; \t\t\t#work done on system in J/s\n",
+ "Q = -3400.*(10.**3)/3600; \t\t\t#heat transferred to the surrounding in J/s\n",
+ "\n",
+ "# Calculations\n",
+ "#To find the change in internal energy\n",
+ "#Using equation 2.4 (Page no. 26)\n",
+ "U = Q-W; \t\t\t#change in internal energy in J/s\n",
+ "\n",
+ "# Results\n",
+ "print 'Internal energy of system increases by %f J/s'%U\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy of system increases by 733.380556 J/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find heat liberated work done and change in internal energy\n",
+ "\n",
+ "#Given\n",
+ "T = 298.; \t\t\t#temperature in K\n",
+ "P = 101.; \t \t\t#pressure in kPa\n",
+ "n_iron = 2.; \t\t\t#moles of iron reacted\n",
+ "Q = -831.08; \t\t\t#heat liberated in kJ\n",
+ "R = 8.314; \t\t \t#ideal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To find heat liberated work done and change in internal energy\n",
+ "print 'Heat liberated during the reaction is %f kJ'%Q\n",
+ "n_oxygen = 1.5; \t\t\t#moles of oxygen reacted\n",
+ "\n",
+ "#Using ideal gas equation P(Vf-Vi)=nRT and W=P(Vf-Vi)\n",
+ "W = -1.5*R*T; \t\t \t#work done by system in J\n",
+ "\n",
+ "#Using equation 2.4 (Page no. 26)\n",
+ "U = (Q*10**3)-W; \t\t\t#change in internal energy in J\n",
+ "print 'Work done by gas is %f J'%W\n",
+ "print 'Change in internal energy is %6.3e J'%U\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat liberated during the reaction is -831.080000 kJ\n",
+ "Work done by gas is -3716.358000 J\n",
+ "Change in internal energy is -8.274e+05 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the heat energy dissipated by brakes\n",
+ "\n",
+ "# Variables\n",
+ "#Given\n",
+ "u = 20.; \t\t\t#speed of car in m/s\n",
+ "z = 30.; \t\t\t#height vertically above the bottom of hill in m\n",
+ "m = 1400.; \t\t\t#mass of car in kg\n",
+ "g = 9.81; #acceleration due to gravity \n",
+ "\n",
+ "# Calculations\n",
+ "#To find the heat energy dissipated by brakes\n",
+ "#Using equation 2.3 (Page no. 26)\n",
+ "KE = -0.5*m*(u**2); \t\t\t#change in kinetic energy in J\n",
+ "PE = -m*g*z; \t \t\t#change in potential energy in J\n",
+ "Q = -(KE+PE); \t\t\t#heat dissipated by brakes in J\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat dissipated by brakes is %3.2e J'%Q\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat dissipated by brakes is 6.92e+05 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find internal energy change during each step and work done during adiabatic process\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "#For step 1\n",
+ "W1 = -50.; \t\t\t#work received in J\n",
+ "Q1 = -25.; \t\t\t#heat gven out in J\n",
+ "\n",
+ "# Calculations and Results\n",
+ "U1 = Q1-W1; \t\t\t#internal energy change in J\n",
+ "print 'Change in internal energy for constant pressure process is %i J'%U1\n",
+ "\n",
+ "#For step 2\n",
+ "W2 = 0.; \t\t\t#work done for constant volume process is zero\n",
+ "Q2 = 75.; \t\t\t#heat received in J\n",
+ "U2 = Q2; \t\t\t#internal energy change in J\n",
+ "print 'Change in internal energy for constant volume process is %i J'%U2\n",
+ "\n",
+ "#For step 3\n",
+ "Q3 = 0.; \t\t\t#no heat exchange in adiabatic process\n",
+ "#Since the process is cyclic\n",
+ "#U3+U2+U1 = 0;\n",
+ "U3 = -(U1+U2);\n",
+ "W3 = -U3; \t\t\t#work done in J\n",
+ "print 'Work done during adiabatic process is %i J'%W3\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy for constant pressure process is 25 J\n",
+ "Change in internal energy for constant volume process is 75 J\n",
+ "Work done during adiabatic process is 100 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.5, Page no:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find change in internal energy and enthalpy\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "n_water = 10.**3; \t\t\t#moles of water\n",
+ "T = 373.; \t\t\t #tempearture(K)\n",
+ "P = 101.3; \t\t\t #pressure(kPa)\n",
+ "sv_liquid = 0.00104; \t\t#specific volume of liquid(m**3/kmol)\n",
+ "sv_vapour = 1.675; \t\t\t#specific volume of vapour(m**3/kmol)\n",
+ "Q = 1.03*10**3; \t\t\t#heat added in kJ\n",
+ " \n",
+ "#To find change in internal energy and enthalpy\n",
+ "W = P*n_water*(sv_vapour-sv_liquid)*10**-3; \t\t\t#expansion work done in kJ\n",
+ "U = Q-W; \t\t\t #change in internal energy in kJ\n",
+ "#For constant pressure process\n",
+ "H = Q; \t\t\t #enthalpy change in kJ\n",
+ "\n",
+ "# Results\n",
+ "print 'Change in internal energy is %f kJ'%U\n",
+ "print 'Change in enthalpy is %3.2e J'%H\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy is 860.427852 kJ\n",
+ "Change in enthalpy is 1.03e+03 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.6, Page no:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find internal energy of saturated liquid and internal energy and enthalpy of saturated vapour\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 233.; \t\t\t #temperature in K\n",
+ "VP = 1.005*10**3; \t\t\t #vapour pressure of CO2 in kPa\n",
+ "sv_liquid = 0.9*10**-3; \t\t\t#specific volume of liquid CO2 in m**3/kg\n",
+ "sv_vapour = 38.2*10**-3; \t\t\t#specicific volume of CO2 vapour in m**3/kg\n",
+ "L = 320.5; \t\t\t #latent heat of vaporisation of CO2 in kJ/kg\n",
+ "#Assuming at these conditions CO2 is saturated liquid so\n",
+ "H1 = 0; \t\t\t #enthalpy in liquid state\n",
+ "\n",
+ "# Calculations\n",
+ "#To find internal energy of saturated liquid and internal energy and enthalpy of saturated vapour\n",
+ "#For saturated liquid\n",
+ "U1 = H1-(VP*sv_liquid); \t\t\t# internal energy in liquid state in kJ/kg\n",
+ "#For saturated vapour\n",
+ "Hv = H1+L; \t\t\t #enthalpy of saturated vapour in kJ/kg\n",
+ "Uv = Hv-(VP*sv_vapour); \t\t\t#internal energy in vapour state in kJ/kg\n",
+ "\n",
+ "# Results\n",
+ "print 'Internal Energy of saturated liquid is %f kJ/kg'%U1\n",
+ "print 'Enthalpy of vapour state is %f kJ/kg'%Hv\n",
+ "print 'Internal Energy of vapour state is %f kJ/kg'%Uv\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal Energy of saturated liquid is -0.904500 kJ/kg\n",
+ "Enthalpy of vapour state is 320.500000 kJ/kg\n",
+ "Internal Energy of vapour state is 282.109000 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page no:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate molar internal energy change and molar enthalpy change\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "I = 0.5; \t\t\t#current in Amperes\n",
+ "V = 12.; \t\t\t#voltage in volts\n",
+ "t = 5*60.; \t\t\t#time in sec\n",
+ "m = 0.798; \t\t\t#mass of water vaporised in g\n",
+ "M = 18.; \t\t\t#molecular mass of water in g\n",
+ "R = 8.314*10**-3 #ideal gas constant\n",
+ "T = 373 #temperature\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate molar internal energy change and molar enthalpy change\n",
+ "Q = (I*V*t/1000.); \t\t\t#electric energy supplied in kJ\n",
+ "#Referring equation 2.10 (Page no. 29)\n",
+ "H = (Q*M)/m; \t\t\t#molar enthalpy change in kJ/mole\n",
+ "\n",
+ "#BY ideal gas equation PV=RT\n",
+ "#Referring equation 2.9 for constant pressure process (Page no. 29)\n",
+ "U = H-(R*T); \t\t\t#molar internal energy change in kJ/mole\n",
+ "\n",
+ "# Results\n",
+ "print 'Molar Enthalpy change during the process is %i kJ/mole'%H\n",
+ "print 'Molar Interanl Energy change during the process is %f kJ/mole'%U\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molar Enthalpy change during the process is 40 kJ/mole\n",
+ "Molar Interanl Energy change during the process is 37.500382 kJ/mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8, Page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the theoretical horsepower developed\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m = 1650.; \t\t\t#mass of steam used in kg/hr\n",
+ "H1 = 3200.; \t\t\t#enthalpy at 1368 kPa and 645 K in kJ/kg\n",
+ "H2 = 2690.; \t\t\t#enthalpy at 137 kPa and 645 K in kJ/kg\n",
+ "\n",
+ "#To determine the theoretical horsepower developed\n",
+ "#Using equation 2.13 (Page no.32)\n",
+ "Q = 0; \t\t\t#since the process is adiabatic\n",
+ "z = 0; \t\t\t#assuming that inlet and discharge of turbine are at same level\n",
+ "u = 0; \t\t\t#feed and discharge velocities being equal\n",
+ "\n",
+ "# Calculations\n",
+ "Ws = -(H2-H1);\n",
+ "Wj = Ws*10**3*m/3600.; \t\t\t#work done by turbine in J\n",
+ "W = Wj/745.7; \t\t\t#work done by turbine in hp\n",
+ "\n",
+ "# Results\n",
+ "print 'Work done by turbine is %f hp'%W\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by turbine is 313.463859 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.9, Page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find temperature of water delivered to second storage tank\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m = 25.*10**3; \t\t#mass flow rate of water in kg/h\n",
+ "P = 2.; \t\t\t#power supplied by motor in hp\n",
+ "q = 42000.; \t\t#heat given in kJ/min\n",
+ "z = 20.; \t\t\t#elevation in m\n",
+ "T = 368.; \t\t\t#temperature in K\n",
+ "To = 273.; \t\t\t#standard temperature in K\n",
+ "Cp = 4.2; \t\t\t#specific heat of water in kJ/kg K\n",
+ "g = 9.81 #acceleration due to gravity(m/s^2)\n",
+ "\n",
+ "# Calculations\n",
+ "#To find temperature of water delivered to second storage tank\n",
+ "W = (P*745.7*10**-3*3600)/m; \t\t\t#work done per kg of water pumped in kJ/kg\n",
+ "Q = q*60./m; \t\t\t #heat given out per kg of fluid\n",
+ "PE = g*z*10**-3; \t\t\t #change in potential energy in kJ/kg\n",
+ "\n",
+ "#Using equation 2.13 (Page no. 32)\n",
+ "H = -Q+W-PE;\n",
+ "#H = H2-H1\n",
+ "H1 = Cp*(T-To);\n",
+ "H2 = H1+H;\n",
+ "#Let T1 be the temperature at second storage tank\n",
+ "T1 = To+(H2/Cp);\n",
+ "\n",
+ "# Results\n",
+ "print 'Temperature of water at second storage tank is %i K'%T1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of water at second storage tank is 344 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.10, Page no:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find change in enthalpy and maximum enthalpy change\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "D1 = 25.; \t\t\t#internal diameter of pipe in mm\n",
+ "u1 = 10.; \t\t\t#upstream velocity in m/s\n",
+ "D2 = 50.; \t\t\t#downstream diameter of pipe in mm\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)\n",
+ "#Let A1 nad A2 be upstream and downstream crosssectional areas of pipe\n",
+ "u2 = ((D1/D2)**2)*u1; \t\t\t#downstream velocity in m/s\n",
+ "H = 0.5*(u1**2-u2**2); \t\t\t#change in enthalpy in J/kg\n",
+ "print 'Change in enthalpy is %f J/kg'%H\n",
+ "\n",
+ "#(b)\n",
+ "#For maximum enthalpy change \n",
+ "u2 = 0;\n",
+ "Hmax = 0.5*u1**2; \t\t\t#(J/kg)\n",
+ "print 'Maximum enthalpy chnage for a sudden enlargement in pipe is %f J/kg'%Hmax\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in enthalpy is 46.875000 J/kg\n",
+ "Maximum enthalpy chnage for a sudden enlargement in pipe is 50.000000 J/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.11, Page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine heat transfer rates\n",
+ "\n",
+ "# Variables\n",
+ "#At inlet:\n",
+ "T1 = 293.; \t\t\t#Temperature(K)\n",
+ "P1 = 300+136.8; \t\t\t#Pressure(kPa)\n",
+ "#At exit:\n",
+ "T2 = 453.; \t\t\t#Temperature(K)\n",
+ "P2 = 136.8; \t\t\t#Pressure(kPa)\n",
+ "Cp = 29.4; \t \t\t#specific heat capacity at constant pressure in kJ/kmol\n",
+ "m = 1000.; \t\t \t#mass of hydrogen in kg\n",
+ "M = 2.02; \t\t\t #molecular mass of hydrogen\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine heat transfer rates\n",
+ "#Neglecting the kinetic nd potential energy changes\n",
+ "#Assuming the process to be occuring through a number of steps\n",
+ "#Step 1 be isothermal and step 2 be isobaric\n",
+ "H1 = 0; \t\t\t#change in enthalpy for step 1\n",
+ "H2 = (m/M)*Cp*(T2-T1)/1000; \t\t\t#change in enthalpy for step 2 in kJ\n",
+ "H = H2+H1;\n",
+ "Q = H; \t\t\t#heat transferred in coils in kJ\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat transferred in coils is %f kJ'%Q\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred in coils is 2328.712871 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.12, Page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find change in internal energy enthalpy heat supplied and work done\n",
+ "\n",
+ "#Given:\n",
+ "m = 10.; \t\t\t#mass of air in kg\n",
+ "P1 = 100.; \t\t\t#initial pressure(kPa)\n",
+ "T1 = 300.; \t\t\t#initial temperature(K)\n",
+ "T2 = 600.; \t\t\t#final temperature(K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant(kJ/kmol K)\n",
+ "Cp = 29.099;\t\t#specific heat capacity at constant pressure (kJ/kmol K)\n",
+ "Cv = 20.785;\t\t#specific heat capacity at constsant volume (kJ/kmol K)\n",
+ "M = 29.; \t\t\t#molecular weight of air\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine change in internal energy enthalpy heat supplied and work done\n",
+ "n = m/M; \t \t\t#number of moles of gas(kmol)\n",
+ "V1 = (n*R*T1)/P1; \t\t\t#initial volume of air (m**3)\n",
+ "\n",
+ "#(a)\n",
+ "#Constant volume process\n",
+ "V2 = V1 \t\t\t#final volume\n",
+ "#Change in internal energy U = n*intg(CvdT)...so\n",
+ "U = n*Cv*(T2-T1); \t\t\t#change in internal energy(kJ)\n",
+ "Q = U; \t\t\t #heat supplied(kJ)\n",
+ "W = 0; \t\t\t #work done\n",
+ "H = U+(n*R*(T2-T1)); \t\t#change in enthalpy(kJ)\n",
+ "print 'For constant volume process'\n",
+ "print 'Change in internal energy is %i kJ'%U\n",
+ "print 'Heat supplied is %i kJ'%Q\n",
+ "print 'Work done is %i kJ'%W\n",
+ "print 'Change in enthalpy is %i kJ'%H\n",
+ "\n",
+ "# (b)\n",
+ "# Constant pressure process\n",
+ "# Change in enthalpy H = n*intg(CpdT)...so \n",
+ "H = n*Cp*(T2-T1); \t\t\t#change in enthalpy(kJ)\n",
+ "Q = H;\t\t\t#heat supplied(kJ)\n",
+ "U = H-(n*R*(T2-T1));\t\t\t#change in internal energy(kJ)\n",
+ "W = Q-U; \t\t\t#work done(kJ)\n",
+ "print 'For constant pressure process'\n",
+ "print 'Change in internal energy is %i kJ'%U\n",
+ "print 'Heat supplied is %i kJ'%Q\n",
+ "print 'Work done is %i kJ'%W\n",
+ "print 'Change in enthalpy is %i kJ'%H\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For constant volume process\n",
+ "Change in internal energy is 2150 kJ\n",
+ "Heat supplied is 2150 kJ\n",
+ "Work done is 0 kJ\n",
+ "Change in enthalpy is 3010 kJ\n",
+ "For constant pressure process\n",
+ "Change in internal energy is 2150 kJ\n",
+ "Heat supplied is 3010 kJ\n",
+ "Work done is 860 kJ\n",
+ "Change in enthalpy is 3010 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.13, Page no:36\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in internal energy and change in enthalpy\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "R = 8.314; \t\t\t#ideal gas constant(kJ/kmol K)\n",
+ "Cv = 20.8; \t\t\t#specific heat capacity at constant volume(kJ/kmol K)\n",
+ "Cp = 29.1; \t\t\t#specific heat capacity at constant pressure(kJ/kmol K)\n",
+ "P1 = 10.; \t\t\t#initial pressure(bar)\n",
+ "T1 = 280.; \t\t\t#initial temperature in K\n",
+ "P2 = 1.; \t\t\t#final pressure(bar)\n",
+ "T2 = 340.; \t\t\t#final temperature(K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the change in internal energy and change in enthalpy\n",
+ "#Solution\n",
+ "n = 1 \t\t\t#basis: 1 kmol of ideal gas\n",
+ "V1 = (n*R*T1)/(P1*100); \t\t\t#initial volume in m**3\n",
+ "V2 = (n*R*T2)/(P2*100); \t\t\t#final volume in m**3\n",
+ "\n",
+ "Po = P2; \n",
+ "Vo = V1;\n",
+ "To = (Po*100*Vo)/(n*R);\n",
+ "U1 = Cv*(To-T1);\n",
+ "H1 = U1+(V1*100*(P2-P1));\n",
+ "W1 = 0;\n",
+ "Q1 = U1;\n",
+ "\n",
+ "H2 = Cp*(T2-To);\n",
+ "U2 = H2-100*(V2-V1);\n",
+ "Q2 = H2;\n",
+ "W2 = Q2-U2;\n",
+ "#For actual process\n",
+ "U = U1+U2; \t\t\t#change in internal energy(kJ)\n",
+ "H = H1+H2; \t\t\t#change in enthalpy(kJ)\n",
+ "\n",
+ "# Results\n",
+ "print 'Change in internal energy is %f kJ'%U\n",
+ "print 'Change in enthalpy is %f kJ'%H\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy is 1243.632000 kJ\n",
+ "Change in enthalpy is 1742.472000 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb
new file mode 100644
index 00000000..4e689d3d
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch3.ipynb
@@ -0,0 +1,724 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : PVT Behaviour And Heat Effects"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.1, , Page no:45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the molar volume of air\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 350.; \t\t\t#temperature in K\n",
+ "P = 10.**5; \t\t\t#pressure in N/m**2\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To find the molar volume of air\n",
+ "V = (R*T)/P; \t\t\t#molar volume in m**3\n",
+ "\n",
+ "# Results\n",
+ "print 'Molar volume of air is %3.2e cubic m/mol'%V\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molar volume of air is 2.91e-02 cubic m/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page no:50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine heat and work effects for each step\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "Cp = 29.3; \t\t\t#specific heat at constant pressure(kJ/kmol K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine heat and work effects for each step\n",
+ "#Step 1: Gas is heated at constant volume\n",
+ "T1 = 300.; \t\t \t#temperature in K\n",
+ "P1 = 1.; \t \t\t #initial pressure in bar\n",
+ "P2 = 2.; \t\t \t #final pressure in bar\n",
+ "T2 = (P2/P1)*T1; \t\t\t#final temperature in K\n",
+ "Cv = Cp-R; \t \t \t#specific heat at constant volume\n",
+ "W1 = 0; \t\t \t #work done is zero as volume remains constant\n",
+ "Q1 = Cv*(T2-T1); \t\t\t#heat supplied in kJ/kmol\n",
+ "print 'For step 1'\n",
+ "print 'Work done in step 1 is %i'%W1\n",
+ "print 'Heat supplied in step 1 is %f kJ/kmol'%Q1\n",
+ "\n",
+ "#Step 2: The process is adiabatic\n",
+ "Q2 = 0.; \t\t\t#the process is adiabatic\n",
+ "P3 = 1.; \t\t\t#pressure after step 2 in bar\n",
+ "gama = (Cp/Cv);\n",
+ "T3 = ((P3/P2)**((gama-1)/gama))*T2; \t\t\t#temperature after step 2\n",
+ "W2 = (Cv*(T2-T3)); \t\t\t#work done by system\n",
+ "print 'For step 2'\n",
+ "print 'Heat supplied in step 2 is %i'%Q2\n",
+ "print 'Work done by system in step 2 is %f kJ/kmol'%W2\n",
+ "\n",
+ "#Step 3: The process is isobaric\n",
+ "T4 = 300.; \t\t\t#temperature after step 3 (K)\n",
+ "Q3 = Cp*(T4-T3); \t\t\t#heat supplied during step 3(kJ/kmol)\n",
+ "U = (Cv*(T4-T3)); \t\t\t#change in internal energy during step 3(kJ/kmol)\n",
+ "W3 = Q3-U; \t\t\t#Using first law of thermodynamics\n",
+ "print 'For step 3'\n",
+ "print 'Heat given out by the system in step 3 is %f kJ/kmol'%Q3\n",
+ "print 'Work done on the system in step 3 is %f kJ/kmol'%W3\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For step 1\n",
+ "Work done in step 1 is 0\n",
+ "Heat supplied in step 1 is 6295.800000 kJ/kmol\n",
+ "For step 2\n",
+ "Heat supplied in step 2 is 0\n",
+ "Work done by system in step 2 is 2248.222546 kJ/kmol\n",
+ "For step 3\n",
+ "Heat given out by the system in step 3 is -5651.101658 kJ/kmol\n",
+ "Work done on the system in step 3 is -1603.524204 kJ/kmol\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page no:51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate change in internal energy change in enthalpy work done and heat supplied\n",
+ "\n",
+ "#Given:\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "Cp = 30.; \t\t\t#specific heat at constant pressure(J/mol K)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate change in internal energy change in enthalpy work done and heat supplied\n",
+ "import math\n",
+ "#(a): Gas is expanded isothermally\n",
+ "T = 600.; \t\t\t#temperature in K\n",
+ "P1 = 5.; \t\t\t#initial pressure in bar\n",
+ "P2 = 4.; \t\t\t#final pressure in bar\n",
+ "U1 = 0; \t\t\t#since the process is isothermal\n",
+ "H1 = 0; \t\t\t#since the process is isothermal\n",
+ "W1 = (R*T*math.log(P1/P2)); \t\t\t#work done during the process\n",
+ "Q1 = W1; \t\t\t#heat supplied during the process\n",
+ "print 'When gas is expanded isothermally'\n",
+ "print 'Change in internal energy in isothermal process is %i'%U1\n",
+ "print 'Change in enthalpy in isothermal process is %i'%H1\n",
+ "print \"Work done during the process is %f kJ/kmol\"%W1\n",
+ "print 'Heat supplied during the process is %f kJ/kmol'%Q1\n",
+ "\n",
+ "#(b): Gas is heated at constant volume\n",
+ "V = 0.1; \t\t\t#volume (m**3)\n",
+ "P1 = 1.; \t\t\t#initial pressure(bar)\n",
+ "T1 = 298.; \t\t\t#initial temperature(K)\n",
+ "T2 = 400.; \t\t\t#final temperature(K)\n",
+ "n = ((P1*V*10**5)/(R*T1)); \t\t\t#number of moles of gas\n",
+ "Cv = Cp-R; \t\t\t#specific heat at constant volume(J/mol K)\n",
+ "ans = round(Cv*(T2-T1))\n",
+ "n = round(n,2)\n",
+ "U2 = n*ans #Cv*round(T2-T1); \t\t\t#change in internal energy(J)\n",
+ "H2 = n*Cp*(T2-T1); \t\t\t#change in enthalpy(J)\n",
+ "W2 = 0; \t\t\t#isochoric process\n",
+ "Q2 = U2+W2; \t\t\t#heat supplied(J)\n",
+ "print '\\nWhen gas is heated at constant volume'\n",
+ "print 'Change in internal energy is %.0f J'%U2\n",
+ "print 'Change in enthalpy is %f J'%H2\n",
+ "print 'Work done during the process is %i '% W2\n",
+ "print 'Heat supplied during the process is %.0f J'%Q2\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When gas is expanded isothermally\n",
+ "Change in internal energy in isothermal process is 0\n",
+ "Change in enthalpy in isothermal process is 0\n",
+ "Work done during the process is 1113.129291 kJ/kmol\n",
+ "Heat supplied during the process is 1113.129291 kJ/kmol\n",
+ "\n",
+ "When gas is heated at constant volume\n",
+ "Change in internal energy is 8936 J\n",
+ "Change in enthalpy is 12362.400000 J\n",
+ "Work done during the process is 0 \n",
+ "Heat supplied during the process is 8936 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page no:52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine work done and amount of heat transferred\n",
+ "\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "\n",
+ "def Cv(T):\n",
+ " y = 27.4528+(6.1839*(10**-3)*T)-(8.9932*(10**-7)*(T**2))-R;\n",
+ " return y\n",
+ "\n",
+ "# Variables\n",
+ "m = 20.; \t\t\t#mass of air(kg)\n",
+ "n = 1.25; \t\t\t#polytropic constant\n",
+ "P1 = 1.; \t\t\t#initial pressure(bar)\n",
+ "P2 = 5.; \t\t\t#final pressure(bar)\n",
+ "T1 = 300.; \t\t\t#temperature(K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "M = 29.; \t\t\t#molecular wt of air\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine work done and amount of heat transferred\n",
+ "#(a): Work done by the compressor per cycle\n",
+ "n_mole = m/M; \t\t\t#moles of air(kmol)\n",
+ "V1 = ((n_mole*10**3*R*T1)/(P1*10**5)); \t\t\t#initial volume(m**3)\n",
+ "V2 = (V1*((P1/P2)**(1/n))); \t\t\t #final volume(m**3)\n",
+ "\n",
+ "#Since the process is polytropic P(V**n)=c(say constant)\n",
+ "c = P1*10**5*(V1**n); \n",
+ "\t\t\t#function[z] = f(V);\n",
+ "\t\t\t# z = c/(V**1.25);\n",
+ "\t\t\t#W1 = intg(V1,V2,f); so\n",
+ "W = (c/(1-n))*((V2**(-n+1))-(V1**(-n+1)))/1000;\n",
+ "print 'Work done by compressor is %4.3e J'%(W*1000);\n",
+ "\n",
+ "#(b): Amount of heat transferred to surrounding\n",
+ "T2 = ((T1*V2*P2)/(V1*P1)); \t\t\t#final temp in K\n",
+ "U1 = quad(Cv,T1,T2)[0];\n",
+ "U = U1*n_mole; \t\t\t #change in internal energy(kJ)\n",
+ "Q = U+W; \t\t\t #heat supplied\n",
+ "\n",
+ "# Results\n",
+ "print 'Chnage in internal energy is %f kJ'%U\n",
+ "print 'Heat supplied is %f kJ'%Q\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by compressor is -2.613e+06 J\n",
+ "Chnage in internal energy is 1667.979893 kJ\n",
+ "Heat supplied is -944.769684 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page no:55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To compare the pressures\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "V = 0.3821*10**-3 \t\t\t#molar volume(m**3/mol)\n",
+ "T = 313.; \t\t\t#temperature (K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "a = 0.365; b = 4.28*10**-5; \t\t\t#Vander Waals constant\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To compare the pressures\n",
+ "#(a): Ideal gas equation\n",
+ "P = ((R*T)/(V*10**5)); \t\t\t#pressure in bar\n",
+ "print 'Pressure obtained by ideal gas equation is %f bar'%P\n",
+ "\n",
+ "#(b): Van der Waals equation\n",
+ "P = ((((R*T)/(V-b))-(a/(V**2)))/(10**5));\n",
+ "print 'Pressure obtained by Van der Waals equation is %f bar'%P\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure obtained by ideal gas equation is 68.104737 bar\n",
+ "Pressure obtained by Van der Waals equation is 51.695679 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.7, Page no:56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the volume\n",
+ "\n",
+ "#To find Approx Value\n",
+ "def approx(V,n):\n",
+ " A=round(V*10**n)/10**n;\t\t\t#V-Value n-To what place\n",
+ " return A\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 300.; \t\t\t#temperature(K)\n",
+ "P = 100.; \t\t\t#pressure(bar)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "a = 0.1378\n",
+ "b = 3.18*10**-5; \t\t\t#Van der waals constant\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a): Ideal gas equation\n",
+ "V_ideal = approx(((R*T)/(P*10**5)),6);\n",
+ "print 'Volume calculated by ideal gas equation is %4.2e cubic m'%V_ideal\n",
+ "\n",
+ "#(b): Van der Waals equation\n",
+ "def f(V):\n",
+ " y=((P*10**5)+(a/(V**2)))*(V-b)-(R*T); \t\t\t#function to calculate difference between calculated and assumed volume\n",
+ " return y\n",
+ " \n",
+ "V_real = 0;\n",
+ "i = 0.20\n",
+ "while i<=.30: \t\t\t#Van der waals volume should be nearly equal to Ideal gas valoume\n",
+ " res = approx(f(i*10**-3),0);\n",
+ " for j in range(-5,6):\n",
+ " if(j==res): \t\t\t#for very small difference i may be taken as exact volume\n",
+ " V_real = i*10**-3;\n",
+ " i += 0.01\n",
+ "\n",
+ "print 'Volume calculated by Van der Waals equation is %3.2e cubic m'%V_real\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume calculated by ideal gas equation is 2.49e-04 cubic m\n",
+ "Volume calculated by Van der Waals equation is 2.30e-04 cubic m\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.9, Page no:59 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate compressibility factor and molar volume\n",
+ "\n",
+ "#To find Approx Value\n",
+ "def approx(V,n):\n",
+ " A=round(V*10**n)/10**n;\t\t\t#V-Value n-To what place\n",
+ " return A\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 500.; \t\t\t#temperature (K)\n",
+ "P = 10.; \t\t\t#pressure(bar)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "B = -2.19*10**-4; C=-1.73*10**-8; \t\t\t#Virial coeffecients\n",
+ "Tc = 512.6; \t\t\t#critical temperature\n",
+ "Pc = 81.; \t\t\t#critical pressure\n",
+ "\n",
+ "#To calculate compressibility factor and molar volume\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a): Truncated form of virial equation\n",
+ "V_ideal = approx(((R*T)/(P*10**5)),7); \t\t\t#ideal gas volume\n",
+ "def f1(V):\n",
+ " z = (((R*T)/(P*10**5))*(1+(B/V)+(C/(V**2)))); \t\t\t#function for obtaining volume by virial equation\n",
+ " return z\n",
+ "\n",
+ "#loop for hit and trial method\n",
+ "flag = 1;\n",
+ "while(flag==1):\n",
+ " V_virial = approx(f1(V_ideal),7);\n",
+ " if(approx(V_ideal,5)==approx(V_virial,5)):\n",
+ " flag = 0;\n",
+ " break;\n",
+ " else:\n",
+ " V_ideal = V_virial;\n",
+ "\n",
+ "\n",
+ "Z = approx(((P*10**5*V_virial)/(T*R)),3); \t\t\t#compressibility factor\n",
+ "print 'Compressibilty factor for virial equation is %f '%Z\n",
+ "\n",
+ "#(b): Redlich Kwong Equation\n",
+ "#Constants in Redlich Kwong equation\n",
+ "a = approx(((0.4278*(R**2)*(Tc**2.5))/(Pc*10**5)),4);\n",
+ "b = approx(((0.0867*R*Tc)/(Pc*10**5)),9);\n",
+ "\n",
+ "V_ideal = approx(((R*T)/(P*10**5)),7); \t\t\t#ideal gas volume\n",
+ "\n",
+ "#Function to find volume by Redlich Kwong equation \n",
+ "def f2(V):\n",
+ " x = ((R*T)/(P*10**5))+b-((a*(V-b))/((T**0.5)*(P*10**5)*V*(V+b)));\n",
+ " return x\n",
+ "\n",
+ "#loop for hit and trial method\n",
+ "flag = 1;\n",
+ "while(flag==1):\n",
+ " V_redlich = approx(f2(V_ideal),7);\n",
+ " if(approx(V_ideal,5)==approx(V_redlich,5)):\n",
+ " flag = 0;\n",
+ " break;\n",
+ " else:\n",
+ "\t V_ideal = V_redlich;\n",
+ "\n",
+ "print 'Volume obtained by Redlich Kwong Equation is %4.3e cubic m/mol'%V_redlich\n",
+ "Z = approx(((P*10**5*V_redlich)/(T*R)),3); \t\t\t#compressibility factor\n",
+ "print 'Compressbility factor by Redlich Kwong equation is %f'%Z\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compressibilty factor for virial equation is 0.943000 \n",
+ "Volume obtained by Redlich Kwong Equation is 3.963e-03 cubic m/mol\n",
+ "Compressbility factor by Redlich Kwong equation is 0.953000\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.10, Page no:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate heat of formation of methane gas\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "Ha = -890.94; \t\t\t#standard heat for reaction a (kJ)\n",
+ "Hb = -393.78; \t\t\t#standard heat for reaction b (kJ)\n",
+ "Hc = -286.03; \t\t\t#standard heat for reaction c (kJ)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate heat of formation of methane gas\n",
+ "#c*2 + b - a gives the formation of methane from elements\n",
+ "Hf = (2*Hc)+Hb-Ha;\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat of formation of methane is %f kJ/mol'%Hf\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat of formation of methane is -74.900000 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.11, Page no:65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate heat of formation of chloroform\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "Ha = -509.93; \t\t\t#heat of combustion of reaction a (kJ) \n",
+ "Hb = -296.03; \t\t\t#heat of combustion of reaction b (kJ)\n",
+ "Hc = -393.78; \t\t\t#heat of combustion of reaction c (kJ)\n",
+ "Hd = -167.57; \t\t\t#heat of combustion of reaction d (kJ)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate heat of formation of chloroform\n",
+ "#c + (3*d) -a -b gives chloroform from its elements\n",
+ "Hf = Hc+(3*Hd)-Ha-Hb;\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat of formation of chloroform is %f kJ/mol'%Hf"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat of formation of chloroform is -90.530000 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.12, Page no:67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate standard heat of reaction at 773 K\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "Ho = -164987.; \t\t\t#standard heat of reaction at 298 K in J\n",
+ "T1 = 298.;\n",
+ "T2 = 773.; \t\t\t#temperature(K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate standard heat of reaction at 773 K\n",
+ "alpha = (2*29.16)+13.41-26.75-(4*26.88);\n",
+ "betta = ((2*14.49)+77.03-42.26-(4*4.35))*10**-3;\n",
+ "gama = ((2*-2.02)-18.74+14.25+(4*0.33))*10**-6;\n",
+ "#Using equation 3.54 (Page no. 67)\n",
+ "H1 = Ho-(alpha*T1)-(betta*(T1**2)/2)-(gama*(T1**3)/3);\n",
+ "#At 773 K\n",
+ "Hr = H1+(alpha*T2)+(betta*(T2**2)/2)+(gama*(T2**3)/3);\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat of reaction at 773 K is %f kJ'%(Hr/1000)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat of reaction at 773 K is -183.950273 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.13, Page no:68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine heat added or removed\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "To = 298.; \t\t\t#standard temperature(K)\n",
+ "T1 = 400.; \t\t\t#temperature of reactants(K)\n",
+ "T2 = 600.; \t\t\t#temperature of products (K)\n",
+ "Ho = -283.028; \t\t\t#standard heat of reaction(kJ/mol)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine heat added or removed\n",
+ "#Basis:\n",
+ "n_CO = 1.; \t\t\t#moles of CO reacted\n",
+ "n_O2 = 1.;\t\t\t#moles of oxygen supplied\n",
+ "n_N2 = 1.*79./21; \t\t\t#moles of nitrogen\n",
+ "n1_O2 = 0.5; \t\t\t#moles of oxygen required\n",
+ "n_CO2 = 1.; \t\t\t#moles of carbon di oxide formed\n",
+ "\n",
+ "H1 = ((n_O2*29.70)+(n_N2*29.10)+(n_CO*29.10))*(To-T1)/1000; \t\t\t#enthalpy of cooling of reactants\n",
+ "H2 = ((n1_O2*29.70)+(n_N2*29.10)+(n_CO2*41.45))*(T2-To)/1000; \t\t\t#enthalpy of heating the products\n",
+ "Hr = H1+Ho+H2;\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat supplied is %f kJ'%Hr\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat supplied is -250.128714 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.14, Page no:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate theoretical flame temperature\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "To = 298.; \t\t\t#standard temperature (K)\n",
+ "T1 = 373.; \t\t\t#temperature of reactants (K)\n",
+ "Ho = 283178.; \t\t\t#standard heat of combustion(J/mol)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate theoretical flame temperature\n",
+ "#Basis:\n",
+ "n_CO = 1.; \t\t\t#moles of CO\n",
+ "n_O2 = 1.; \t\t\t#moles of oxygen supplied\n",
+ "n1_O2 = 0.5; \t\t\t#moles of oxygen reacted\n",
+ "n_CO2 = 1.; \t\t\t#moles of carbon di oxide formed\n",
+ "n_N2 = 79./21; \t\t\t#moles of nitrogen\n",
+ "\n",
+ "H1 = ((n_O2*34.83)+(n_N2*33.03)+(n_CO*29.23))*(To-T1); \t\t\t#enthalpy of cooling of reactants\n",
+ "#Using equation 3.55 (Page no. 69)\n",
+ "H2 = Ho-H1;\n",
+ "Tf = H2/((n1_O2*34.83)+(n_N2*33.03)+(n_CO2*53.59))+298; \t\t\t#flame temperature\n",
+ "\n",
+ "# Results\n",
+ "print 'Theoretical flame temperature is %f K'%Tf\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical flame temperature is 1820.588298 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb
new file mode 100644
index 00000000..75c3c01e
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch4.ipynb
@@ -0,0 +1,960 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the maximum efficiency\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 700.; \t\t\t#temperature of heat source(K)\n",
+ "T2 = 300.; \t\t\t#temperature of heat sink(K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the maximum efficiency\n",
+ "eff=((T1-T2)/T1); \t\t\t#efficiency of a heat engine\n",
+ "\n",
+ "# Results\n",
+ "print 'Maximum efficiency of heat engine is %f'%eff\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum efficiency of heat engine is 0.571429\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.2, Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine minimum amount of work done and heat given to surrounding\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m = 1.; \t\t\t#mass of water(kg)\n",
+ "T1 = 300.; \t\t\t#temperature of surrounding(K)\n",
+ "T2 = 273.; \t\t\t#temperature of water(K)\n",
+ "Hf = 334.11; \t\t\t#latent heat of fusion of ice(kJ/kg)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine minimum amount of work and heat given upto surrounding\n",
+ "#(a)\n",
+ "Q2 = m*Hf; \t\t\t#heat absobed at temperature T2\n",
+ "W = ((Q2*(T1-T2))/T2); \t\t\t#minimumm amount of work required\n",
+ "print 'Minimum amount of work required is %f kJ'%W\n",
+ " \n",
+ "#(b)\n",
+ "#Q1 is the heat given up the surrounding\n",
+ "Q1 = W+Q2;\n",
+ "print 'Heat given upto surrounding is %f kJ'%Q1\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum amount of work required is 33.043846 kJ\n",
+ "Heat given upto surrounding is 367.153846 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3, Page no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine efficiency of proposed engine\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P_out = 4.5; \t\t\t#output power(hp)\n",
+ "P_in = 6.25; \t\t\t#input power(kW)\n",
+ "T1 = 1000.; \t\t\t#source temperature(K)\n",
+ "T2 = 500.; \t\t\t#sink temperature(K)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine efficiency of proposed engine \n",
+ "ep = ((P_out*745.7)/(P_in*1000)); \t\t\t#proposed efficiency\n",
+ "print 'Efficiency of proposed engine is %f'%ep\n",
+ "\n",
+ "em = ((T1-T2)/T1); \t\t\t#maximum efficiency\n",
+ "print 'The maximum efficieny is %f'%em\n",
+ "print 'Hence the claim of the proposed engine is impossible'\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of proposed engine is 0.536904\n",
+ "The maximum efficieny is 0.500000\n",
+ "Hence the claim of the proposed engine is impossible\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page no:93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate entropy of evaporation\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P = 500.; \t\t\t#pressure of dry saturated steam(kPa)\n",
+ "\n",
+ "#From steam tables\n",
+ "Hv = 2106.; \t\t\t#latent heat of vaporisation(kJ/kg)\n",
+ "T = 425.; \t\t\t#saturation temperature(K)\n",
+ " \n",
+ "# Calculations \n",
+ "#To calculate the entropy of evaporation\n",
+ "#By equation 4.25 (Page no. 93)\n",
+ "Sv = (Hv/T); \t\t\t#entropy change accompanying vaporisation\n",
+ "\n",
+ "# Results\n",
+ "print 'Entropy of evaporation is %f kJ/kg K'%Sv\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy of evaporation is 4.955294 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.5, Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in entropy\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m = 2.; \t\t\t#mass of gas(kg)\n",
+ "T1 = 277.; \t\t\t#initial temperature(K)\n",
+ "T2 = 368.; \t\t\t#final temperature(K)\n",
+ "Cv = 1.42; \t\t\t#specific geat at constant volume(kJ/kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#Using equation 4.31 (Page no. 94)\n",
+ "S = (m*Cv*math.log(T2/T1)); \t\t\t#change in entropy(kJ/K)\n",
+ "\n",
+ "# Results\n",
+ "print 'Change in entropy is %f kJ/K'%S\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy is 0.806746 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.6, Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the entropy change\n",
+ "\n",
+ "#Given:\n",
+ "T = 300.; \t\t\t#temperature in K\n",
+ "P1 = 10.; \t\t\t#initial pressure(bar)\n",
+ "P2 = 1.; \t\t\t#final pressure(bar)\n",
+ "R = 8.314; \t\t\t#ieal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#To calculate the entropy change\n",
+ "#Using equation 4.33(Page no. 94)\n",
+ "S = (R*math.log(P1/P2)); \t\t\t#(kJ/kmol K)\n",
+ "\n",
+ "# Results\n",
+ "print 'Entopy change is %f kJ/kmol K'%S\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entopy change is 19.143692 kJ/kmol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.7, Page no:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in entropy\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 335.; \t\t\t#initial temperature in K\n",
+ "T2 = 300.; \t\t\t#final temperature in K\n",
+ "P1 = 10.; \t\t\t#initial pressure(bar)\n",
+ "P2 = 1.; \t\t\t#final pressure(bar)\n",
+ "Cp = 29.3; \t\t\t#specific heat constant at constant pressure(kJ/kmol K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#To determine change in entropy\n",
+ "#Using equation 4.30 (Page no. 94)\n",
+ "S = ((Cp*math.log(T2/T1))-(R*math.log(P2/P1))); \t\t\t#entropy change(kJ/kmol K)\n",
+ "\n",
+ "# Results\n",
+ "print 'Entropy change in the process is %f kJ/kmol K'%S\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change in the process is 15.910494 kJ/kmol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8, Page no:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the change in entropy\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m1 = 10.; \t\t\t#mass of water at 375 K (kg)\n",
+ "m2 = 30.; \t\t\t#mass of water at 275 K (kg)\n",
+ "c = 4.2; \t\t\t#specific heat of water (kJ.kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#To determine the change in entropy\n",
+ "#Let T be the final temperature(K)\n",
+ "T = ((m1*375)+(m2*275))/(m1+m2);\n",
+ "#S1 be change in entropy for hot water\n",
+ "S1 = (m1*c*math.log(T/375)); \t\t\t#[kJ/K]\n",
+ "#S2 be the change in entropy for cold water\n",
+ "S2 = (m2*c*math.log(T/275)); \t\t\t#[kJ/K]\n",
+ "#S be the total entropy change\n",
+ "S = S1+S2; \n",
+ "\n",
+ "# Results\n",
+ "print 'The total entropy change is %f kJ/K'%S\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is 1.591404 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9, Page no:95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the total entropy change\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m1 = 35.; \t\t\t#mass of steel in kg\n",
+ "m2 = 150.; \t\t\t#mass of oil in kg\n",
+ "T1 = 725.; \t\t\t#temperature of steel(K)\n",
+ "T2 = 275.; \t\t\t#temperature of oil(K)\n",
+ "c1 = 0.88; \t\t\t#specific heat of steel (kJ/kg K)\n",
+ "c2 = 2.5; \t\t\t#specific heat of oil(kJ/kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#To calculate the total entropy change\n",
+ "#Let T be the final temperature\n",
+ "T = (((m1*c1*T1)+(m2*c2*T2))/((m1*c1)+(m2*c2)));\n",
+ "#S1 be the in entropy for steel\n",
+ "S1 = (m1*c1*math.log(T/T1)); \t\t\t#[kJ/K]\n",
+ "#S2 be the change in entropy for oil\n",
+ "S2 = (m2*c2*math.log(T/T2)); \t\t\t#[kJ/K]\n",
+ "#S be the total entropy change\n",
+ "S = S1+S2;\n",
+ "\n",
+ "# Results\n",
+ "print 'The total entropy change is %f kJ/K'%S\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is 17.649827 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate entropy of 1 kmole of air\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "n1 = 0.21; \t\t\t#volume % of oxygen in air\n",
+ "n2 = 0.79; \t\t\t#volume % of nitrogen in air\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "#To calculate entropy of 1 kmol of air\n",
+ "#Using equation 4.35 (Page no. 96)\n",
+ "S = (-R*(n1*math.log(n1)+n2*math.log(n2))); \t\t\t#[kJ/kmol K]\n",
+ "\n",
+ "# Results\n",
+ "print 'The total entropy change is %f kJ/kmol K'%S\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is 4.273036 kJ/kmol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in entropy for the reaction\n",
+ "\n",
+ "# Variables\n",
+ "H = -2.8318*10**5; \t\t\t#heat of reaction (J/mol)\n",
+ "T = 298.; \t\t\t#temperature of reaction in K\n",
+ "#Absolute entropies for CO, O2, CO2 are (in J/mol K)\n",
+ "S_CO = 198.;\n",
+ "S_O2 = 205.2;\n",
+ "S_CO2 = 213.8;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# To determine the change in entropy for the reaction\n",
+ "# Referring equation 4.36 (Page no. 96)\n",
+ "S_reactant = S_CO + 0.5*S_O2; \t\t\t#entropy change for reactants\n",
+ "S_product = S_CO2; \t\t\t#entropy change for products\n",
+ "S = S_product-S_reactant; \t\t\t#total entropy change\n",
+ "print 'The total entropy change for the reaction is %f J/mol'%S\n",
+ "print 'Since the reaction is highly irreversible, entropy change cannot be calculated as the ratio of heat of reaction to the temperature'\n",
+ "\n",
+ "#The energy available for useful work is the difference between heat of reaction and entropy energy due to ireversible nature of the process\n",
+ "W_useful = -H+(T*S); \t\t\t#energy available for useful work (J)\n",
+ "print 'Energy available for useful work is %3.2e J'%W_useful\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change for the reaction is -86.800000 J/mol\n",
+ "Since the reaction is highly irreversible, entropy change cannot be calculated as the ratio of heat of reaction to the temperature\n",
+ "Energy available for useful work is 2.57e+05 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate change in entropy and check whether the process is reversible\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "H_steam = 2923.5; \t\t\t#enthalpy of superheated steam (kJ/kg)\n",
+ "S_steam = 6.71; \t\t\t#entropy of superheated steam (kJ/kg K)\n",
+ "H_liquid = 845.; \t\t\t#enthalpy of saturated liquid (kJ/kg)\n",
+ "S_liquid = 2.32; \t\t\t#entropy of saturated liquid (kJ/kg K)\n",
+ "T = 300.; \t\t\t#temperature of system (K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate change in entropy and check whether the process is reversible\n",
+ "S_system = S_liquid-S_steam; \t\t\t#change in entropy of steam\n",
+ "\n",
+ "#Let Q be the heat given out during condensation\n",
+ "Q = -(H_liquid-H_steam);\n",
+ "S_surrounding = Q/T; \t\t\t#change in entropy of the surrounding\n",
+ "S_total = S_system+S_surrounding; \t\t\t#total entropy change\n",
+ "\n",
+ "# Results\n",
+ "print 'The total entropy change is %f kJ/kg'%S_total\n",
+ "print 'Since total entropy change is positive,the process is irreversible'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is 2.538333 kJ/kg\n",
+ "Since total entropy change is positive,the process is irreversible\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the change in entropy of system\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "V = 1.; \t\t\t#volume of each compartment in cubic meters\n",
+ "P_sat = 683.6; \t\t#pressure of saturated steam (kPa)\n",
+ "P_steam = 101.3; \t#pressure of supereated steam (kPa)\n",
+ "T_sat = 437.2; \t\t#temperature of system (K)\n",
+ "\n",
+ "#Referring steam tables\n",
+ "#For saturated steam at pressure 683.6 kPa and temp 437.2 K\n",
+ "H_sat = 2761.; \t\t\t #enthalpy of saturated steam (kJ/kg)\n",
+ "S_sat = 6.7133; \t\t\t#entropy of saturated steam (kJ/kg K)\n",
+ "spvol_sat = 278.9*10**-3; \t#specific volume of saturated steam (cubic m/kg)\n",
+ "U_sat = 2570.4; \t\t\t#specific internal energy of saturated steam (kJ/kg)\n",
+ "\n",
+ "#For superheated steam at 101.3 kPa and 437.2 K\n",
+ "H_steam = 2804.; \t\t\t #enthalpy of superheated steam (kJ/kg)\n",
+ "S_steam = 7.6712; \t\t\t #entropy of superheated steam (kJ/kg K)\n",
+ "spvol_steam = 1976.2*10**-3; \t#specific volume of superheated steam (cubic m /kg)\n",
+ "U_steam = 2603.3; \t\t\t #specific internal energy of superheated steam (kJ/kg)\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the change in entropy of system\n",
+ "m_sat = V/spvol_sat; \t\t\t#mass of satureated steam(kg)\n",
+ "m_steam = V/spvol_steam; \t\t#mass of superheated steam (kg)\n",
+ "m_sys = m_sat+m_steam; \t\t\t#mass of system (kg)\n",
+ "spvol_sys = (2.*V)/m_sys; \t\t#specific volume of system (cubic m/kg)\n",
+ "\t\t\t#Since no heat exchange and work interaction occurs so internal energy after mixing remains the same\n",
+ "U1_sat = m_sat*U_sat; \t\t\t #internal energy of saturated steam (kJ)\n",
+ "U1_steam = m_steam*U_steam; \t #internal enegy of superheated steam (kJ)\n",
+ "U_sys = (U1_sat+U1_steam)/m_sys; \t#specific internal energy of system (kJ/kg)\n",
+ "\n",
+ "#Referring steam tables\n",
+ "#At calculated U_sys and spvol_sys\n",
+ "S_sys = 6.9992; \t\t\t #specific entropy of system (kJ/kg K)\n",
+ "Si = ((m_sat*S_sat)+(m_steam*S_steam)); #initial entropy of system (kJ/K)\n",
+ "Sf = (m_sys*S_sys); \t\t\t #final entropy of system (kJ/K)\n",
+ "S = Sf-Si; \t\t\t #change in entropy\n",
+ "\n",
+ "# Results\n",
+ "print 'The change in entropy of the system is %f kJ/K'%S\n",
+ "print 'Since entropy change is positive, the process is irrevresible'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in entropy of the system is 0.685052 kJ/K\n",
+ "Since entropy change is positive, the process is irrevresible\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate entropy change\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "V = 1.; \t\t\t#volume of each compartment in cubic m\n",
+ "T = 300.; \t\t\t#temperature of ideal gas in 1st compartment (K)\n",
+ "P = 200.; \t\t\t#pressure of ideal gas in 1st compartment (kPa)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate entropy change\n",
+ "#Let n be the number of moles of gas\n",
+ "n = ((P*V)/(R*T));\n",
+ "#Since gas in vessel exchanges no heat and work with surrounding so internal energy remains same\n",
+ "#This implies temperature after mixing is same as that before mixing\n",
+ "\n",
+ "#Final conditions:\n",
+ "Tf = 300.; \t\t\t#final temperature (K)\n",
+ "Vf = 2.; \t\t\t#final volume (cubic m)\n",
+ "Pf = 100.; \t\t\t#final pressure (kPa)\n",
+ "\n",
+ "#Initial conditions:\n",
+ "Ti = 300.; \t\t\t#initial temperature (K)\n",
+ "Vi = 1.; \t\t\t#initial volume (cubic m)\n",
+ "Pi = 200.; \t\t\t#initial pressure (kPa)\n",
+ "import math\n",
+ "#Using equation 4.33 (Page num 94)\n",
+ "S = n*R*math.log(Vf/Vi); \t\t\t#entropy change of system (kJ/K)\n",
+ "#Since entropy of surrounding does not change\n",
+ "S_total = S; \t\t\t#total entropy change\n",
+ "\n",
+ "# Results\n",
+ "print 'The change in total entropy is %f kJ/K'%S_total\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in total entropy is 0.462098 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate entropy change in the process\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m_oil = 5000.; \t\t\t#mass flow rate of oil (kg/h)\n",
+ "Tin_oil = 500.; \t\t\t#inlet temperature of oil (K)\n",
+ "Tin_water = 295.; \t\t\t#inlet temperature of water (K)\n",
+ "c_oil = 3.2; \t\t\t#specific heat of oil (kJ/kg K)\n",
+ "c_water = 4.2; \t\t\t#specific heat of water (kJ/kg K)\n",
+ "import math\n",
+ "#To calculate entropy change in the process\n",
+ "#Assuming oil is cooled to minimum permissible temperature\n",
+ "Tout_oil = 305.; \t\t\t#exit temperature of oil (K)\n",
+ "Tout_water = 490.; \t\t\t#exit temperature of water (K)\n",
+ "\n",
+ "# Calculations\n",
+ "#Let m_water be the mass flow rate of water\n",
+ "#By enthalpy balance\n",
+ "m_water = ((m_oil*c_oil*(Tin_oil-Tout_oil))/(c_water*(Tout_water-Tin_water))); \t\t\t#(kg/h)\n",
+ "S_oil = m_oil*c_oil*math.log(Tout_oil/Tin_oil); \t\t\t#entropy change of oil (kJ/K)\n",
+ "S_water = m_water*c_water*math.log(Tout_water/Tin_water); \t\t\t#entropy change of water (kJ/K)\n",
+ "S_tot = S_oil+S_water; \t\t\t#total entropy change\n",
+ "\n",
+ "# Results\n",
+ "print 'The total entropy change in the process is %f kJ/K'%S_tot\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change in the process is 210.139407 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate loss in capacity of doing work\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "To = 275.; \t\t\t#temperature of quenching oil (K)\n",
+ "\n",
+ "# Calculations\n",
+ "S_steel = -26.25; \t\t\t#change in entropy os casting (kJ/K)\n",
+ "S_oil = 43.90; \t\t\t#change in entropy of oil (kJ/K)\n",
+ "S_tot = S_steel+S_oil; \t\t\t#total entropy change\n",
+ "#Let W be loss in capacity for doing work\n",
+ "W = To*S_tot; \t\t\t#(kJ)\n",
+ "\n",
+ "# Results\n",
+ "print 'The loss in capacity for doing work is %f kJ'%W\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loss in capacity for doing work is 4853.750000 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate total change in entropy and available work\n",
+ "\n",
+ "import math\n",
+ "#Given:\n",
+ "m_oil = 5000.; \t\t\t #mass flow rate of hydrocarbon oil (kg/h)\n",
+ "Tin_oil = 425.; \t\t\t#inlet temperature of oil (K)\n",
+ "Tout_oil = 340.; \t\t\t#exit temperature of oil (K)\n",
+ "m_water = 10000.; \t\t\t#mass flow rate of water (kg/h)\n",
+ "Tin_water = 295.; \t\t\t#inlet temperature of water (K)\n",
+ "c_oil = 2.5; \t\t\t #mean specific heat of oil (kJ/kg K)\n",
+ "c_water = 4.2; \t\t\t #mean specific heat of water (kJ/kg K)\n",
+ "\n",
+ "#To determine total change in entropy and available work\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)\n",
+ "#By energy balance\n",
+ "Tout_water = ((m_oil*c_oil*(Tin_oil-Tout_oil))/(m_water*c_water))+295; \t\t\t#exit temperature of water (K)\n",
+ "S_oil = m_oil*c_oil*math.log(Tout_oil/Tin_oil); \t\t\t#change in entropy of oil (kJ/K)\n",
+ "S_water = m_water*c_water*math.log(Tout_water/Tin_water); \t\t\t#change in entropy of water (kJ/K)\n",
+ "S_tot = S_oil+S_water; \t\t\t#total entropy change\n",
+ "print 'The total entropy change is %f kJ/K'%S_tot\n",
+ "\n",
+ "\n",
+ "#(b)\n",
+ "To = 295.; \t\t\t#temperature at which heat is rejected to surrounding (K)\n",
+ "#Let Q be heat given out by the oil on cooling\n",
+ "Q = m_oil*c_oil*(Tin_oil-Tout_oil);\n",
+ "#Heat rejected to the surrounding at To by the Carnot Engine is given by\n",
+ "#Q2 = To(Q/T) = -To*S_oil\n",
+ "Q2 = -To*S_oil; \t\t\t#(kJ)\n",
+ "#Let W be the work output of engine\n",
+ "W = Q-Q2;\n",
+ "print 'The work output of the engine would be %4.3e kJ'%W\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total entropy change is 666.266812 kJ/K\n",
+ "The work output of the engine would be 2.397e+05 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the molar entropy of metal\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 10.; \t\t\t#temperature of metal (K)\n",
+ "Cp = 0.45; \t\t\t#molar heat capacity at 10 K (J/mol K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the molar entropy of metal\n",
+ "#Entropy of solid at 10 K is calculated using first integral in equation 4.55 (Page no. 108)\n",
+ "S = Cp/3;\n",
+ "\n",
+ "# Results\n",
+ "print 'Molar entropy of meatl at 10 K is %f J/mol K'%S\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molar entropy of meatl at 10 K is 0.150000 J/mol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the absolute entropy of water vapour\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 473.; \t\t\t#temperature at entropy is to be determined (K)\n",
+ "Tf = 273.; \t\t\t#base temperature (K)\n",
+ "Tb = 373.; \t\t\t#boiling temperature (K)\n",
+ "Cpl = 4.2; \t\t\t#avearge heat capacity of water (kJ/kg K)\n",
+ "Cpg = 1.9; \t\t\t#avearge heat capacity of water vapour between 373 K and 473 K\n",
+ "Hv = 2257.; \t\t\t#latent heat of vaporisation at 373 K (kJ/kg)\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "S = (Cpl*math.log(Tb/Tf))+(Hv/Tb)+(Cpg*math.log(T/Tb));\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print 'Absolute entropy of water vapour at 473 K and 101.3 kPa is %f kJ/kg K'%S\n",
+ "print 'It compares favourably with the value reported in steam tables'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute entropy of water vapour at 473 K and 101.3 kPa is 7.813068 kJ/kg K\n",
+ "It compares favourably with the value reported in steam tables\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb
new file mode 100644
index 00000000..aa03f112
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch5.ipynb
@@ -0,0 +1,1393 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Some Applications of the Laws of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the pressure at exit\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "u1 = 1; \t\t\t #entering velocity of water (m/s)\n",
+ "d_ent = 0.2; \t\t\t#entrance diameter of reducer (m)\n",
+ "d_exit = 0.1; \t\t\t#exit diameter of reducer (m)\n",
+ "P_ent = 105; \t\t\t#pressure at entrance (kPa)\n",
+ "z = 5; \t\t\t #distance between entrance and exit (m)\n",
+ "g = 9.81; \t\t\t #acceleration due to gravity \n",
+ "den = 1000; \t\t\t#density of water (kg/m**3)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the pressure at exit\n",
+ "A1 = (math.pi/4)*d_ent**2; \t\t\t #cross section area of entrance (m**2)\n",
+ "A2 = (math.pi/4)*d_exit**2; \t\t\t#cross section area of exit (m**2)\n",
+ "\n",
+ "#By the equation of continuity and since density of water remains constant\n",
+ "u2 = (A1*u1)/A2;\n",
+ "\n",
+ "#By Bernoulli's equation between section 1 and 2 (Eq 5.20 Page no. 118)\n",
+ "P_exit = (-((u2**2-u1**2)/2)-(g*z)+(P_ent*10**3/den))*(den/10**3)\n",
+ "\n",
+ "# Results\n",
+ "print 'The pressure at exit is %f kPa'%P_exit\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure at exit is 48.450000 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine quality of steam flowing through the pipe\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P = 1000.; \t\t\t#pressure of saturated steam (kPa)\n",
+ "T = 398.; \t\t\t#temperature of escaping steam (K)\n",
+ "\n",
+ "#Referring steam tables\n",
+ "H_vap = 2778.; \t\t\t#enthalpy of saturated vapour at 1000 kPa (kJ/kg)\n",
+ "H_liq = 763.; \t\t\t#enthalpy of saturated liquid at 1000 kPa (kJ/kg)\n",
+ "H_steam = 2726.; \t\t#enthalpy of superheated steam at 398 K (kJ/kg)\n",
+ "H2 = 2726; \t\t\t #[kJ/kg]\n",
+ "\n",
+ "# Calculations\n",
+ "#No work is done and no heat is exchanged between section 1 and 2\n",
+ "#S0% H1 = H2\n",
+ "x = (H2-H_vap)/(H_liq-H_vap)\n",
+ "\n",
+ "# Results\n",
+ "print 'The steam contains %f percent liquid'%(x*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The steam contains 2.580645 percent liquid\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page no:123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the discharge velocity\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m = 10.; \t\t\t#mass flow rate of steam (kg/s)\n",
+ "H1 = 3062.; \t\t\t#enthalpy of entering steam (kJ/kg)\n",
+ "H2 = 2875.; \t\t\t#enthalpy of discharged steam (kJ/kg)\n",
+ "Q = -100./m; \t\t\t#heat loss to the surrounding (kJ/kg)\n",
+ "u1 = 0.; \t\t\t#entering velocity of steam\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "H = H2-H1;\n",
+ "u2 = math.sqrt((Q-H)*1000*2)\n",
+ "\n",
+ "# Results\n",
+ "print 'The discharge velocity is %i m/s'%u2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The discharge velocity is 594 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page no:125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine thermodynamic properties at throat and critical pressure\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "To = 600.; \t\t\t#temperature of air (K)\n",
+ "Po = 2000.; \t\t\t#pressure of air (kPa)\n",
+ "gama = 1.4;\n",
+ "M = 0.8; \t\t\t#Mach number at throat\n",
+ "m = 29.; \t\t\t#molecular mass of air\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "#To determine thermodynamical properties at throat and critical pressure\n",
+ "import math\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)\n",
+ "#Using equation 5.40 (Page no 123).. u**2 = (M**2)*gama*P*V\n",
+ "#Substituting this in eq. 5.39 (Page no. 123) and on rearranging we get\n",
+ "P = Po/((1+(((gama-1)/2)*M**2))**(gama/(gama-1)))\n",
+ "#Using eq. 5.39 and the relation PoVo = RTo/m\n",
+ "u = math.sqrt((2*gama*R*To*1000)/(m*(gama-1))*(1-(P/Po)**((gama-1)/gama)))\n",
+ "#Using eq. 3.23 (Page no. 49)\n",
+ "T = To*(P/Po)**((gama-1)/gama)\n",
+ "#Let d be the density\n",
+ "d_o = (Po*m)/(R*To)\n",
+ "#Since P*(V**gama) = P/(den**gama) = constant...so\n",
+ "d = d_o*((P/Po)**(1/gama))\n",
+ "print '(a). At throat'\n",
+ "print 'Pressure = %i kPa'%P\n",
+ "print 'Temperature = %i K'%T\n",
+ "print 'Velocity = %f m/s'%u\n",
+ "print 'Density = %f kg/cubic m'%d\n",
+ "\n",
+ "#(b)\n",
+ "#Using eq. 5.42 (Page no.124)\n",
+ "Pc = Po*((2/(gama+1))**(gama/(gama-1))) \t\t\t#critical pressure\n",
+ "print '(b).'\n",
+ "print 'The critical pressure is %f kPa'%Pc\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). At throat\n",
+ "Pressure = 1312 kPa\n",
+ "Temperature = 531 K\n",
+ "Velocity = 369.641813 m/s\n",
+ "Density = 8.603873 kg/cubic m\n",
+ "(b).\n",
+ "The critical pressure is 1056.563575 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate work required and temperature after compression\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 1.; \t\t\t#initial pressure (bar)\n",
+ "T1 = 300.; \t\t\t#initial temperature (K)\n",
+ "P2 = 10.; \t\t\t#final pressure (bar)\n",
+ "gama = 1.3; \t\t\t#gama for CO2\n",
+ "V_rate = 100.; \t\t\t#volumetric flow rate (m**3/h)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate work required and temperature after compression\n",
+ "Ws = (gama/(gama-1))*P1*10**5*(V_rate/3600)*(1-(P2/P1)**((gama-1)/gama))\n",
+ "print 'The work required is %f kW'%(-Ws/1000)\n",
+ "\n",
+ "#Using equation 3.23 (Page no.49)\n",
+ "T2 = T1*((P2/P1)**((gama-1)/gama))\n",
+ "print 'Temperature of gas after compression is %f K'%T2\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work required is 8.441024 kW\n",
+ "Temperature of gas after compression is 510.376284 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate work required and temperature\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 100.; \t\t\t#initial pressure of saturated steam (kPa)\n",
+ "P2 = 500.; \t\t\t#final pressure (kPa)\n",
+ "eff = 0.8; \t\t\t#compression efficiency\n",
+ "\n",
+ "#Referring steam tables\n",
+ "#Properties of steam entering the compressor\n",
+ "H1 = 2675.5; \t\t\t#enthalpy (kJ/kg)\n",
+ "S1 = 7.3594; \t\t\t#entropy (kJ/kg K)\n",
+ "\n",
+ "#Properties of compressed steam\n",
+ "H2 = 3008.; \t\t\t#enthalpy (kJ/kg)\n",
+ "S2 = S1; \t\t\t#isentropic compression\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate work required and temperature\n",
+ "\n",
+ "Hs = H2-H1;\n",
+ "#Using eq. 5.44 (Page no. 128)\n",
+ "W_isentropic = -Hs;\n",
+ "W_act = W_isentropic/eff;\n",
+ "print 'The work required for compression is %f kJ/kg'%-W_act\n",
+ "\n",
+ "H = Hs/eff; \t\t\t#actual change in enthalpy\n",
+ "H_act = H1+H; \t\t\t#actual enthalpy of steam leaving the compressor\n",
+ "#From steam tables for superheated steam at 500 kPa and enthalpy of H_act\n",
+ "T = 586; \t\t\t#temperature (K)\n",
+ "print 'Temperature of exhaust steam is %i K'%T\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work required for compression is 415.625000 kJ/kg\n",
+ "Temperature of exhaust steam is 586 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the least amount of power\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 288.; \t\t\t#temperature of surrounding (K)\n",
+ "T2 = 261.; \t\t\t#temperature of solution (K)\n",
+ "Q2 = 1000.; \t\t\t#heat removed (kJ/min)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the least amount of power\n",
+ "#Using eq. 5.57 (Page no. 137)\n",
+ "W = Q2*((T1-T2)/T2 )\t\t\t#power in kJ/min\n",
+ "P = (W*1000)/(746.*60) \t\t\t#power in hp\n",
+ "\n",
+ "# Results\n",
+ "print 'Least amount of power necessary is %f hp'%P"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least amount of power necessary is 2.311177 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine COP heat rejected and lowest temperature\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T = 290.; \t\t\t#operating temperature (K)\n",
+ "W = 1000.; \t\t\t#work (J)\n",
+ "tof = 3516.67; \t\t\t#ton of refrigeration (W)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine COP, heat rejected and lowest temperature\n",
+ "#(a)\n",
+ "Q2 = tof;\n",
+ "COP = Q2/W; \t\t\t#coeffecient of performance\n",
+ "print '(a). COP is %f'%COP\n",
+ "\n",
+ "#(b)\n",
+ "Q1 = Q2+W; \t\t\t#heat rejected\n",
+ "print ' (b). Heat rejected is %f kW'%(Q1/1000.)\n",
+ "\n",
+ "#(c)\n",
+ "#Let T2 be the lowest temperature\n",
+ "T2 = T*(Q2/Q1);\n",
+ "print ' (c). Lowest possible temperature in refrigerator is %f K'%T2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). COP is 3.516670\n",
+ " (b). Heat rejected is 4.516670 kW\n",
+ " (c). Lowest possible temperature in refrigerator is 225.793405 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine COP at given conditions\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T2 = 266.;\n",
+ "T1 = 300.; \t\t\t#operating temperatures of vapour compression refrigeration cycle(K)\n",
+ "\n",
+ "#To determine COP at given conditions\n",
+ "#(a)\n",
+ "Ha = 656.; \t\t\t#(kJ/kg)\n",
+ "Hb = 724.; \t\t\t#(kJ/kg)\n",
+ "Hd = 144.; \t\t\t#(kJ/kg)\n",
+ "Hc = Hd;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Using eq. 5.61 (Page no. 139)\n",
+ "COP = (Ha-Hd)/(Hb-Ha);\n",
+ "print '(a). COP = %f'%COP\n",
+ "\n",
+ "#(b)\n",
+ "Ha = 652.; \t\t\t#(kJ/kg)\n",
+ "Hb = 758.; \t\t\t#(kJ/kg)\n",
+ "Hd = 159.; \t\t\t#(kJ/kg)\n",
+ "Hc = Hd;\n",
+ "eff = 0.75; \t\t\t#efficiency of compressor\n",
+ "COP = (Ha-Hd)/((Hb-Ha)*(1./eff));\n",
+ "print ' (b). COP = %f'%COP\n",
+ "\n",
+ "#(c). Ideal Carnot refrigerator\n",
+ "COP = T2/(T1-T2);\n",
+ "print ' (c). COP = %f'%COP\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). COP = 7.529412\n",
+ " (b). COP = 3.488208\n",
+ " (c). COP = 7.823529\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.12 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine power requirement and refrigeration capacity in tonnes\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "Tin_cool = 288.; \t\t\t#entering temperature of cooling water (K)\n",
+ "Tout_cool = 300.; \t\t\t#discharge temperature of cooling water (K)\n",
+ "m_c = 0.25; \t\t\t#mass flow rate of coling water (kg/s)\n",
+ "m = 0.5; \t\t\t#mass flow rate of ammonia (kg/min)\n",
+ "Ha = 1426.; \t\t\t#enthalpy of saturated ammonia vapour at 258 K (kJ/kg)\n",
+ "Hd = 281.5; \t\t\t#enthalpy of liquid ammonia at 294 K (kJ/kg)\n",
+ "eff = 0.9; \t\t\t#compressor efficiency\n",
+ "Cp = 4.2; \t\t\t#specific heat of water (kJ/kg K)\n",
+ "tof = 12660.; \t\t\t#ton of refrigeration (kJ/h)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine the power requirement and refrigeration capacity in tons\n",
+ "Q1 = m_c*Cp*(Tout_cool-Tin_cool); \t\t\t#heat rejected by compressor at constant pressure (kJ/s)\n",
+ "Q2 = (m/60.)*(Ha-Hd); \t\t\t#heat absorbed (kJ/s)\n",
+ "W = Q1-Q2; \t\t\t#work required (kJ/s)\n",
+ "P = (W*1000)/(eff*746); \t\t\t#power requirement of compressor (hp)\n",
+ "print 'Power requirement of the compressor is %f hp'%P\n",
+ "\n",
+ "rc = Q2*3600/tof; \t\t\t#refrigeration capacity (ton)\n",
+ "print ' Refrigeration capacity is %f ton'%rc\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power requirement of the compressor is 4.561364 hp\n",
+ " Refrigeration capacity is 2.712085 ton\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the COP and refrigeration circulation rate\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m1 = 10.; \t\t\t#machine rating (ton)\n",
+ "#Since 5 K approach is necessary\n",
+ "T1 = 293.+5; \t\t\t#temperature of cooling water (K)\n",
+ "T2 = 261.-5; \t\t\t#temperature of cold storage (K)\n",
+ "Ha = 181.; \t\t\t#enthalpy of saturated vapour at 256 K (kJ/kg)\n",
+ "Sa = 0.714; \t\t\t#entropy of saturated vapour at 256K (kJ/kg K)\n",
+ "Hc = 62.; \t\t\t#enthalpy of saturated liquid at 298 K (kJ/kg)\n",
+ "Sc = 0.231; \t\t\t#entropy of saturated liquid at 298 K (kJ/kg K)\n",
+ "Hb = 206.; \t\t\t#enthalpy of superheated vapour (kJ/kg)\n",
+ "Sb = 0.714; \t\t\t#entropy of superheated vapour (kJ/kg)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Combining the three relations, we get\n",
+ "Sd = Sc; \t\t\t#isentropic process\n",
+ "Hd = Ha-(T2*(Sa-Sd));\n",
+ "\n",
+ "#Using eq. 5.64 (Page no. 141)\n",
+ "COP = (Ha-Hd)/((Hb-Hc)-(Ha-Hd));\n",
+ "print 'COP = %f'%COP\n",
+ "\n",
+ "#Using equation 5.63 (Page no. 140)\n",
+ "m = (12660*m1)/(Ha-Hd); \t\t\t#refrigerant circulation rate (kg/h)\n",
+ "print ' Refrigerant circulation rate is %f kg/h'%m\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP = 6.075472\n",
+ " Refrigerant circulation rate is 1023.874224 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the COP and air circulation rate\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "m1 = 10.; \t\t\t#machine rating (ton)\n",
+ "#Assuming 5 K approach in refrigerator and cooler\n",
+ "Ta = 261.-5; \t\t\t#temperature of air leaving the refrigerator (K)\n",
+ "Tc = 293.+5; \t\t\t#temperature of air leaving the cooler (K)\n",
+ "gama = 1.4;\n",
+ "Cp = 1.008; \t\t\t#sp. heat of air (kJ/kg K)\n",
+ "P1 = 4.052;\n",
+ "P2 = 1.013; \t\t\t#operating pressures in bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine the COP and air circulation rate\n",
+ "#Using eq. 5.66 (Page no. 145)\n",
+ "Tb = Ta*(P1/P2)**((gama-1)/gama)\n",
+ "Td = (Tc*Ta)/Tb;\n",
+ "\n",
+ "#Using equation 5.68 (PAge no. 146)\n",
+ "COP = Ta/(Tb-Ta)\n",
+ "print 'COP = %f'%COP\n",
+ "\n",
+ "#Considering energy balance in refrigerator [m*Cp*(Ta-Td) = m1*12660]\n",
+ "m = (m1*12660)/(Cp*(Ta-Td)) \t\t\t#air circulation rate (kg/h)\n",
+ "print ' Air circulation rate is %i kg/h'%m\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP = 2.057637\n",
+ " Air circulation rate is 2264 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To verify that given heat pump is equivalent to 30 kW pump\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 300.; \t\t\t#indoor temperatur (K)\n",
+ "T2 = 290.; \t\t\t#outside temperature (K)\n",
+ "W_input = 1.; \t\t\t#1 kW heat pump\n",
+ "W_output = 30.; \t\t\t#given output (kW)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To verify that given heat pump is equivalent to 30 kW heater\n",
+ "Q2 = (T2/(T1-T2))*W_input; \t\t\t#heat absorbed\n",
+ "Q1 = Q2 + W_input; \t\t\t#heat rejected\n",
+ "\n",
+ "if(Q1==W_output):\n",
+ " print '1 kW pump if operated reversibly% is equivalent to a 30 kW heater'\n",
+ "else:\n",
+ " print 'The given heat pump is not equivalent to a 30 kW heater'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 kW pump if operated reversibly% is equivalent to a 30 kW heater\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the amount of fuel burned\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 295.; \t\t\t#temperature inside building (K)\n",
+ "T2 = 275.; \t\t\t#temperature of outside air (K)\n",
+ "eff = 0.25; \t\t\t#overall efficiency of unit\n",
+ "Hc = 890.9; \t\t\t#heat of combustion of fuel (kJ/mol)\n",
+ "conv = 0.33; \t\t\t#efficiency of conversion of heat of combustion to electricity\n",
+ "Q1 = 10**6; \t\t\t#amount of heat to be delivered\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the amount of fuel burned\n",
+ "COP = T1/(T1-T2)\n",
+ "W = Q1/COP; \t\t\t#work required to deliver Q1 kJ of heat\n",
+ "W_act = W/eff; \t\t\t#actual amount of electrical energy to be supplied\n",
+ "W_heat = W_act/conv; \t\t\t#heat energy required as heat of combustion\n",
+ "n = W_heat/Hc; \t\t\t#number of moles of fuel burned\n",
+ "\n",
+ "# Results\n",
+ "print 'The amount of fuel burned is %f kmol'%(n/1000)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of fuel burned is 0.922412 kmol\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate fraction of liquid in inlet stream and temperature\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "#Referring steam tables at 2.54 bar\n",
+ "H1 = 2717.; \t\t\t#enthalpy of saturated vapour (kJ/kg)\n",
+ "H2 = 538.; \t\t\t#enthalpy of saturated liquid (kJ/kg)\n",
+ "S1 = 7.05; \t\t\t#entropy of saturated vapour (kJ/kg K)\n",
+ "S2 = 1.61; \t\t\t#entropy of saturated liquid (kJ/kg K)\n",
+ "\n",
+ "H = 2700.; \t\t\t#enthalpy of superheated steam at 1 bar and 385 K (kJ/kg)\n",
+ "S = 7.42; \t\t\t#entropy of superheated steam at 1 bar and 385 K (kJ/kg K)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x = (H-H1)/(H2-H1)\n",
+ "#From steam tables\n",
+ "T = 401.; \t\t\t#temperature of steam (K)\n",
+ "print '(a). For isenthalpic math.expansion'\n",
+ "print ' The fraction of liquid in inlet stream is %f'%x\n",
+ "print ' The temperature of stream is %i K'%T\n",
+ "\n",
+ "#(b)..The math.expansion is isentropic\n",
+ "#Since entropy of saturated vapour at inlet pressure (S1) is less than entropy of steam leaving the turbine (S)\n",
+ "#So% the inlet stream is superheated% therefore\n",
+ "x = 0;\n",
+ "#From steam tales\n",
+ "T = 478.; \t\t\t#temperature of superheated steam having entropy of 7.42 kJ/kg K\n",
+ "print '(b). For isentropic math.expansion'\n",
+ "print ' The fraction of liquid in inlet stream is %i'%x\n",
+ "print ' The temperature of stream is %i K'%T\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). For isenthalpic math.expansion\n",
+ " The fraction of liquid in inlet stream is 0.007802\n",
+ " The temperature of stream is 401 K\n",
+ "(b). For isentropic math.expansion\n",
+ " The fraction of liquid in inlet stream is 0\n",
+ " The temperature of stream is 478 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine fraction of air liquified and temperature of air\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "#Referring Fig. 5.15 (Page no. 151)\n",
+ "Hc = 516.; \t\t\t#enthalpy of high pressure gas at 120 bar and 306 K (kJ/kg)\n",
+ "Ha = 526.; \t\t\t#enthalpy of low pressure gas at 2 bar and 292 K (kJ/kg)\n",
+ "Hf = 121.; \t\t\t#entalpy of saturated liquid at 2 bar (kJ/kg)\n",
+ "Hg = 314.; \t\t\t#enthalpy of saturated vapour at 2 bar (kJ/kg)\n",
+ "\n",
+ "#To determine the fraction of air liquified and temperature of air\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)..\n",
+ "#Using equation 5.73 (Page no. 152)\n",
+ "x = (Hc-Ha)/(Hf-Ha) \t\t\t#fraction of air liquified\n",
+ "print '(a). The fraction of liquified air is %f'%x\n",
+ "\n",
+ "#(b)..\n",
+ "#Taking enthalpy balance around heat exchanger\n",
+ "Hd = Hc - (1-x)*(Ha-Hg)\n",
+ "#At enthalpy of Hd kJ/kg% from T-S diagram for air\n",
+ "T = 167.; \t\t\t#temperature in K\n",
+ "print ' (b). Temperature of air on high pressure side of throttle valve is %i K'%T\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). The fraction of liquified air is 0.024691\n",
+ " (b). Temperature of air on high pressure side of throttle valve is 167 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine ideal Rankine cycle efficiency thermal efficiency and rate of steam production\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P2 = 2800.; \t\t\t#pressure of superheated steam (kPa)\n",
+ "P1 = 5.; \t\t\t#pressure after math.expansion (kPa)\n",
+ "e_turbine = 0.85; \t\t\t#isentropic turbine efficiency\n",
+ "e_pump = 0.8; \t\t\t#isentropic pump efficiency\n",
+ "V = 1.005*10**-3; \t\t\t#specific volume of saturated liquid at 5 kPaHl = \n",
+ "\n",
+ "#From steam tables:\n",
+ "Hl = 138.; \t\t\t#enthalpy of saturated liquid at 5 kPa (kJ/kg)\n",
+ "Hv = 2562.; \t\t\t#enthalpy of saturated vapour at 5 kPa (kJ/kg)\n",
+ "H3 = 3063.; \t\t\t#enthalpy of superheated steam at 2800 kPa and 598 K (kJ/kg)\n",
+ "Sl = 0.4764; \t\t\t#entropy of saturated liquid at 5 kPa (kJ/kg K)\n",
+ "Sv = 8.3951; \t\t\t#entropy of saturated vapour at 5 kPa (kJ/kg K)\n",
+ "S3 = 6.6875; \t\t\t#entropy of superheated steam at 2800 kPa and 598 K (kJ/kg K)\n",
+ " \n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine the ideal Rankine cycle efficiency% thermal efficiency and rate of steam production\n",
+ "\n",
+ "#(a)..The ideal Rankine cycle efficiency for the stated conditions\n",
+ "#Referring fig 5.19(b) (Page no. 155) and considering feed water pump\n",
+ "Ws = V*(P2-P1) \t\t\t#work done by pump (kJ/kg)\n",
+ "H2 = Hl+Ws;\n",
+ "#Considering isentropic math.expansion in turbine\n",
+ "S4 = S3;\n",
+ "x = (S4-Sl)/(Sv-Sl) \t\t\t#fraction of steam that is vapour\n",
+ "H4 = Hl + x*(Hv-Hl)\n",
+ "\t\t\t#Using eq. 5.80 (Page no. 155)\n",
+ "e_r = ((H3-H2)-(H4-Hl))/(H3-H2)\n",
+ "print '(a). The ideal Rankine cycle efficiency for the stated conditions is %i percent'%(e_r*100)\n",
+ "\n",
+ "#(b)..The thermal efficiency of plant\n",
+ "W_act = Ws/e_pump; \t\t\t#actual work requirement in pump\n",
+ "H_2 = Hl + W_act; \t\t\t#enthalpy of water leaving the feed water pump\n",
+ "W_out = e_turbine*(H3-H4) \t\t\t#actual work output\n",
+ "H_4 = H3-W_out; \t\t\t#actual enthalpy of steam leaving the turbine\n",
+ "e_act = ((H3-H_2)-(H_4-Hl))/(H3-H_2)\n",
+ "print ' (b). The actual efficiency is %f percent'%(e_act*100)\n",
+ "\n",
+ "#(c)..The rate of steam production\n",
+ "W_net = e_act*(H3-H_2) \t\t\t#net work output (kJ/kg)\n",
+ "rate = (3.6*10**6)/W_net; \t\t\t#steam produced in boiler (kg/h)\n",
+ "print ' (c). The rate of steam production is %f kg/h'%(rate)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). The ideal Rankine cycle efficiency for the stated conditions is 34 percent\n",
+ " (b). The actual efficiency is 29.664548 percent\n",
+ " (c). The rate of steam production is 4153.943111 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the work output thermal efficiency and rate of steam circulation\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P2 = 7600.; \t\t\t#pressure of superheated steam (kPa)\n",
+ "P1 = 5.; \t\t\t#pressure after math.expansion (kPa)\n",
+ "V = 1.005*10**-3; \t\t\t#specific volume of saturated liquid (m**3/kg)\n",
+ "\n",
+ "#From steam tables:\n",
+ "H_l1 = 138.; \t\t\t#enthalpy of saturated liquid at 5 kPa (kJ/kg)\n",
+ "S_l1 = 0.4764; \t\t\t#entropy of saturated liquid at 5 kPa (kJ/kg K)\n",
+ "H_v1 = 2562.; \t\t\t#enthalpy of saturated vapour at 5 kPa (kJ/kg)\n",
+ "S_v1 = 8.3951; \t\t\t#entropy of saturated vapour at 5 kPa (kJ/kg K)\n",
+ "H_l2 = 830.; \t\t\t#enthalpy of saturated liquid at 1400 kPa(kJ/kg)\n",
+ "S_l2 = 2.2842; \t\t\t#entropy of saturated liquid at 1400 kPa (kJ/kg K)\n",
+ "H_v2 = 2790.; \t\t\t#enthalpy of saturated vapour at 1400 kPa (kJ/kg)\n",
+ "S_v2 = 6.4693; \t\t\t#entropy of saturated vapour at 1400 kPa (kJ/kg K)\n",
+ "H5 = 3226.; \t\t\t#enthalpy of superheated steam at 1400 kPa and 658 K\n",
+ "S5 = 7.2558; \t\t\t#entropy of superheated steam at 1400 kPa and 658 K\n",
+ "H3 = 3150.; \t\t\t#enthalpy of superheated steam at 7600 kPa and 673 K\n",
+ "S3 = 6.4022; \t\t\t#entropy of superheated steam at 1400 kPa and 673 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Let the fraction of steam in vapour state be x\n",
+ "S4 = S3; \t\t\t#as the math.expansion process is isentropic\n",
+ "x = (S4-S_l2)/(S_v2-S_l2)\n",
+ "H4 = H_l2 + x*(H_v2-H_l2)\n",
+ "W_high = H3-H4;\n",
+ "\n",
+ "#For low pressure turbine\n",
+ "S6 = S5; \t\t\t#isentropic math.expansion\n",
+ "x = (S6-S_l1)/(S_v1-S_l1)\n",
+ "H6 = H_l1 + x*(H_v1-H_l1)\n",
+ "W_low = H5-H6;\n",
+ "\n",
+ "print '(a)'\n",
+ "print ' The work output of high pressure turbine is %i kJ/kg'%W_high\n",
+ "print ' The work output of low pressure turbine is %i kJ/kg'%W_low\n",
+ "\n",
+ "#(b)\n",
+ "#Work output of feed pump is [-Ws = intg(VdP)]\n",
+ "Ws = V*(P2-P1)\n",
+ "H2 = H_l1+Ws;\n",
+ "#Using eq. 5.82 (Page no. 159)\n",
+ "eff = ((H3-H2)+(H5-H4)-(H6-H_l1))/((H3-H2)+(H5-H4))\n",
+ "print ' (b)'\n",
+ "print ' Thermal efficiency is %f percent'%(eff*100)\n",
+ "\n",
+ "#(c)\n",
+ "#The numerator of eq. 5.82 gives net work output\n",
+ "W_net = (H3-H2)+(H5-H4)-(H6-H_l1)\n",
+ "#For 1000 kW of net work output\n",
+ "rate = 3.6*10**6/W_net;\n",
+ "print ' (c)'\n",
+ "print ' The rate of steam circulation is %f kg/h'%rate\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " The work output of high pressure turbine is 391 kJ/kg\n",
+ " The work output of low pressure turbine is 1012 kJ/kg\n",
+ " (b)\n",
+ " Thermal efficiency is 40.225451 percent\n",
+ " (c)\n",
+ " The rate of steam circulation is 2577.792156 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine fraction of steam withdrawn and thermal efficiency of cycle\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "P2 = 2800.; \t\t\t#pressure of superheated steam (kPa)\n",
+ "P1 = 275.; \t\t\t#pressure of withdrawn steam (kPa)\n",
+ "V = 1.070*10**-3; \t\t\t#specific volume of saturated liquid at 275 kPa\n",
+ "\n",
+ "#From steam tables:\n",
+ "H6 = 138.; \t\t \t#enthalpy of saturated liquid at 5 kPa\n",
+ "S6 = 0.4764; \t\t\t#entropy of saturated liquid at 5 kPa\n",
+ "H_v1 = 2562.; \t\t\t#enthalpy of saturated vapour at 5 kPa\n",
+ "S_v1 = 8.3951; \t\t\t#entropy of saturated vapour at 5 kPa\n",
+ "H1 = 549.; \t\t\t #enthalpy of saturated liquid at 275 kPa\n",
+ "S1 = 1.6408; \t\t\t#entropy of saturated liquid at 275 kPa\n",
+ "H_v2 = 2721.; \t\t\t#enthalpy of saturated vapour at 275 kPa\n",
+ "S_v2 = 7.0209; \t\t\t#entropy of saturated vapour at 275 kPa\n",
+ "H3 = 3063.; \t\t\t#enthalpy of superheated steam at 2800 kPa and 598 K\n",
+ "S3 = 6.6875; \t\t\t#entropy of superheated steam at 2800 kPa and 598 K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine the fraction of steam withdrawn and thermal efficiency of cycle\n",
+ "#Referring fig. 5.23 (Page no.161)\n",
+ "S4 = S3; \t\t\t#isentropic math.expansion\n",
+ "x = (S4-S1)/(S_v2-S1) \t\t\t#quality of steam\n",
+ "H4 = H1 + x*(H_v2-H1)\n",
+ "H7 = H6; \t\t\t #as the power input to the condensate pump is neglegible\n",
+ "\n",
+ "#Applying energy balance around feed water heater\n",
+ "m = (H1-H7)/(H4-H7 )\t\t\t#fraction of steam extracted\n",
+ "print 'Fraction of steam withdrawn is %f'%m\n",
+ "\n",
+ "W_in = V*(P2-P1) \t\t\t#work input to the feed water pump\n",
+ "H2 = H1+W_in;\n",
+ "#Considering isentropic math.expansion in turbine\n",
+ "S5 = S3;\n",
+ "x = (S5-S6)/(S_v1-S6)\n",
+ "H5 = H6 + x*(H_v1-H6)\n",
+ "#Using eq. 5.85 (Page no.162)\n",
+ "eff = ((H3-H2)-(1-m)*(H5-H6))/(H3-H2)\n",
+ "print ' Thermal efficiency is %f percent'%(eff*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fraction of steam withdrawn is 0.167865\n",
+ " Thermal efficiency is 36.999645 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine mean effective pressure\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "r = 8.; \t\t\t#compression ratio\n",
+ "T1 = 290.; \t\t\t#temperature at beginning (K)\n",
+ "P1 = 100.; \t\t\t#pressure at the beginning (kPa)\n",
+ "Q1 = 450.; \t\t\t#heat transferred per cycle (kJ/kg K)\n",
+ "Cp = 1.005; \t\t\t#specific heat of air (kJ/kg K)\n",
+ "Cv = 0.718; \t\t\t#specific heat of air (kJ/kg K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "M = 29.; \t\t\t#molecular wt of air\n",
+ "\n",
+ "#To determine mean effective pressure\n",
+ "#Basis:\n",
+ "m = 1.; \t\t\t#mass of air (kg)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a)\n",
+ "#Referring fig. 5.24 (Page no. 164)\n",
+ "V1 = (m*R*1000*T1)/(M*P1*10**3)\n",
+ "\n",
+ "#Conditions at state 2\n",
+ "V2 = V1/r;\n",
+ "gama = Cp/Cv;\n",
+ "T2 = T1*(r**(gama-1))\n",
+ "P2 = P1*(r**gama )\n",
+ "print '(a)'\n",
+ "print ' At the end of first process'\n",
+ "print ' Temperature = %f K'%T2\n",
+ "print ' Pressure = %f kPa'%P2\n",
+ "\n",
+ "#Conditions at state 3\n",
+ "#Constant volume process\n",
+ "V3 = V2;\n",
+ "T3 = Q1/Cv + T2;\n",
+ "P3 = (T3/T2)*P2;\n",
+ "print ' At the end of second process'\n",
+ "print ' Temperature = %f K'%T3\n",
+ "print ' Pressure = %f kPa'%P3\n",
+ "\n",
+ "#Conditions at state 4\n",
+ "T4 = T3/(r**(gama-1))\n",
+ "P4 = P3/(r**gama)\n",
+ "print ' At the end of third process'\n",
+ "print ' Temperature = %f K'%T4\n",
+ "print ' Pressure = %f kPa'%P4\n",
+ "Q2 = Cv*(T4-T1) \t\t\t#heat rejected during the constant volume process\n",
+ "\n",
+ "#(b)\n",
+ "#Using eq. 5.88 (Page no. 165)\n",
+ "eff = 1 - ((1./r)**(gama-1))\n",
+ "print ' (b)'\n",
+ "print ' Thermal efficiency is %f'%eff\n",
+ "\n",
+ "#(c)\n",
+ "W = Q1-Q2; \t\t\t#work done\n",
+ "print ' (c)'\n",
+ "print ' Work done is %f kJ/kg'%W\n",
+ "\n",
+ "#(d)\n",
+ "Pm = W/(V1-V2)\n",
+ "print ' (d)'\n",
+ "print ' Mean effective pressure is %f kPa'%Pm\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " At the end of first process\n",
+ " Temperature = 665.859247 K\n",
+ " Pressure = 1836.853096 kPa\n",
+ " At the end of second process\n",
+ " Temperature = 1292.600195 K\n",
+ " Pressure = 3565.793640 kPa\n",
+ " At the end of third process\n",
+ " Temperature = 562.962905 K\n",
+ " Pressure = 194.125140 kPa\n",
+ " (b)\n",
+ " Thermal efficiency is 0.564473\n",
+ " (c)\n",
+ " Work done is 254.012634 kJ/kg\n",
+ " (d)\n",
+ " Mean effective pressure is 349.170259 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine work done thermal effeciency and mean effective pressure\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "r = 15.; \t\t\t#compression ratio\n",
+ "P1 = 100.; \t\t\t#pressure in the beginning (kPa)\n",
+ "T1 = 300.; \t\t\t#temperature in thebeginning (K)\n",
+ "Q1 = 500.; \t\t\t#heat transfer rate (kJ/kg)\n",
+ "M = 29.; \t\t\t#molecular wt of air\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "gama = 1.3997214\n",
+ "#Specific heats of air (kJ/kg K)\n",
+ "Cp = 1.005;\n",
+ "Cv = 0.718;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine work done thermal efficiency and mean effective pressure\n",
+ "#(a)\n",
+ "#Isentropic compression 1-2\n",
+ "V1 = (R*1000*T1)/(M*P1*10**3)\n",
+ "T2 = T1*r**(gama-1)\n",
+ "P2 = P1*r**gama;\n",
+ "V2 = V1/r;\n",
+ "print '(a)'\n",
+ "print ' At the end of first process'\n",
+ "print ' Temperature = %f K'%T2\n",
+ "print ' Pressure = %f kPa'%P2\n",
+ "\n",
+ "#Consatnt pressure heat addition 2-3\n",
+ "T3 = Q1/Cp + T2;\n",
+ "V3 = (T3/T2)*V2;\n",
+ "P3 = P2;\n",
+ "print ' At the end of second process'\n",
+ "print ' Temperature = %f k'%T3\n",
+ "print ' Pressure = %f kPa'%P3\n",
+ "\n",
+ "#Isentropic math.expansion 3-4\n",
+ "V4 = V1;\n",
+ "T4 = T3/((V4/V3)**(gama-1))\n",
+ "P4 = P3*((V3/V4)**gama)\n",
+ "print ' At the end of third process'\n",
+ "print ' Temperature = %f K'%T4\n",
+ "print ' Pressure = %f kPa'%P4\n",
+ "Q2 = Cv*(T4-T1) \t\t\t#heat rejected 4-1\n",
+ "\n",
+ "#(b)\n",
+ "Wnet = Q1-Q2;\n",
+ "print ' (b)'\n",
+ "print ' Net work done per cycle per kg air is %f kJ/kg'%Wnet\n",
+ "\n",
+ "#(c)\n",
+ "eff = Wnet/Q1; \t\t\t#thermal efficiency\n",
+ "print ' (c)'\n",
+ "print ' Thermal efficiency is %f'%eff\n",
+ "\n",
+ "#(d)\n",
+ "Pm = Wnet/(V1-V2) \t\t\t#mean effective pressure\n",
+ "print ' (d)'\n",
+ "print ' Mean effective pressure is %f kPa'%Pm\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " At the end of first process\n",
+ " Temperature = 885.584689 K\n",
+ " Pressure = 4427.923445 kPa\n",
+ " At the end of second process\n",
+ " Temperature = 1383.097127 k\n",
+ " Pressure = 4427.923445 kPa\n",
+ " At the end of third process\n",
+ " Temperature = 559.936687 K\n",
+ " Pressure = 186.645562 kPa\n",
+ " (b)\n",
+ " Net work done per cycle per kg air is 313.365459 kJ/kg\n",
+ " (c)\n",
+ " Thermal efficiency is 0.626731\n",
+ " (d)\n",
+ " Mean effective pressure is 390.374167 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine temperature pressure work and thermal effeciency\n",
+ "\n",
+ "# Variables\n",
+ "#Given:\n",
+ "T1 = 300.; \t\t\t#initial temperature (K)\n",
+ "P1 = 100.; \t\t\t#initial pressure (kPa)\n",
+ "T3 = 1200.; \t\t\t#max temperature (K)\n",
+ "P3 = 500.; \t\t\t#max pressure (kPa)\n",
+ "Cp = 1.005; \t\t\t#(kJ/kg K)\n",
+ "Cv = 0.718; \t\t\t#(kJ/kg K)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To determine pressure and temperature work and thermal efficiency\n",
+ "gama = Cp/Cv;\n",
+ "\n",
+ "#(a)\n",
+ "P4 = P1;\n",
+ "P2 = P3;\n",
+ "#Isentropic compression 1-2\n",
+ "T2 = T1*((P2/P1)**((gama-1)/gama))\n",
+ "print '(a)'\n",
+ "print ' At the end of first process'\n",
+ "print ' Temperature = %f K'%T2\n",
+ "print ' Pressure = %f kPa'%P2\n",
+ "\n",
+ "#Process 2-3\n",
+ "print ' At the end of second process'\n",
+ "print ' Temperature = %f K'%T3\n",
+ "print ' Pressure = %f kPa'%P3\n",
+ "\n",
+ "#Isentropic math.expansion 3-4\n",
+ "T4 = T3/((P3/P4)**((gama-1)/gama))\n",
+ "print ' At the end of third process'\n",
+ "print ' Temperature = %f K'%T4\n",
+ "print ' Pressure = %f kPa'%P4\n",
+ "\n",
+ "#(b)\n",
+ "W_comp = Cp*(T2-T1) \t\t\t#work required by compressor\n",
+ "print ' (b)'\n",
+ "print ' Work required by compressor is %f kJ/kg'%W_comp\n",
+ "\n",
+ "#(c)\n",
+ "W_turb = Cp*(T3-T4 )\t\t\t#work done by turbine\n",
+ "print ' (c)'\n",
+ "print ' Work done by turbine is %f kJ/kg'%W_turb\n",
+ "\n",
+ "#(d)\n",
+ "eff = 1-(P1/P2)**((gama-1)/gama)\n",
+ "print ' (d)'\n",
+ "print ' Thermal efficiency is %f'%eff\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " At the end of first process\n",
+ " Temperature = 475.037193 K\n",
+ " Pressure = 500.000000 kPa\n",
+ " At the end of second process\n",
+ " Temperature = 1200.000000 K\n",
+ " Pressure = 500.000000 kPa\n",
+ " At the end of third process\n",
+ " Temperature = 757.835397 K\n",
+ " Pressure = 100.000000 kPa\n",
+ " (b)\n",
+ " Work required by compressor is 175.912379 kJ/kg\n",
+ " (c)\n",
+ " Work done by turbine is 444.375426 kJ/kg\n",
+ " (d)\n",
+ " Thermal efficiency is 0.368471\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb
new file mode 100644
index 00000000..056e7127
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch6.ipynb
@@ -0,0 +1,787 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Thermodynamic Properties of Pure Fluids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.1 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in entropy of system\n",
+ "\n",
+ "#Given:\n",
+ "betta = 1.25*10**-3; \t\t\t#coeffecient of math.expansion (K**-1)\n",
+ "V = 0.1; \t\t\t#molar volume of organic liquid (m**3/kmol)\n",
+ "P2 = 20.; \t\t\t#final pressure (bar)\n",
+ "P1 = 1.; \t\t\t#initial pressure (bar)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the change in entropy of system\n",
+ "#betta = (1/V)*(del V/del T)p\n",
+ "#Let k = (del V/del T)p\n",
+ "k = betta*V;\n",
+ "\n",
+ "#Considering Maxwell's relation Eq. 6.24 (Page no. 193)\n",
+ "#dS = -k*(dP)\n",
+ "S = -k*(P2-P1)*10**5; \t\t\t#entropy change (J/kmol K)\n",
+ "\n",
+ "# Results\n",
+ "print 'Change in entropy is %f J/kmol K'%S\n",
+ "print ' It is assumed that (del V/del T)p is constant in the pressure range 1 to 20 bar'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy is -237.500000 J/kmol K\n",
+ " It is assumed that (del V/del T)p is constant in the pressure range 1 to 20 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate vapour pressure of water at 363 K\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 363.; \t\t\t#temperature (K)\n",
+ "T2 = 373.; \t\t\t#temperature (K)\n",
+ "P2 = 101.3; \t\t\t#vapour pressure at 373 K (kPa)\n",
+ "H = 2275.*18; \t\t\t#mean heat of vaporisation (kJ/kmol)\n",
+ "R =8.314; \t\t\t#ideal gas constant (kJ/kmol K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate vapour pressure of water at 363 K\n",
+ "#Using eq. 6.28 (Page no. 196)\n",
+ "P1 = P2/(math.e**((H/R)*((1./T1)-(1./T2))))\n",
+ "\n",
+ "# Results\n",
+ "print ' Vapour pressure of water at 363 K is %f kPa'%P1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Vapour pressure of water at 363 K is 70.408579 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the melting point of mercury at 10 bar\n",
+ "\n",
+ "# Variables\n",
+ "d_l = 13.69*10**3; \t\t\t#density of mercury in liquid state (kg/m**3)\n",
+ "d_s = 14.193*10**3; \t\t\t#density of mercury in solid state (kg/m**3)\n",
+ "T1 = 234.33; \t\t\t#temperature in K\n",
+ "P1 = 1.; \t\t\t#initial pressure in bar\n",
+ "P2 = 10.; \t\t\t#final pressure in bar\n",
+ "Hf = 9.7876; \t\t\t#heat of fusion of mercury (kJ/kg)\n",
+ "\n",
+ "# Calculations\n",
+ "#Assuming del_V/del_H remains constant% math.log(T2/T1) = (del_V/del_H)*(P2-P1)\n",
+ "del_V = (1./d_l)-(1./d_s)\n",
+ "T2 = T1*(math.e**((del_V/Hf)*(P2-P1)))\n",
+ "\n",
+ "# Results\n",
+ "print 'The melting point of mercury at 10 bar is %f K'%T2\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The melting point of mercury at 10 bar is 234.330558 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.4, page no:198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate increase in entropy of solid magnesium\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 300.; \t\t\t#initial temperature (K)\n",
+ "T2 = 800.; \t\t\t#final temperature (K)\n",
+ "\n",
+ "# Calculations\n",
+ "#Heat capacity (J/mol K)\n",
+ "#Cp = 26.04+(5.586*10**-3*T)+(28.476*10**4*T**-2)\n",
+ "import math\n",
+ "S = 26.04*math.log(T2/T1)+5.586*10**-3*(T2-T1)+28.476*10**4/(-2)*(T2**-2-T1**-2)\n",
+ "\n",
+ "# Results\n",
+ "print 'The increase in entropy of solid magnesium is %f J/mol K'%S\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The increase in entropy of solid magnesium is 29.693325 J/mol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate internal energy enthalpy entropy and freenergy for 1 mole of nitrogen\n",
+ "\n",
+ "# Variables\n",
+ "T = 773.; \t\t\t#temperature (K)\n",
+ "P = 100.; \t\t\t#pressure (bar)\n",
+ "Ho = 0; \t\t\t#enthalpy of nitrogen at 273 K and 1 bar\n",
+ "So = 192.4; \t\t\t#entropy of nitrogen at 298 K and 1 bar\n",
+ "To = 273.; \t\t\t#(K)\n",
+ "Po = 1.; \t\t\t#(bar)\n",
+ "R = 8.314; \t\t\t#ideal gas constant (kJ/kmol K)\n",
+ "\n",
+ "# Calculations\n",
+ "#Cp = 27.3+(4.2*10**-3*T) molal heat capacity at 1 bar\n",
+ "#To calculate internal energy enthalpy entropy and free energyfor one mole of nitrogen\n",
+ "#Step 1:\n",
+ "#Assuming that nitrogen is initially at 273 K and 1 bar\n",
+ "#del_H1 = intg(CpdT)\n",
+ "del_H1 = 27.3*(T-To)+4.2*10**-3*(T**2-To**2)/2;\n",
+ "#Assuming that nitrogen is initially at 298 K and 1 bar\n",
+ "#del_S1 = intg(Cp*(dT/T))\n",
+ "del_S1 = 27.3*math.log(T/To)+4.2*10**-3*(T-To)\n",
+ "H1 = Ho + del_H1;\n",
+ "S1 = So + del_S1;\n",
+ "\n",
+ "#Step 2:\n",
+ "#del_H2 = [V - T*(del_V/del_T)p]dP\n",
+ "#Since nitrogen behaves as ideal gas\n",
+ "#(del_V/del_T)p = R/P% V-(R*T)/P = 0\n",
+ "del_H2 = 0.;\n",
+ "del_S2 = -R*math.log(P/Po)\n",
+ "H = H1 + del_H2;\n",
+ "S = S1 + del_S2;\n",
+ "\n",
+ "#Internal energy: U = H-PV = H-RT (J/mol)\n",
+ "U = H - (R*T)\n",
+ "\n",
+ "#Gibbs free energy (J/mol)\n",
+ "G = H-(T*S)\n",
+ "\n",
+ "# Results\n",
+ "print 'Enthalpy is %5.3e J/mol'%H\n",
+ "print ' Entropy is %f J/mol K'%S\n",
+ "print ' Internal energy is %4.3e J/mol'%U\n",
+ "print ' Gibbs free energy is %4.3e J/mol'%G\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy is 1.475e+04 J/mol\n",
+ " Entropy is 184.626653 J/mol K\n",
+ " Internal energy is 8.322e+03 J/mol\n",
+ " Gibbs free energy is -1.280e+05 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate entropy change and mean heat capacity\n",
+ "\n",
+ "# Variables\n",
+ "#Equation of state: P(V-B) = RT + (A*P**2)/T\n",
+ "Cp = 33.6; \t\t\t#mean specific heat at atmosheric pressure (J/mol K)\n",
+ "A = 1*10**-3; \t\t\t#m**3 K/(bar)mol\n",
+ "B = 8.0*10**-5; \t\t\t#m**3/mol\n",
+ "R = 8.314*10**-5; \t\t\t#ideal gas constant (m**3 (bar)/mol K)\n",
+ "\n",
+ "import math\n",
+ "#For step 1:\n",
+ "Po = 4.; \t\t\t#pressure at A (bar)\n",
+ "P1 = 1.; \t\t\t#pressure at C (bar)\n",
+ "T = 300.; \t\t\t#temperature (K)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#del_S1 = intg[(del_V/del_T)pdP]\n",
+ "del_S1 = (R*math.log(Po/P1) - (A/T**2)*(Po**2-P1**2)/2)*10**5; \t\t\t#(J/mol K)\n",
+ "\n",
+ "#For step 2:\n",
+ "T1 = 300.; \t\t\t#temperature at C (K)\n",
+ "T2 = 400.; \t\t\t#temperature at D (K)\n",
+ "del_S2 = Cp*math.log(T2/T1) \t\t\t#(J/mol K)\n",
+ "\n",
+ "#For step 3:\n",
+ "P2 = 1.; \t\t\t#pressure at D (bar)\n",
+ "P3 = 12.; \t\t\t#pressure at B (bar)\n",
+ "T = 400.; \t\t\t#temperature (K)\n",
+ "del_S3 = (R*math.log(P2/P3) - (A/T**2)*(P2**2-P3**2)/2)*10**5; \t\t\t#(J/mol K)\n",
+ "S = del_S1+del_S2+del_S3; \t\t\t#total entropy change\n",
+ "print '(a). Total entropy change is %f J/mol K'%S\n",
+ "\n",
+ "#(b). The mean heat capacity at 12 bar\n",
+ "P1 = 4.; \t\t\t#pressure at A (bar)\n",
+ "P2 = 12.; \t\t\t#pressure at Co (bar)\n",
+ "T = 300.; \t\t\t#temperature (K)\n",
+ "del_S1 = R*math.log(P1/P2) - (A/T**2)*(P1**2-P2**2)/2;\n",
+ "\n",
+ "#For CoB\n",
+ "T2 = 400.; \t\t\t#temperature at B (K)\n",
+ "T1 = 300.; \t\t\t#temperature at Co (K)\n",
+ "del_S2 = S-del_S1;\n",
+ "Cpm = del_S2/(math.log(T2/T1))\n",
+ "print ' (b). The mean heat capacity at 12 bar is %f J/mol K'%Cpm\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). Total entropy change is 0.568609 J/mol K\n",
+ " (b). The mean heat capacity at 12 bar is 1.976835 J/mol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate Cv for mercury\n",
+ "\n",
+ "# Variables\n",
+ "betta = 1.8*10**-4; \t\t\t#coeffecient of volume math.expansion (K**-1)\n",
+ "k = 3.9*10**-6; \t\t\t#coeffecient of compressibility (bar**-1)\n",
+ "T = 273.; \t\t\t#temperature in K\n",
+ "d = 13.596*10**3; \t\t\t#density (kg/m**3)\n",
+ "Cp = 0.14*10**3; \t\t\t#(J/kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate Cv for mercury\n",
+ "#Using equation 6.55 (Page no. 208)\n",
+ "Cv = Cp - (betta**2*T*10**5)/(k*d)\n",
+ "\n",
+ "# Results\n",
+ "print 'Cv for mercury is %f J/kg K'%Cv\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cv for mercury is 123.318623 J/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To estimate the fugacity of ammonia\n",
+ "\n",
+ "# Variables\n",
+ "#Eqution of state: P(V-b) = RT\n",
+ "P = 10.; \t\t\t#pressure (bar)\n",
+ "T = 298.; \t\t\t#temperature (K)\n",
+ "b = 3.707*10**-5; \t\t\t#Vander Waal's constant (m**3/mol)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To estimate the fugacity of ammonia\n",
+ "#Since PV = RT + Pb% Z = 1 + (Pb/RT)\n",
+ "#Using equation 6.127 (Page no. 228)\n",
+ "f = P*(math.e**((b*P*10**5)/(R*T)))\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity f = %f bar'%f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity f = 10.150747 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the fugacity of gas\n",
+ "\n",
+ "# Variables\n",
+ "#intg(alphadP) = -556.61 J/mol\n",
+ "P = 50.; \t\t\t#pressure in bar\n",
+ "T = 300.; \t\t\t#temperature in K\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the fugacity of gas\n",
+ "#Using equation 6.130 (Page no. 230)\n",
+ "f = P*math.e**(-556.61/(R*T))\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity of gas at 50 bar and 300 K is %i bar'%f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity of gas at 50 bar and 300 K is 39 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the fugacity coeffeceint at given pressure\n",
+ "\n",
+ "# Variables\n",
+ "#Equation of state: PV = RT(1-0.00513P)\n",
+ "P = [1, 5, 10]; \t\t\t#pressures in bar\n",
+ "phi = [0,0,0]\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(3):\n",
+ " phi[i] = math.e**(-0.00513*P[i])\n",
+ " print ' Fugacity coeffecient at %i bar is %f'%(P[i],phi[i])\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Fugacity coeffecient at 1 bar is 0.994883\n",
+ " Fugacity coeffecient at 5 bar is 0.974676\n",
+ " Fugacity coeffecient at 10 bar is 0.949994\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the fugacity of pure ethylene\n",
+ "\n",
+ "# Variables\n",
+ "P = 100.; \t\t\t#pressure in bar\n",
+ "T = 373.; \t\t\t#temperature in K\n",
+ "a = 0.453; \t\t\t#Vander Waal's constant (J m**3/mol**2)\n",
+ "b = 0.571*10**-4; \t\t\t#Vander Waal's constant (m**3/mol)\n",
+ "V = 2.072*10**-4; \t\t\t#molar volume (m**3/mol)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the fugacity of pure ethylene\n",
+ "#Using eq. 6.139 (Page no. 233)\n",
+ "ln_f = (b/(V-b)) - ((2*a)/(R*T*V)) + math.log((R*T*10**-5)/(V-b) )\n",
+ "f = math.e**ln_f;\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity is %f bar'%f\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity is 73.789328 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine fugacity and fugacity coeffecient of steam\n",
+ "\n",
+ "# Variables\n",
+ "T = 623.; \t\t\t#temperature in K\n",
+ "\n",
+ "#Data from steam tables:\n",
+ "H = 3159.; \t\t\t#enthalpy at 1000 kPa and 623 K (kJ/kg)\n",
+ "S = 7.3; \t\t\t#entropy at 1000 kPa and 623 K (kJ/kg K)\n",
+ "Ho = 3176.; \t\t\t#enthalpy at 101.3 kPa and 623 K (kJ/kg)\n",
+ "So = 8.38; \t\t\t#entropy at 101.3 kPa and 623 K (kJ/kg K)\n",
+ "fo = 101.3; \t\t\t#fugacity at 101.3 kPa (kPa)\n",
+ "R = 8.314/18; \t\t\t#ideal gas consatnt (kJ/kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine fugacity and fugacity coeffecient of steam\n",
+ "ln_phi = (1/(R*T))*((H-Ho)-T*(S-So))\n",
+ "f = fo*math.e**ln_phi;\n",
+ "phi = f/fo;\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity of steam is %f bar'%(f/100)\n",
+ "print ' Fugacity coeffecient is %f'%phi\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity of steam is 9.895333 bar\n",
+ " Fugacity coeffecient is 9.768345\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To estimate fugacity of ammonia\n",
+ "\n",
+ "# Variables\n",
+ "T = 473.; \t\t\t#temperature in K\n",
+ "P = 50.*10**5; \t\t\t#pressure in Pa\n",
+ "d = 24.3; \t\t\t#density of ammonia (kg/m**3)\n",
+ "m = 17.; \t\t\t#molecular wt of ammonia\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To estimate the fugacity of ammonia\n",
+ "V = m/(d*1000) \t\t\t#molar volume of ammonia (m**3/kmol)\n",
+ "#Using eq. 6.142 (Page no. 234)\n",
+ "f = (V*(P**2))/(R*T)\n",
+ "\n",
+ "# Results\n",
+ "print 'The fugacity of ammonia is %f bar'%(f/10**5)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fugacity of ammonia is 44.474543 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the fugacity of liquid water\n",
+ "\n",
+ "# Variables\n",
+ "T = 303.; \t\t\t#temperature in K\n",
+ "P = 10.; \t\t\t#pressure in bar\n",
+ "Ps = 4.241/100; \t\t\t#saturation pressure (bar)\n",
+ "sp_vol = 1.004 *10**-3; \t\t\t#specific volume at 303 K (m**3/kg)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the fugacity of liquid water\n",
+ "V = sp_vol*10**-3*18; \t\t\t#molar volume (m**3/mol)\n",
+ "#Assuming vapour behaves as an ideal gas\n",
+ "f_sat = Ps;\n",
+ "#Using Eq. 6.144 (Page no. 235)\n",
+ "ln_phi = (V/(R*T))*(P-Ps)*10**5;\n",
+ "f = f_sat*math.e**ln_phi;\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity of liquid water at given conditions is %f bar'%f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity of liquid water at given conditions is 0.042714 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the fugacity of n butane in liquid state at given conditions\n",
+ "\n",
+ "# Variables\n",
+ "T = 350.; \t\t\t#temperature in K\n",
+ "P = 60.; \t\t\t#pressure in bar\n",
+ "Ps = 9.35; \t\t\t#vapour pressure at 350 K (bar)\n",
+ "V = 0.1072*10**-3; \t\t\t#molar volume (m**3/mol\n",
+ "phi = 0.834; \t\t\t#fugacity coeffecient\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine fugaity of n butane in liquid state at given conditions\n",
+ "f_sat = phi*Ps;\n",
+ "#Using eq. 6.144 (Page no. 235)\n",
+ "ln_phi = (V/(R*T))*(P-Ps)*10**5;\n",
+ "f = f_sat*math.e**ln_phi;\n",
+ "\n",
+ "# Results\n",
+ "print 'Fugacity of n-butane in liquid state at given conditions is %f bar'%f\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fugacity of n-butane in liquid state at given conditions is 9.397539 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the activity of solid magnesium\n",
+ "\n",
+ "# Variables\n",
+ "M = 24.32; \t\t\t#molecular wt of solid magnesium\n",
+ "T = 300.; \t\t\t#temperature in K\n",
+ "P = 10.; \t\t\t#pressure in bar\n",
+ "Po = 1.; \t\t\t#reference state pressure (bar)\n",
+ "R = 8.314\n",
+ "d = 1.745*10**3; \t\t\t#density of Mg at 300 K in kg/m**3\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the ativity of solid magnesiun\n",
+ "#Using eq. 6.149 (Page no. 237)\n",
+ "ln_a = (M/(d*10**3*R*T))*(P-Po)*10**5;\n",
+ "a = (math.e)**ln_a;\n",
+ "\n",
+ "# Results\n",
+ "print 'Acivity of solid magnesium at 300 K and 10 bar is %f'%a\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acivity of solid magnesium at 300 K and 10 bar is 1.005042\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb
new file mode 100644
index 00000000..b0e53020
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch7.ipynb
@@ -0,0 +1,888 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Properties of Solutions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the volume of mixture\n",
+ "\n",
+ "# Variables\n",
+ "V = 0.1; \t\t\t#volume of mixture required (m**3)\n",
+ "Ve = 0.03; \t\t\t#volume of alcohol\n",
+ "Vw = 0.07; \t\t\t#volume of water\n",
+ "de = 789.; \t\t\t#density of ethanol (kg/m**3)\n",
+ "dw = 997.; \t\t\t#density of water (kg/m**3)\n",
+ "pe = 53.6*10**-6; \t\t\t#partial molar volume of ethanol (m**3/mol)\n",
+ "pw = 18.*10**-6; \t\t\t#partial molar volume of water (m**3/mol)\n",
+ "Me = 46.; \t\t\t#molecular wt of ethanol\n",
+ "Mw = 18.; \t\t\t#molecular wt of water\n",
+ "\n",
+ "# Calculations\n",
+ "#To find the volume of mixture\n",
+ "ne = (Ve*de*10**3)/Me; \t\t\t#number of moles of ethanol\n",
+ "nw = (Vw*dw*10**3)/Mw; \t\t\t#number of moles of water\n",
+ "xe = ne/(ne+nw) \t\t\t#mole fraction of ethanol\n",
+ "xw = 1-ne; \t\t\t#mole fraction of water\n",
+ "act_V = (ne*pe)+(nw*pw)\n",
+ "\n",
+ "# Results\n",
+ "if (V==act_V) :\n",
+ " print 'It is possible to prepare the required solution'\n",
+ "else:\n",
+ " Ve_act = (Ve/act_V)*V;\n",
+ " Vw_act = (Vw/act_V)*V;\n",
+ " print ' For the given volumes of ethanol and water, it is not possible to prepare 0.1 cubic m of mixture'\n",
+ " print ' Required volume of ethanol is %f cubic m'%Ve_act\n",
+ " print ' Required volume of water is %f cubic m'%Vw_act\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " For the given volumes of ethanol and water, it is not possible to prepare 0.1 cubic m of mixture\n",
+ " Required volume of ethanol is 0.030810 cubic m\n",
+ " Required volume of water is 0.071890 cubic m\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the required volume of methanol and water\n",
+ "\n",
+ "# Variables\n",
+ "V = 2.; \t\t\t#volume of desired solution (m**3)\n",
+ "x1 = 0.3; \t\t\t#moles fraction of methanol\n",
+ "x2 = 0.7; \t\t\t#moles fraction of water\n",
+ "V1 = 38.632*10**-6; \t\t\t#partial molar volume of methanol (m**3/mol)\n",
+ "V2 = 17.765*10**-6; \t\t\t#partial molar volume of water (m**3/mol)\n",
+ "mol_V1 = 40.727*10**-6; \t\t#molar volume of ethanol (m**3/mol)\n",
+ "mol_V2 = 18.068*10**-6; \t\t#molar volume of water (m**3/mol)\n",
+ "\n",
+ "# Calculations\n",
+ "#To find the required volume of methanol and water\n",
+ "V_mol = (x1*V1)+(x2*V2); \t\t\t#molar volume of desired solution\n",
+ "n = V/V_mol; \t\t\t #no. of moles in the desired solution\n",
+ "n1 = x1*n; \t\t\t#moles of methanol\n",
+ "n2 = x2*n; \t\t\t#moles of water\n",
+ "V_m = n1*mol_V1;\n",
+ "V_w = n2*mol_V2;\n",
+ "\n",
+ "# Results\n",
+ "print 'Volume of methanol to be taken is %f cubic m'%V_m\n",
+ "print ' Volume of water to be taken is %f cubic m'%V_w\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of methanol to be taken is 1.017111 cubic m\n",
+ " Volume of water to be taken is 1.052866 cubic m\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the volume of water to be added and volume of dilute alcohol solution\n",
+ "\n",
+ "# Variables\n",
+ "V1_w = 0.816*10**-3; \t\t\t#partial molar volume of water in 96% alcohol solution\n",
+ "V1_e = 1.273*10**-3; \t\t\t#partial molar volume of ethanol in 96% alcohol solution\n",
+ "V2_w = 0.953*10**-3; \t\t\t#partial molar volume of water in 56% alcohol solution\n",
+ "V2_e = 1.243*10**-3; \t\t\t#partial molar volume of ethanol in 56% alcohol solution\n",
+ "d = 0.997*10**3; \t\t\t #density of water (kg/m**3)\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the volume of water to be added and volume of dilute alcohol solution\n",
+ "#Basis: \n",
+ "V = 2*10**-3; \t\t\t #volume of alcohol solution (m**3)\n",
+ "V_sp = (0.96*V1_e)+(0.04*V1_w); \t\t\t#volume of 1 kg of laboratory alcohol\n",
+ "m_e = V/V_sp; \t\t\t #mass of 2*10**-3 m**3 alcohol \n",
+ "\n",
+ "#(a).\n",
+ "#Let mass of water added be m kg\n",
+ "#Taking an alcohol balance\n",
+ "m = (m_e*0.96)/0.56 - m_e;\n",
+ "v = m/d;\n",
+ "\n",
+ "# Results\n",
+ "print ' (a).'\n",
+ "print ' Mass of water added is %f kg'%m\n",
+ "print ' Volume of water added is %4.3e cubic m'%v\n",
+ "\n",
+ "#(b)\n",
+ "m_sol = m_e + m; \t\t\t #mass of alcohol solution obtained\n",
+ "sp_vol = (0.56*V2_e)+(0.44*V2_w); \t\t\t#specific volume of 56% alcohol\n",
+ "V_dil = sp_vol*m_sol; \t\t\t #volume of dilute alcohol solution\n",
+ "print ' (b)'\n",
+ "print ' Volume of dilute alcohol solution is %5.4e cubic m'%V_dil\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (a).\n",
+ " Mass of water added is 1.138558 kg\n",
+ " Volume of water added is 1.142e-03 cubic m\n",
+ " (b)\n",
+ " Volume of dilute alcohol solution is 3.0479e-03 cubic m\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine enthalpies of pure components and at infinite dilution\n",
+ "\n",
+ "# Variables\n",
+ "x1= .3\n",
+ "x2 = .7\n",
+ "\n",
+ "# Calculations and Results\n",
+ "H = 400.*x1 + 600*x2 + x1*x2*(40*x1+20*x2)\n",
+ "H1 = 420.-60+40;\n",
+ "#Using eq. 7.28 (Page no. 264)\n",
+ "#H = H2_bar as x2 = 1\n",
+ "H2 = 600.;\n",
+ "print ' (b).'\n",
+ "print ' Pure state enthalpies are:'\n",
+ "print ' H1 = %i J/mol'%H1\n",
+ "print ' H2 = %i J/mol'%H2\n",
+ "\n",
+ "\t\t\t#(c).\n",
+ "\t\t\t#H1_inf = H1_bar as x1 = 0, so from eq. 7.27\n",
+ "H1_inf = 420.;\n",
+ "\t\t\t#H2_inf = H2_bar as x2 = 0. so from eq 7.28\n",
+ "H2_inf = 640.;\n",
+ "print ' (c).'\n",
+ "print ' At infinite dilution:'\n",
+ "print ' H1 = %i J/mol'%H1_inf\n",
+ "print ' H2 = %i J/mol'%H2_inf\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (b).\n",
+ " Pure state enthalpies are:\n",
+ " H1 = 400 J/mol\n",
+ " H2 = 600 J/mol\n",
+ " (c).\n",
+ " At infinite dilution:\n",
+ " H1 = 420 J/mol\n",
+ " H2 = 640 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the partial molar volume of the components\n",
+ "\n",
+ "def V(m):\n",
+ " y = 1.003*10**-3 + 0.1662*10**-4*m + 0.177*10**-5*m**1.5 + 0.12*10**-6*m**2\n",
+ " return y\n",
+ "\n",
+ "# Variables\n",
+ "m = 0.1; \t\t\t#molality of solution (mol/kg)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the partial molar volume of the components\n",
+ "#Differentiating Eq. 7.29 with reference to m, we get\n",
+ "V1_bar = 0.1662*10**-4 + 0.177*1.5*10**-5*m**0.5 + 0.12*2*10**-6*m;\n",
+ "V_sol = V(m) \t\t\t#volume of aqueous soluttion\n",
+ "n1 = m;\n",
+ "n2 = 1000./18;\n",
+ "V2_bar = (V_sol - n1*V1_bar)/n2;\n",
+ "\n",
+ "# Results\n",
+ "print 'Partial molar volume of water = %4.3e cubic m/mol'%V2_bar\n",
+ "print ' Partial molar volume of NaCl = %4.3e cubic m/mol'%V1_bar\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial molar volume of water = 1.805e-05 cubic m/mol\n",
+ " Partial molar volume of NaCl = 1.748e-05 cubic m/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To estimate the solubility of oxygen in water at 298K\n",
+ "\n",
+ "# Variables\n",
+ "K = 4.4*10**4; \t\t\t#Henry's law constant (bar)\n",
+ "pp = 0.25; \t\t\t #partial pressure of oxygen in bar\n",
+ "M_O2 = 32.; \t\t\t#molecular wt of oxygen\n",
+ "M_water = 18.; \t\t\t#molecular wt of water\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To estimate the solubility of oxygen in water at 298 K\n",
+ "#Using eq. 7.72 (Page no. 275)\n",
+ "x_O2 = pp/K; \t\t\t#mole fraction of O2\n",
+ "print 'Solubility of oxygen is %5.4e moles per mole of water'%x_O2\n",
+ "\n",
+ "#In mass units\n",
+ "sol_O2 = (x_O2*M_O2)/M_water;\n",
+ "print ' Solubility of oxygen in mass units is %4.3e kg oxygen per kg water'%sol_O2\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solubility of oxygen is 5.6818e-06 moles per mole of water\n",
+ " Solubility of oxygen in mass units is 1.010e-05 kg oxygen per kg water\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To confirm that mixture conforms to Raoults Law and to determine Henrys Law constant?\n",
+ "\n",
+ "%pylab inline\t\t\t\n",
+ " \n",
+ "from numpy import *\n",
+ "from matplotlib.pyplot import *\n",
+ "import numpy\n",
+ "\n",
+ "# Variables\n",
+ "xb = array([0, 0.2, 0.4, 0.6, 0.8, 1.0])\n",
+ "pa_bar = [0.457 ,0.355, 0.243, 0.134, 0.049, 0];\n",
+ "pb_bar = [0,0.046, 0.108, 0.187, 0.288, 0.386];\n",
+ "\n",
+ "\n",
+ "#To confirm mixture conforms to Raoult's Law and to determine Henry's law constant\n",
+ "xa = 1 - xb\n",
+ "plot(xa,pa_bar)\n",
+ "plot(xa,pb_bar)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#For Henry's law plotting\n",
+ "x = [0,0.2, 0.4 ,0.6 ,0.8 ,1.0];\n",
+ "#Form the partial presures plot of component A and B\n",
+ "yh1 = [0,0,0,0,0,0]\n",
+ "yh1[0] = 0; \n",
+ "yh1[1] = 0.049; \t\t\t#For component A\n",
+ "for i in range(2,6):\n",
+ " yh1[i] = yh1[i-1]+(x[i]-x[i-1])*((yh1[1]-yh1[0])/(x[1]-x[0]))\n",
+ "\n",
+ "yh_2 = [0,0,0,0,0,0]\n",
+ "yh_2[5] = 0; \n",
+ "yh_2[4] = 0.046; \t\t\t#For component B\n",
+ "i = 3;\n",
+ "while (i>=0):\n",
+ " yh_2[i] = yh_2[i+1] + (x[i]-x[i+1])*((yh_2[5]-yh_2[4])/(x[5]-x[4]))\n",
+ " i = i-1;\n",
+ "\n",
+ "plot(x,yh1)\n",
+ "plot(x,yh_2)\n",
+ "\t\t\t#legend(\"Partial pressure \",\" \",\"Raoults law\",\" \",\"Henrys Law\"\n",
+ "show()\n",
+ "#(a)\n",
+ "print 'From the graph it can be inferred that, in the region where Raoults law is obeyed by A, the Henrys law is obeyed by B, and vice versa'\n",
+ "\n",
+ "#(b)\n",
+ "#Slope of Henry's law\n",
+ "print ' For component A, Ka = %f bar'%yh1[5]\n",
+ "print ' For component B, Kb = %f bar'%yh_2[0]\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": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEACAYAAACnJV25AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclPX6//EXiIqKsooLGO6aCIqiqbngkrtgglnnHLM8\nFsEvW06raaUdsyzLry0qmaZHSyswwY0slRQ1FzCJTM0lA3eGTZBlmLl/f9wKmoqAM3MPw/V8PHx8\n5TjOXN36ffPxuj/39bFTFEVBCCGEzbDXugAhhBCmJcEuhBA2RoJdCCFsjAS7EELYGAl2IYSwMRLs\nQghhY+4Y7PHx8fj5+dGpUyfmzp17068nJCTg7OxMQEAAAQEBzJ492yyFCiGEqBiH8n6xqKiIiIgI\nEhMTadKkCb1792bo0KEEBATc8LoBAwYQFxdn1kKFEEJUTLkr9r179+Lr64uXlxcODg5MmDCBjRs3\n3vQ6ecZJCCGsR7nBnp6eTosWLUq/9vb2Jj09/YbX2NnZsWfPHvz8/Bg8eDCHDh0yT6VCCCEqpNxW\njJ2d3R3foHv37qSnp+Po6MiWLVsYO3Ysp06dMlmBQgghKqfcYPf29iYtLa3067S0tBtW8ABOTk6l\nPx86dCh16tTh/PnzNG3a9IbXtW3blhMnTpiiZiGEqDHatGnD8ePHK/eblHIUFBQoPj4+Snp6ulJc\nXKwEBgYqSUlJN7zm0qVLpT8/cOCA4uXlpRgMhpve6w4fVaO8+eabWpdgNeRalJFrUUauRZmqZGe5\nK3ZHR0cWLVrEsGHDMBqNTJw4kW7duhEVFQVAeHg4q1ev5rPPPgOgTp06fPXVV9jby/Z4IYTQSrnB\nDjBixAhGjBhxw/8WHh5e+vOpU6cydepU01cmhBCiSmRprYGgoCCtS7Aaci3KyLUoI9fi7thd7eGY\n/4Ps7GS/uxBCVFJVslNW7EIIYWMk2IUQwsZIsAshhI2RYBdCCBsj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pVeRavPHGG/zrX/+iU6dOGAwGZs+eXXpT2dY88sgj/PTTT2RkZNCiRQtmzZqF\nXq8Hqpab8oCSEELYGNsceC6EEDWYBLsQQtgYCXYhhLAxEuxCCGFjJNiFEMLGSLALIYSNkWAXQggb\nI8EuhBA25v8DAAQCZcrB/UMAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2769cd0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From the graph it can be inferred that, in the region where Raoults law is obeyed by A, the Henrys law is obeyed by B, and vice versa\n",
+ " For component A, Ka = 0.245000 bar\n",
+ " For component B, Kb = 0.230000 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate activity and activity coeffecient of chloroform\n",
+ "\n",
+ "from numpy import array\n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "xa = array([0, 0.2, 0.4, 0.6, 0.8, 1.0]);\n",
+ "Pa_bar = [0 ,0.049, 0.134, 0.243, 0.355, 0.457];\n",
+ "Pb_bar = [0.386 ,0.288, 0.187, 0.108, 0.046, 0];\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate activity and activity coeffecient of chloroform\n",
+ "xb = 1-xa;\n",
+ "Pbo = 0.386; \t\t\t#vapour pressure of pure chloroform\n",
+ "#(a). Based on standard state as per Lewis-Randall rule\n",
+ "\n",
+ "print 'Based on Lewis Randall Rule'\n",
+ "print ' Activity Activity coeffecient'\n",
+ "a = [0,0,0,0,0,0]\n",
+ "ac = [0,0,0,0,0,0]\n",
+ "for i in range(6):\n",
+ " a[i] = Pb_bar[i]/Pbo;\n",
+ " print ' %f'%a[i],\n",
+ " if(xb[i]==0):\n",
+ " print ' Not defined',\n",
+ " else:\n",
+ " ac[i] = a[i]/xb[i];\n",
+ " print ' %f'%ac[i]\n",
+ "\n",
+ "#(b). Based on Henry's Law \n",
+ "Kb = 0.217; \t\t\t#bar (From Example 7.11 Page no. 276)\n",
+ "\n",
+ "print '\\n\\n Based on Henrys Law'\n",
+ "print ' Activity Activity coeffecient'\n",
+ "for i in range(6):\n",
+ " a[i] = Pb_bar[i]/Kb;\n",
+ " print ' %f'%a[i],\n",
+ " if(xb[i]==0):\n",
+ " print ' Not defined',\n",
+ " else:\n",
+ " ac[i] = a[i]/xb[i];\n",
+ " print ' %f'%ac[i]\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Based on Lewis Randall Rule\n",
+ " Activity Activity coeffecient\n",
+ " 1.000000 1.000000\n",
+ " 0.746114 0.932642\n",
+ " 0.484456 0.807427\n",
+ " 0.279793 0.699482\n",
+ " 0.119171 0.595855\n",
+ " 0.000000 Not defined \n",
+ "\n",
+ " Based on Henrys Law\n",
+ " Activity Activity coeffecient\n",
+ " 1.778802 1.778802\n",
+ " 1.327189 1.658986\n",
+ " 0.861751 1.436252\n",
+ " 0.497696 1.244240\n",
+ " 0.211982 1.059908\n",
+ " 0.000000 Not defined\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine fugacity fugacity coeffecient Henrys Law constant and activity coeffecient\n",
+ "\n",
+ "# Variables\n",
+ "P = 20.; \t\t\t#pressure in bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "def f1(x1):\n",
+ " y = (50*x1)-(80*x1**2)+(40*x1**3)\n",
+ " return y\n",
+ "\n",
+ "#To determine fugacity fugacity coeffecient Henry's Law constant and activity coeffecient\n",
+ "\n",
+ "#(a)\n",
+ "#Fugacity of component in solution becomes fugacity of pure component when mole fraction approaches 1 i.e. \n",
+ "x1 = 1.;\n",
+ "f1_pure = f1(x1);\n",
+ "print '(a). Fugacity f1 of pure component 1 is %i bar'%f1_pure\n",
+ "\n",
+ "#(b)\n",
+ "phi = f1_pure/P;\n",
+ "print ' (b). Fugacity coeffecient is %f'%phi\n",
+ "\n",
+ "#(c)\n",
+ "#Henry's Law constant is lim (f1/x1)and x1 tends to 0 \n",
+ "x1 = 0;\n",
+ "K1 = 50 - (80*x1) + (40*x1**2);\n",
+ "print ' (c). Henrys Law constant is %i bar'%K1\n",
+ "\n",
+ "#(d)\n",
+ "print ' (d). This subpart is theoretical and does not involve any numerical computation'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). Fugacity f1 of pure component 1 is 10 bar\n",
+ " (b). Fugacity coeffecient is 0.500000\n",
+ " (c). Henrys Law constant is 50 bar\n",
+ " (d). This subpart is theoretical and does not involve any numerical computation\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine enthalpies at infinite dilution\n",
+ "\n",
+ "# Variables\n",
+ "H1_pure = 400.; \t\t\t#enthalpy of pure liquid 1 at 298 K and 1 bar (J/mol)\n",
+ "H2_pure = 600.; \t\t\t#enthalpy of pure liquid 2 (J/mol)\n",
+ "x1 = 0.;\n",
+ "\n",
+ "# Calculations\n",
+ "delH1_inf = 20*((1-x1)**2)*(2*x1+1);\n",
+ "H1_inf = H1_pure + delH1_inf; \t\t\t#(J/mol)\n",
+ "\n",
+ "#For infinite dilution of 2, x1 = 1 and delH2_inf = H2_bar\n",
+ "x1 = 1.;\n",
+ "delH2_inf = 40.*x1**3;\n",
+ "H2_inf = delH2_inf + H2_pure; \t\t\t#(J/mol)\n",
+ "\n",
+ "# Results\n",
+ "print 'Enthalpy at infinite dilution for component 1 is %i J/mol'%H1_inf\n",
+ "print ' Enthalpy at infinite dilution for component 2 is %i J/mol'%H2_inf\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy at infinite dilution for component 1 is 420 J/mol\n",
+ " Enthalpy at infinite dilution for component 2 is 640 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.19 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine change in entropy for the contents of the vessel\n",
+ "\n",
+ "# Variables\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "n1 = 100.; \t\t\t#moles of nitrogen\n",
+ "n2 = 100.; \t\t\t#moles of oxygen\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the change in entropy of the contents of the vessel\n",
+ "x1 = n1/(n1+n2);\n",
+ "x2 = n2/(n1+n2);\n",
+ "import math\n",
+ "\n",
+ "#Using eq. 7.122 (Page no. 292)\n",
+ "S = -R*(x1*math.log (x1) + x2*math.log (x2));\n",
+ "S_tot = S*(n1+n2);\n",
+ "\n",
+ "# Results\n",
+ "print 'Change in entropy of components are %f J/K'%S_tot\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy of components are 1152.565132 J/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine heat of formation of LiCl in 12 moles of water\n",
+ "\n",
+ "# Variables\n",
+ "Hf = -408.610; \t\t\t#heat of formation (kJ)\n",
+ "#For reaction 2\n",
+ "#LiCl + 12H2O --> LiCl(12H2O)\n",
+ "H_sol = -33.614; \t\t\t#heat of solution (kJ)\n",
+ "\n",
+ "#To determine heat of formation of LiCl in 12 moles of water\n",
+ "#Adding reaction 1 and 2% we get\n",
+ "\n",
+ "# Calculations\n",
+ "#Li + 1/2Cl2 + 12H2O --> LiCl(12H2O)\n",
+ "H_form = Hf+H_sol;\n",
+ "\n",
+ "# Results\n",
+ "print 'Heat of formation of LiCl in 12 moles of water is %f kJ'%H_form\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat of formation of LiCl in 12 moles of water is -442.224000 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the free energy of mixing\n",
+ "\n",
+ "# Variables\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "n1 = 3.; \t\t\t#moles of hydrogen\n",
+ "n2 = 1.; \t\t\t#moles of nitrogen\n",
+ "T = 298.; \t\t\t#temperature in K\n",
+ "P1 = 1.; \t\t\t#pressure of hydrogen in bar\n",
+ "P2 = 3.; \t\t\t#pressure of nitrogen in bar\n",
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate the free energy of mixing\n",
+ "V1 = (n1*R*T)/(P1*10**5); \t\t\t#volume occupied by hydrogen\n",
+ "V2 = (n2*R*T)/(P2*10**5); \t\t\t#volume occupied by nitrogen\n",
+ "V = V1+V2; \t\t\t#total volume occupied\n",
+ "P = ((n1+n2)*R*T)/(V*10**5); \t\t\t#final pressure attained by mixture (bar)\n",
+ "G1 = R*T*(n1*math.log(P/P1) + n2*math.log(P/P2));\n",
+ "\n",
+ "#For step 2, using eq. 7.121 (Page no. 292)\n",
+ "x1 = n1/(n1+n2);\n",
+ "x2 = n2/(n1+n2);\n",
+ "G2 = (n1+n2)*R*T*(x1*math.log (x1) + x2*math.log (x2));\n",
+ "G = G1+G2; \t\t\t#free energy in J\n",
+ "\n",
+ "# Results\n",
+ "print 'The free energy of mixing when partition is removed is %f kJ'%(G/1000)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The free energy of mixing when partition is removed is -6.487935 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the mean heat capacity of 20 mol percent solution\n",
+ "\n",
+ "# Variables\n",
+ "C_water = 4.18*10**3; \t\t\t#heat capacity of water (J/kg K)\n",
+ "C_ethanol = 2.58*10**3; \t\t#heat capacity of ethanol (J/kg K)\n",
+ "G1 = -758.; \t\t\t#heat of mixing 20 mol percent ethanol water at 298 K(J/mol)\n",
+ "G2 = -415.; \t\t\t#heat of mixing 20 mol percent ethanol water at 323 K (J/mol)\n",
+ "n_wat = 0.8; \t\t\t#moles of water\n",
+ "n_eth = 0.2; \t\t\t#moles of ethanol\n",
+ "T1 = 323.; \t\t\t#initial temperature in K\n",
+ "T2 = 298.; \t\t\t#final temperature in K\n",
+ "\n",
+ "# Calculations\n",
+ "#Step 1: Water is cooled from 323 K t0 298 K\n",
+ "H1 = n_wat*18*C_water*(T2-T1)/1000; \t\t\t#(J)\n",
+ "\n",
+ "#Step 2: Ethanol is cooled from 323 to 298 K\n",
+ "H2 = n_eth*46*C_ethanol*(T2-T1)/1000; \t\t\t#(J)\n",
+ "\n",
+ "#Step 3: 0.8 mol water and 0.2 mol ethanol are mixed at 298 K\n",
+ "H3 = G1; \t\t\t#(J)\n",
+ "\n",
+ "#Step 4: \n",
+ "H = G2;\n",
+ "Cpm = (H-H1-H2-H3)/(T1-T2);\n",
+ "\n",
+ "# Results\n",
+ "print 'Mean heat capacity of solution is %f J/mol K'%Cpm\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean heat capacity of solution is 97.648000 J/mol K\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the final temperature attained\n",
+ "\n",
+ "# Variables\n",
+ "To = 298.; \t\t\t#initial temperature (K)\n",
+ "Cpm = 97.65; \t\t\t#Mean heat capacity of solution (J/mol K)\n",
+ "Hs = -758.; \t\t\t#heat of mixing (J/mol)\n",
+ "H = 0.;\n",
+ "\n",
+ "# Calculations\n",
+ "T = (H-Hs)/Cpm + To;\n",
+ "\n",
+ "# Results\n",
+ "print 'The final temperature attained by the mixing is %f K'%T\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature attained by the mixing is 305.762417 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb
new file mode 100644
index 00000000..405872e3
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch8.ipynb
@@ -0,0 +1,1489 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Phase equilibria"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine composition of vapour and liquid in equilibrium\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 106.; \t\t\t#vapour pressure of n-heptane (kPa)\n",
+ "P2 = 74.; \t\t\t#vapour pressure of toluene (kPa)\n",
+ "P = 101.3; \t\t\t#total pressure (kPa)\n",
+ "\n",
+ "# Calculations\n",
+ "x = (P-P2)/(P1-P2)\n",
+ "y = x*(P1/P)\n",
+ "\n",
+ "# Results\n",
+ "print 'Composition of liquid heptane is %f mol percent'%(x*100)\n",
+ "print ' Composition of heptane in vapour form is %f mol percent'%(y*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Composition of liquid heptane is 85.312500 mol percent\n",
+ " Composition of heptane in vapour form is 89.270731 mol percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine pressure at the beginning and at the end of the process\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 135.4; \t\t\t#vapour pressure of benzene (kPa)\n",
+ "P2 = 54.; \t\t\t#vapour pressure of toluene (kPa)\n",
+ "x = 0.5; \t\t\t#liquid phase composition\n",
+ "\n",
+ "# Calculations\n",
+ "#Using eq. 8.51 (Page no. 332)\n",
+ "P_beg = P2 + (P1-P2)*x;\n",
+ "\n",
+ "#At the end\n",
+ "y = 0.5; \t\t\t#vapour phase composition\n",
+ "#Using eq. 8.54 (Page no. 333) and rearranging\n",
+ "P_end = (P1*P2)/(P1-y*(P1-P2))\n",
+ "\n",
+ "# Results\n",
+ "print 'Pressure at the beginning of the process is %f kPa'%(P_beg)\n",
+ "print ' Pressure at the end of the process is %f kPa'%(P_end)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the beginning of the process is 94.700000 kPa\n",
+ " Pressure at the end of the process is 77.208025 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine temperature pressure and compositions\n",
+ "\n",
+ "import math\n",
+ "def P1(T):\n",
+ " y1 = math.e**(14.5463 - 2940.46/(T-35.93)) \t\t\t#vapour pressure of acetone\n",
+ " return y1\n",
+ "\n",
+ "def P2(T):\n",
+ " y2 = math.e**(14.2724 - 2945.47/(T-49.15)) \t\t\t#vapour pressure of acetonitrile\n",
+ " return y2\n",
+ "\n",
+ "# Variables\n",
+ "T = 327.; \t\t\t#temperature in K\n",
+ "P = 65.; \t\t\t#pressure in kPa\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P1_s = P1(T)\n",
+ "P2_s = P2(T)\n",
+ "\t\t\t#Using eq. 8.51 (Page no. 332)\n",
+ "x1 = (P-P2_s)/(P1_s-P2_s)\n",
+ "\t\t\t#Using eq. 8.54 (Page no. 333)\n",
+ "y1 = x1*(P1_s/P)\n",
+ "print '(a)'\n",
+ "print ' x1 = %f'%x1\n",
+ "print ' y1 = %f'%y1\n",
+ "\n",
+ "\t\t\t#(b). To calculate T and y1\n",
+ "P = 65.; \t\t\t#pressure in kPa\n",
+ "x1 = 0.4;\n",
+ "\n",
+ "flag = 1.;\n",
+ "T2 = 340.; \t\t\t#temperatue (assumed)\n",
+ "while(flag==1):\n",
+ " P1_s = P1(T2)\n",
+ " P2_s = P2(T2)\n",
+ " P_calc = P2_s + x1*(P1_s-P2_s)\n",
+ " if((P_calc-P)<=1):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " T2 = T2-0.8;\n",
+ "\n",
+ "y1 = x1*(P1_s/P)\n",
+ "print ' (b)'\n",
+ "print ' Temperature is %f K'%T2\n",
+ "print ' y1 = %f'%y1\n",
+ "\n",
+ "\t\t\t#(c). To calculate P and y1\n",
+ "T3 = 327.; \t\t\t#temperature in K\n",
+ "x1 = 0.4;\n",
+ "\n",
+ "P1_s = P1(T3)\n",
+ "P2_s = P2(T3)\n",
+ "P = P2_s + x1*(P1_s-P2_s)\n",
+ "y1 = x1*(P1_s/P)\n",
+ "print ' (c)'\n",
+ "print ' Pressure is %f kPa'%P\n",
+ "print ' y1 = %f'%y1\n",
+ "\n",
+ "\t\t\t#(d). To calculate T and x1\n",
+ "P = 65.; \t\t\t#pressure in kPa\n",
+ "y1 = 0.4;\n",
+ "\n",
+ "flag = 1.;\n",
+ "T = 340.; \t\t\t#assumed temperature (K)\n",
+ "while(flag==1):\n",
+ " P1_s = P1(T)\n",
+ " P2_s = P2(T)\n",
+ " y1_calc = (P1_s*(P-P2_s))/(P*(P1_s-P2_s))\n",
+ " if((y1_calc-y1)>=0.001):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " T = T-2;\n",
+ "\n",
+ "x1 = y1*(P/P1_s)\n",
+ "print ' (d)'\n",
+ "print ' Temperature = %f K'%T\n",
+ "print ' x1 = %f'%x1\n",
+ "\n",
+ "#(e). To calculate P and x1\n",
+ "T = 327.; \t\t\t#temperature (K)\n",
+ "y1 = 0.4;\n",
+ "\n",
+ "P1_s = P1(T)\n",
+ "P2_s = P2(T)\n",
+ "#Using eq. 8.54 and 8.51\n",
+ "x1 = (y1*P2_s)/(P1_s-y1*(P1_s-P2_s))\n",
+ "P = x1*(P1_s/y1)\n",
+ "print ' (e)'\n",
+ "print ' Pressure = %f kPa'%P\n",
+ "print ' x1 = %f'%x1\n",
+ "\n",
+ "#(f). To calculate fraction of the system is liquid and vapour in equilibrium\n",
+ "T = 327.; \t\t\t#temperature (K)\n",
+ "P = 65.; \t\t\t#pressure (kPa)\n",
+ "y1 = 0.7344;\n",
+ "\n",
+ "P1_s = P1(T)\n",
+ "P2_s = P2(T)\n",
+ "x1 = (P-P2_s)/(P1_s-P2_s)\n",
+ "#Let f be the fraction of the mixture that is liquid\n",
+ "#Applying acetone balance\n",
+ "f = (0.7-y1)/(x1-y1)\n",
+ "print ' (f)'\n",
+ "print ' Fraction of mixture that is liquid is %f percent'%(f*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ " x1 = 0.560806\n",
+ " y1 = 0.734393\n",
+ " (b)\n",
+ " Temperature is 330.400000 K\n",
+ " y1 = 0.588617\n",
+ " (c)\n",
+ " Pressure is 57.633467 kPa\n",
+ " y1 = 0.590765\n",
+ " (d)\n",
+ " Temperature = 334.000000 K\n",
+ " x1 = 0.240940\n",
+ " (e)\n",
+ " Pressure = 50.093199 kPa\n",
+ " x1 = 0.235402\n",
+ " (f)\n",
+ " Fraction of mixture that is liquid is 19.816333 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To construct boiling point and equilibrium point diagram\n",
+ "\n",
+ "%pylab inline\n",
+ "\n",
+ "# Variables\n",
+ "P = 101.3; \t\t\t#total pressure over the system (kPa)\n",
+ "T = [371.4, 378, 383, 388, 393, 398.6];\n",
+ "Pa = [101.3 ,125.3, 140.0, 160.0 ,179.9, 205.3];\n",
+ "Pb = [44.4 ,55.6 ,64.5, 74.8, 86.6 ,101.3];\n",
+ "xa = [0,0,0,0,0,0]\n",
+ "ya = [0,0,0,0,0,0]\n",
+ "\n",
+ "# Calculations\n",
+ "#To construct boiling point and equilibrium point diagram\n",
+ "for i in range(6):\n",
+ " xa[i] = (P-Pb[i])/(Pa[i]-Pb[i]) \t\t\t#Using eq. 8.51\n",
+ " ya[i] = xa[i]*(Pa[i]/P )\t\t\t#Using eq. 8.54\n",
+ "\n",
+ "from matplotlib.pyplot import *\n",
+ "\t\t\t#(a).\n",
+ "\t\t\t#To construct boiling point diagram\n",
+ "plot(xa,T)\n",
+ "plot(ya,T)\n",
+ "\t\t\t#title(\"Boiling Point diagram xa and ya Temperature\"\n",
+ "\t\t\t#(b).\n",
+ "\t\t\t#To construct the equilibrium diagram\n",
+ "plot(ya,xa)\n",
+ "\t\t\t#title(\"Equilibrium Diagram\",\"xa\",\"ya\"\n",
+ "show()\n",
+ "#(c).\n",
+ "\n",
+ "# Results\n",
+ "print '(c). The given subpart is theoretical and does not involve any numerical computation'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['draw_if_interactive']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHYVJREFUeJzt3X9sG/X9x/Gn7dhp2qYp5Fe3OCsoEj/ixjQtRDBS6gp1\ngYQJKkANLEEbMLWAVrVs0jYm0YRNZGOboDC0byTo/liEaGmrjS1tVb5aXQajpEthodtUASr7xunS\nOA35bcdxct8/Qt3mV20ndtIer4d08vn88d3Hn8LrfXc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1OnljG4vHHHzdq\namoMwzCM9vZ2Y9myZZEvqc3m1KlTF/0yNt7cTNqpm+l+OHXukqhNmzZx7733cvjwYVwuF6mpqfzu\nd79LVnfmVSxj8cwzz/D5559Hzkvb7Xaamprms9tJEctYfFnEMhbFxcXccccduN1uhoeHefTRR1m5\ncuU89zzxYhmLp59+mqqqKgoLCxkZGeFnP/tZ5EtqM3nggQc4cuQInZ2d5OfnU1tby/DwMDDz3NQP\npkRETE63EhQRMTkFvYiIySnoRURMTkEvImJyCnoREZNT0IuImJyCXkTE5BT0IiIm9/8XDjZRk2RO\nAwAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x226ec50>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(c). The given subpart is theoretical and does not involve any numerical computation\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate van Laar constants\n",
+ "\n",
+ "# Variables\n",
+ "x1 = 46.1/100; \t\t\t#mole percent of A\n",
+ "P = 101.3; \t\t\t#total pressure of system (kPa)\n",
+ "P1_s = 84.8; \t\t\t#vapour pressure of component A (kPa)\n",
+ "P2_s = 78.2; \t\t\t#vapour pressure of component B (kPa) \n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate van Laar constants\n",
+ "gama1 = P/P1_s;\n",
+ "gama2 = P/P2_s;\n",
+ "x2 = 1-x1;\n",
+ "import math\n",
+ "#van Laar constants:\n",
+ "#Using eq. 8.69 (Page no. 348)\n",
+ "A = math.log (gama1)*(1 + (x2*math.log(gama2))/(x1*math.log(gama1)))**2;\n",
+ "B = math.log (gama2)*(1 + (x1*math.log(gama1))/(x2*math.log(gama2)))**2;\n",
+ "\n",
+ "# Results\n",
+ "print 'van Laar constants are:'\n",
+ "print ' A = %f'%A\n",
+ "print ' B = %f'%B\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "van Laar constants are:\n",
+ " A = 1.298059\n",
+ " B = 0.652282\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate activity coeffecients in a solution containing 10 percent alcohol\n",
+ "\n",
+ "# Variables\n",
+ "x2 = 0.448; \t\t\t#mole fraction of ethanol\n",
+ "P = 101.3; \t\t\t#total pressure (kPa)\n",
+ "P1_s = 68.9; \t\t\t#Vapour pressure of benzene (kPa)\n",
+ "P2_s = 67.4; \t\t\t#vapour pressure of ethanol (kPa)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate activity coeffecients in a solution containing 10% alcohol\n",
+ "x1 = 1-x2;\n",
+ "gama1 = P/P1_s;\n",
+ "gama2 = P/P2_s;\n",
+ "import math\n",
+ "#Using eq. 8.69 (Page no. 348)\n",
+ "#van Laar constants:\n",
+ "A = math.log(gama1)*(1 + (x2*math.log(gama2))/(x1*math.log(gama1)))**2;\n",
+ "B = math.log(gama2)*(1 + (x1*math.log(gama1))/(x2*math.log(gama2)))**2;\n",
+ "\n",
+ "#For solution containing 10% alcohol\n",
+ "x2 = 0.1;\n",
+ "x1 = 1-x2;\n",
+ "ln_g1 = (A*x2**2)/(((A/B)*x1+x2)**2)\n",
+ "ln_g2 = (B*x1**2)/((x1+(B/A)*x2)**2)\n",
+ "gama1 = math.e**ln_g1;\n",
+ "gama2 = math.e**ln_g2;\n",
+ "\n",
+ "# Results\n",
+ "print 'Activity coeffecients:'\n",
+ "print ' For component 1: %f'%gama1\n",
+ "print ' For component 2: %f'%gama2\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Activity coeffecients:\n",
+ " For component 1: 1.025516\n",
+ " For component 2: 4.141567\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate equilibrium vapour composition for solution containing 20 mole percent hydrazine\n",
+ "\n",
+ "# Variables\n",
+ "x2 = 0.585; \t\t\t#mol fraction of hydrazine\n",
+ "P = 101.3; \t\t\t#total pressure of system (kPa)\n",
+ "P2_s = 124.76; \t\t\t#vapour pressure of hydrazine (kPa)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate equilibrium vapour composition for solution containing 20% (mol) hydrazine\n",
+ "x1 = 1-x2;\n",
+ "P1_s = 1.6*P2_s; \t\t\t#vapour pressure of water (kPa)\n",
+ "gama1 = P/P1_s;\n",
+ "gama2 = P/P2_s;\n",
+ "\n",
+ "import math\n",
+ "#Using eq. 8.69 (Page no. 348)\n",
+ "#van Laar constants:\n",
+ "A = math.log(gama1)*(1 + (x2*math.log(gama2))/(x1*math.log(gama1)))**2;\n",
+ "B = math.log(gama2)*(1 + (x1*math.log(gama1))/(x2*math.log(gama2)))**2;\n",
+ "\n",
+ "#For solution containing 20% hydrazine\n",
+ "x2 = 0.2;\n",
+ "x1 = 1-x2;\n",
+ "ln_g1 = (A*x2**2)/(((A/B)*x1+x2)**2)\n",
+ "ln_g2 = (B*x1**2)/((x1+(B/A)*x2)**2)\n",
+ "gama1 = math.e**ln_g1;\n",
+ "gama2 = math.e**ln_g2;\n",
+ "\n",
+ "#Using eq. 8.47 (Page no. 325) for components 1 and 2 and rearranging\n",
+ "alpha = 1.6; \t\t\t#alpha = P1_s/P2_s\n",
+ "y1 = 1./(1 + (gama2*x2)/(gama1*x1*alpha))\n",
+ "y2 = 1-y1;\n",
+ "\n",
+ "# Results\n",
+ "print 'Equilibrium vapour composition for solution containing 20 mol percent hydrazine'\n",
+ "print ' Hydrazine is %f percent'%(y2*100)\n",
+ "print ' Water is %f percent'%(y1*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equilibrium vapour composition for solution containing 20 mol percent hydrazine\n",
+ " Hydrazine is 5.279270 percent\n",
+ " Water is 94.720730 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the total pressure\n",
+ "\n",
+ "#Given:\n",
+ "x1 = 0.047; \t\t\t#mol fraction of isopropanol\n",
+ "P1 = 91.11; \t\t\t#vapour pessure of pure propanol (kPa)\n",
+ "P = 91.2; \t\t\t#toatl pressure of system (kPa)\n",
+ "P2 = 47.36; \t\t\t#vapour pressure of water (kPa)\n",
+ "\n",
+ "#van Laar consatnts:\n",
+ "A = 2.470;\n",
+ "B = 1.094;\n",
+ "\n",
+ "#To determine the total pressure:\n",
+ "x2 = 1-x1;\n",
+ "#Using eq. 8.68 (Page no. 348)\n",
+ "ln_g1 = (A*x2**2)/(((A/B)*x1 + x2)**2);\n",
+ "ln_g2 = (B*x1**2)/((x1 + (B/A)*x2)**2);\n",
+ "gama1 = math.e**ln_g1;\n",
+ "gama2 = math.e**ln_g2;\n",
+ "#Total pressure:\n",
+ "P_tot = (gama1*x1*P1) + (gama2*x2*P2);\n",
+ "\n",
+ "# Results\n",
+ "if(P==P_tot):\n",
+ " print 'This is equal to total pressure'\n",
+ "else:\n",
+ " print 'This is less than the total pressure. This error must have been caused by air leak'\n",
+ "\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "This is less than the total pressure. This error must have been caused by air leak\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To construct the Pxy diagram\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 24.62; \t\t\t#vapour pressure of cyclohexane (kPa)\n",
+ "P2 = 24.41; \t\t\t#vapour pressure of benzene (kPa)\n",
+ "from numpy import array\n",
+ "import math\n",
+ "x1 = array([0, 0.2, 0.4, 0.6, 0.8, 1.0])\n",
+ "x2 = 1-x1;\n",
+ "g1 = [0,0,0,0,0,0]\n",
+ "g2 = [0,0,0,0,0,0]\n",
+ "P = [0,0,0,0,0,0]\n",
+ "y1 = [0,0,0,0,0,0]\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(6):\n",
+ " g1[i] = math.e**(0.458*x2[i]**2) \t\t\t#activity coeffecient for component 1\n",
+ " g2[i] = math.e**(0.458*x1[i]**2 )\t\t\t#activity coeffecient for component 2\n",
+ " P[i] = (g1[i]*x1[i]*P1) + (g2[i]*x2[i]*P2) \t\t\t#total pressure (kPa)\n",
+ " y1[i] = (g1[i]*x1[i]*P1)/P[i];\n",
+ "\n",
+ "\n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "# Results\n",
+ "#To construct P-x-y diagram\n",
+ "plot(x1,P)\n",
+ "plot(y1,P)\n",
+ "\t\t\t#title(\"P-x-y Diagram\",\"x1 and y1\",\"Pressure\"\n",
+ "show()\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIAB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WDx48QGpqKpycnCAUCrFx40Z1h6kWilyL8ePH4+7d\nu2jatCkcHBwQHBys7jCrhPLkTYUmZ1WUor+o7P/uKdfEX3Blfqbo6Ghs3rwZMTExKoxIcxS5FjNm\nzMDSpUvB4/HAGCtxImBNoMi1KCwsxJ07d3DmzBlkZ2ejc+fOcHJyAp/PV0OE6qPItQgMDISjoyOi\no6Px+PFjuLu74+bNm0XfkLWJsnlTLS19S0tLJCUlFT1PSkoq9ulUUpnk5GRYWlqqIzy1UuRaAMCt\nW7cwbtw4HD16VO7Xu+pMkWsRFxeHYcOGoWXLljh48CCmTJmCo0ePqjtUlVPkWjRv3hw9e/ZEnTp1\n0KhRI7i6uuLWrVvqDlXlFLkWFy9ehJeXFwDA2toaLVu2xL1799QaZ1VQrrxZaXcc5MjJyWEtWrRg\nycnJLD8/n7Vv357FxcUVK3PgwAE2cOBAxhhjcXFxTCgUqiM0tVPkWjx9+pRZW1uzy5cvayhK9VDk\nWnxszJgx7ODBg2qMUH0UuRbx8fGse/furKCggGVlZTE7Ozt248YNDUWsOopciylTprCAgADGGGNp\naWnsk08+kVkVoKb4+++/5d7IVTZvqqV75+OJWlKpFCNHjkTbtm2LhllNnDgRgwcPxtmzZ8Hn82Fg\nYIAtW7aoIzS1U+RaLFy4EG/evCnqx65VqxauXbumybBVQpFroS0UuRYikQi9evWCUCiERCLBuHHj\n4OjoqOHIK58i1+Knn36Cj48P7OzsUFhYiMWLFxfd4K5Jhg8fjnPnziEjIwPNmjXDggULIJFIAJQ/\nb6JgRoMAAAA/SURBVNLkLEII0SK0XSIhhGgRSvqEEKJFKOkTQogWoaRPCCFahJI+IYRoEUr6hBCi\nRSjpE0KIFqGkTwghWuR/4t39YqZswywAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2f10390>"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the composition and total pressure of azeotrope\n",
+ "\n",
+ "# Variables\n",
+ "P = 40.25; \t\t\t#total pressure (kPa)\n",
+ "y1 = 0.566; \t\t\t#mol fraction of benzene in vapour phase\n",
+ "x1 = 0.384; \t\t\t#mol fraction of benzene in liquid state\n",
+ "P1 = 29.6; \t\t\t#vapour pressure of benzene (kPa)\n",
+ "P2 = 22.9; \t\t\t#vapour pressure of ethanol (kPa)\n",
+ "\n",
+ "#To determine the composition and total pressure of azeotrope\n",
+ "x2 = 1-x1;\n",
+ "y2 = 1-y1;\n",
+ "\n",
+ "# Calculations\n",
+ "#Using eq. 8.47 (Page no. 325)\n",
+ "#Activity coeffecients:\n",
+ "g1 = (y1*P)/(x1*P1)\n",
+ "g2 = (y2*P)/(x2*P2)\n",
+ "\n",
+ "import math\n",
+ "\t\t\t#Using eq. 8.69 (Page no. 348)\n",
+ "\t\t\t#van Laar constants:\n",
+ "A = math.log(g1)*((1 + (x2*math.log(g2))/(x1*math.log(g1)))**2)\n",
+ "B = math.log(g2)*((1 + (x1*math.log(g1))/(x2*math.log(g2)))**2)\n",
+ "\n",
+ "\t\t\t#Assuming azeotropic comp. (for hit and trial method)\n",
+ "x1 = 0.4;\n",
+ "flag = 1.;\n",
+ "while(flag==1):\n",
+ " x2 =1-x1;\n",
+ " ln_g1 = (A*x2**2)/(((A/B)*x1 + x2)**2)\n",
+ " ln_g2 = (B*x1**2)/((x1 + (B/A)*x2)**2)\n",
+ " g1 = math.e**ln_g1;\n",
+ " g2 = math.e**ln_g2;\n",
+ " P_1 = g1*P1;\n",
+ " P_2 = g2*P2;\n",
+ " if((P_1-P_2)<=1) and ((P_1-P_2)>=-1):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " x1 = x1+0.1;\n",
+ "\n",
+ "# Results\n",
+ "print 'Azeotropic compositon of benzene is %i percent'%(x1*100)\n",
+ "print ' Total pressure of azeotrope is %f kPa'%((P_1+P_2)/2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Azeotropic compositon of benzene is 60 percent\n",
+ " Total pressure of azeotrope is 40.858067 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate equilibrium pressure and composition\n",
+ "\n",
+ "# Variables\n",
+ "a12 = 1225.31; \t\t\t#(J/mol)\n",
+ "a21 = 6051.01; \t\t\t#(J/mol)\n",
+ "V1 = 74.05*10**-6; \t\t\t#(m**3/mol)\n",
+ "V2 = 18.07*10**-6; \t\t\t#(m**3/mol)\n",
+ "\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "T = 349; \t\t\t#temperature in K\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#Antoine Equation:\n",
+ "#Vapour pressure of 1st element\n",
+ "def P1(T):\n",
+ " y1 = math.e**(14.39155-(2795.817/(T-43.198)))\n",
+ " return y1\n",
+ "\n",
+ "\t\t\t#Vapour pressure of 2nd element\n",
+ "def P2(T):\n",
+ " y2 = math.e**(16.26205-(3799.887/(T-46.854)))\n",
+ " return y2\n",
+ "\n",
+ "\t\t\t#To calculate equilibrium pressure and composition\n",
+ "\t\t\t#Using eq. 8.73 (Page no. 350)\n",
+ "\t\t\t#Wilson Parameters:\n",
+ "W12 = (V2/V1)*math.e**(-a12/(R*T));\n",
+ "W21 = (V1/V2)*math.e**(-a21/(R*T));\n",
+ "import math\n",
+ "\t\t\t#Using Antoine equation\n",
+ "P1_s = P1(T);\n",
+ "P2_s = P2(T);\n",
+ "\n",
+ "\t\t\t#(a). Composition of vapour in equilibrium\n",
+ "x1 = 0.43;\n",
+ "x2 = 1-x1;\n",
+ "\n",
+ "\t\t\t#Using eq. 8.72 (Page no. 350)\n",
+ "\t\t\t#Wilson equations:\n",
+ "\t\t\t#Activity coeffecient of 1st component\n",
+ "def g_1(n1,n2): \t\t\t#n1 is mol fraction of 1 and n2 is for 2\n",
+ " y3 = math.e**(-math.log(n1 + W12*n2) + n2*((W12/(n1+W12*n2))-(W21/(W21*n1+n2))));\n",
+ " return y3\n",
+ "\n",
+ "\t\t\t#Activity coeffecint of 2nd component\n",
+ "def g_2(n1,n2):\n",
+ " y4 = math.e**(-math.log(n2 + W21*n1) - n1*((W12/(n1+W12*n2))-(W21/(W21*n1+n2))));\n",
+ " return y4\n",
+ " \n",
+ "\t\t\t#Activity coeffecients:\n",
+ "g1 = g_1(x1,x2);\n",
+ "g2 = g_2(x1,x2);\n",
+ "\n",
+ "P = (g1*x1*P1_s) + (g2*x2*P2_s);\n",
+ "y1 = (g1*x1*P1_s)/P;\n",
+ "\n",
+ "# Results\n",
+ "print '(a).'\n",
+ "print ' Equilibrium pressure is %f kPa'%P\n",
+ "print ' Composition of acetone vapour in equilibrium is %f'%y1\n",
+ "\n",
+ "\n",
+ "#(b). Composition of liquid in equilibrium\n",
+ "y1 = 0.8;\n",
+ "y2 = 1-y1;\n",
+ "g1 = 1; g2 = 1; \t\t\t#assumed activity coeffecients\n",
+ "P_as = 1/((y1/(g1*P1_s)) + (y2/(g2*P2_s)));\n",
+ "\n",
+ "\t\t\t#Hit and trial method:\n",
+ "flag = 1;\n",
+ "while(flag==1):\n",
+ " x1 = (y1*P_as)/(g1*P1_s);\n",
+ " x2 = 1-x1;\n",
+ " g1 = g_1(x1,x2);\n",
+ " g2 = g_2(x1,x2);\n",
+ " P_calc = 1/((y1/(g1*P1_s)) + (y2/(g2*P2_s)));\n",
+ " if((P_calc-P_as)<=1) and ((P_calc-P_as)>=-1):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " P_as = P_calc;\n",
+ "\n",
+ "print ' (b).'\n",
+ "print ' Equilibrium Pressure is %f kPa'%P_calc\n",
+ "print ' Composition of acetone in liquid in equilibrium is %f'%x1\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).\n",
+ " Equilibrium pressure is 162.828251 kPa\n",
+ " Composition of acetone vapour in equilibrium is 0.795360\n",
+ " (b).\n",
+ " Equilibrium Pressure is 164.488565 kPa\n",
+ " Composition of acetone in liquid in equilibrium is 0.456817\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine parameters in Wilsons equation\n",
+ "\n",
+ "# Variables\n",
+ "P = 101.3; \t\t\t#total pressure of system (kPa)\n",
+ "T = 337.5; \t\t\t#temperature in K\n",
+ "x1 = 0.842;\n",
+ "\n",
+ "#Antoine constants\n",
+ "#For methanol(1)\n",
+ "A1 = 16.12609;\n",
+ "B1 = 3394.286;\n",
+ "C1 = 43.2;\n",
+ "\n",
+ "#For methyl ethyl ketone (2)\n",
+ "A2 = 14.04357;\n",
+ "B2 = 2785.225;\n",
+ "C2 = 57.2;\n",
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine parameters in Wilson's equation\n",
+ "P1_s = math.e**(A1-(B1/(T-C1)))\n",
+ "P2_s = math.e**(A2-(B2/(T-C2)))\n",
+ "x2 = 1-x1;\n",
+ "g1 = P/P1_s;\n",
+ "g2 = P/P2_s;\n",
+ "\n",
+ "#Using eq. 8.72 and rearranging:\n",
+ "def Wils(n): \t\t\t#n is the Wilson's parameter W12\n",
+ " y1 = (((g1*x2)/(1-(n*x1/(x1+n*x2))+(x1/x2)*math.log(g1*(x1+n*x2))))**(x2/x1))*(g1*(x1+n*x2))\n",
+ " return y1\n",
+ "\n",
+ "flag = 1;\n",
+ "W12 = 0.5; \t\t\t#assumed value\n",
+ "while(flag==1):\n",
+ " res = Wils(W12)\n",
+ " if ((res-1)>=-0.09):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " W12 = W12+0.087;\n",
+ "\n",
+ "\t\t\t#For 2nd Wilson parameter:\n",
+ "\t\t\t#Using eq. 8.72 and rearranging:\n",
+ "k = math.log(g1*(x1+W12*x2))/x2 - (W12/(x1+W12*x2))\n",
+ "W21 = (-k*x2)/(1+k*x1)\n",
+ "\n",
+ "# Results\n",
+ "print \"wilson parameters are: %f, %f\"%(W12,W21)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wilson parameters are: 0.935000, 0.470758\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\n",
+ "from numpy import *\n",
+ "\n",
+ "# Variables\n",
+ "P = 101.3; \t\t\t#total pressure in kPa\n",
+ "T = [333, 343, 353, 363]; \t\t\t#temperatures(K)\n",
+ "Pa = [81.97 ,133.29 ,186.61, 266.58]; \t\t\t#Partial pressure of component A (kPa)\n",
+ "Pb = [49.32 ,73.31, 106.63, 166.61]; \t\t\t#Partial pressure of component B (kPa)\n",
+ "Pc = [39.32 ,62.65, 93.30, 133.29]; \t\t\t#Partial pressure of component C (kPa)\n",
+ "xa = 0.45; \t\t\t#mole fraction of methanol\n",
+ "xb = 0.3; \t\t\t#mole fraction of ethanol\n",
+ "\n",
+ "# Calculations and Results\n",
+ "xc = 1-xa-xb; \t\t\t#mole fraction of propanol\n",
+ "\n",
+ "#To calculate bubble and dew point and the composition \n",
+ "#(a). To calculate bubble point and vapour composition\n",
+ "from matplotlib.pyplot import *\n",
+ "plot(T,Pa);\n",
+ "plot(T,Pb);\n",
+ "plot(T,Pc);\n",
+ "\t\t\t#title(\" \",\"Temperature\",\"Vapour pressures\");\n",
+ "\t\t\t#legend(\"Pa\",\"Pb\",\"Pc\");\n",
+ "\n",
+ "\t\t\t#Using eq. 8.84 (Page no. 362)\n",
+ "\t\t\t#At bubble temperature, sum(yi) = sum((xi*Pi)/P) = 1\n",
+ "sum_y = [0,0,0,0]\n",
+ "for i in range(4):\n",
+ " sum_y[i] = (xa*Pa[i])/P + (xb*Pb[i])/P + (xc*Pc[i])/P;\n",
+ "\n",
+ "Tb = interp(1,sum_y,T); \t\t\t#obtaining temperature at which sum (yi) = 1\n",
+ "\n",
+ "\t\t\t#Obtaining vapour pressures at bubble temperature\n",
+ "Pb1 = interp(Tb,T,Pa);\n",
+ "Pb2 = interp(Tb,T,Pb);\n",
+ "Pb3 = interp(Tb,T,Pc);\n",
+ "\n",
+ "\t\t\t#Calculating equilibrium vapour composition\n",
+ "ya = (xa*Pb1*100)/P;\n",
+ "yb = (xb*Pb2*100)/P;\n",
+ "yc = (xc*Pb3*100)/P;\n",
+ "\n",
+ "print '(a).'\n",
+ "print ' The bubble temperature is %f K'%Tb\n",
+ "print ' The equilibrium vapour contains %f methanol, %f ethanol and %f propanol'%(ya,yb,yc)\n",
+ "\n",
+ "#(b). The dew point and liquid composition\n",
+ "#Vapour phase compositions at dew point\n",
+ "ya = 0.45; \t\t\t#methanol\n",
+ "yb = 0.30; \t\t\t#ethanol\n",
+ "yc = 0.25; \t\t\t#propanol\n",
+ "\n",
+ "sum_x = zeros(4)\n",
+ "#At dew point, sum(xi) = sum ((yi*P)/Pi) = 1\n",
+ "for i in range(4):\n",
+ " sum_x[i] = (ya*P)/Pa[i] + (yb*P)/Pb[i] + (yc*P)/Pc[i];\n",
+ "\n",
+ "Td = interp(1,sum_x,T); \t\t\t#obtaining temperature at which sum (xi) = 1\n",
+ "\n",
+ "#Obtaining vapour pressures at dew temperature\n",
+ "Pd1 = interp(Td,T,Pa);\n",
+ "Pd2 = interp(Td,T,Pb);\n",
+ "Pd3 = interp(Td,T,Pc);\n",
+ "\n",
+ "#Calculating liquid composition\n",
+ "xa = (ya*P*100)/Pd1;\n",
+ "xb = (yb*P*100)/Pd2;\n",
+ "xc = (yc*P*100)/Pd3;\n",
+ "\n",
+ "print ' (c).'\n",
+ "print ' The dew point is %f K'%Td\n",
+ "print ' At dew point liquid contains %f methanol, %f ethanol and %f propanol'%(xa,xb,xc)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).\n",
+ " The bubble temperature is 343.879659 K\n",
+ " The equilibrium vapour contains 61.294328 methanol, 22.578783 ethanol and 16.126889 propanol\n",
+ " (c).\n",
+ " The dew point is 363.000000 K\n",
+ " At dew point liquid contains 17.099932 methanol, 18.240202 ethanol and 18.999925 propanol\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYlGXeB/AvoHjCIyfNIUHMAzAgHvCELuBbFFRiWXju\n3dqUslqty9Xt7W2xdwt11/XQqmHakQ7a1moraVqAKYogHhBLTAVlMGAAUZAz87x/3M7AyEGBmXlm\nmO/nuuaSOMz8fK7p64/7vp/7tpEkSQIREXVqtnIXQERExsewJyKyAgx7IiIrwLAnIrICDHsiIivA\nsCcisgKthn1VVRXGjx8Pf39/DB8+HMuWLQMAlJSU4MEHH4Svry9CQ0NRWlqq+5mYmBh4eXlBqVTi\nwIEDxq2eiIjuic3d1tlXVlaiR48eqKurQ2BgIGJiYvDNN9/A09MTS5cuxYYNG5CdnY2NGzciPT0d\nUVFRSElJQX5+PgIDA5GVlQV7e3tT/X2IiKgZdx3G6dGjBwCgpqYG9fX1cHFxwXfffYcFCxYAAObP\nn4/4+HgAQHx8PGbPng07OzsMHjwY3t7eSE1NNWL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D27dvBwCM\nHTsWM2fOhK+vL2xtbREbG4uuXbsauiyj1Z+YmIi//OUvsLW1hSRJ2LRpE5ycnMyu/sYa719kKde/\nscb1m9P1b6n2BQsWICMjAzU1NRgyZAh27NgBwHKufUv1m9O1b63+hx56CM8++yx8fHwAAB999BFs\nbW0t5vq3VH9brz9vqiIisgI8lpCIyAow7ImIrADDnojICjDsiYisAMOeiMgKMOyJiKwAw56IyAow\n7ImIrMD/A7UqI330WejFAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2f23e50>"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given:\n",
+ "#All Ki values are obtained from Fig. 13.6 0f Chemical Engineer's Handbook, 5th ed.\n",
+ "P = 1447.14; \t\t\t#pressure of the system (kPa)\n",
+ "x = [0.25 ,0.4, 0.35]; \t\t\t#composition of the components\n",
+ "T = [355.4 ,366.5]; \t\t\t#assumed temperatures (K)\n",
+ "K1 = [2.00, 0.78 ,0.33]; \t\t\t#value of Ki at 355.4 K \n",
+ "K2 = [2.30, 0.90 ,0.40]; \t\t\t#value of Ki at 366.5 K\n",
+ "\n",
+ "\n",
+ "# Calculation and Result\n",
+ "#To calculate bubble and dew point temperatures\n",
+ "#(a). The bubble point temperature and composition of the vapour\n",
+ "\n",
+ "#At bubble point temperature, sum(K*x) = 1\n",
+ "Kx = [0, 0];\n",
+ "for i in range(3):\n",
+ " Kx[0] = Kx[0]+K1[i]*x[i];\n",
+ " Kx[1] = Kx[1]+K2[i]*x[i];\n",
+ "\n",
+ "Tb = interp(1,Kx,T);\n",
+ "\n",
+ "#At Tb K, from Fig. 13.6 of Chemical Engineer's Handbook\n",
+ "Kb = [2.12 ,0.85 ,0.37]\n",
+ "\n",
+ "#Calculation of vapour composition\n",
+ "y1 = Kb[0]*x[0]*100;\n",
+ "y2 = Kb[1]*x[1]*100;\n",
+ "y3 = Kb[2]*x[2]*100;\n",
+ "\n",
+ "print '(a).'\n",
+ "print ' The bubble point temperature is %f K'%Tb\n",
+ "print ' At bubble point vapour contains %f percent propane, %f percent butane and %f percent pentane'%(y1,y2,y3)\n",
+ "\n",
+ "#(b). The dew point temperature and composition of the liquid\n",
+ "T = [377.6 ,388.8]; \t\t\t#assumed temperatures (K)\n",
+ "y = [0.25, 0.40, 0.35]; \t\t\t#vapour composition at dew point\n",
+ "K1 = [2.6, 1.1, 0.5]; \t\t\t#at 377.6 K\n",
+ "K2 = [2.9, 1.3, 0.61]; \t\t\t#at 388.8 K\n",
+ "\n",
+ "#At dew point, sum(yi/Ki) = 1\n",
+ "Ky = [0, 0];\n",
+ "for i in range(3):\n",
+ " Ky[0] = Ky[0] + y[i]/K1[i];\n",
+ " Ky[1] = Ky[1] + y[i]/K2[i];\n",
+ "\n",
+ "Td = interp(1,Ky,T);\n",
+ "\n",
+ "#At Td K,\n",
+ "Kd = [2.85, 1.25, 0.59];\n",
+ "\n",
+ "#Calculation of liquid composition\n",
+ "x1 = y[0]*100/Kd[0];\n",
+ "x2 = y[1]*100/Kd[1];\n",
+ "x3 = y[2]*100/Kd[2];\n",
+ "\n",
+ "print ' (b).'\n",
+ "print ' The dew point temperature is %f K'%Td\n",
+ "print ' Liquid at dew point contains %f percent propane, %f percent butane and %f percent pentane'%(x1,x2,x3)\n",
+ "\n",
+ "#(c). Temperature and composition when 45% of initial mixture is vaporised\n",
+ "#Basis: \n",
+ "F = 100; \n",
+ "V = 45; \n",
+ "L = 55;\n",
+ "\n",
+ "#For the given condition eq. 8.91 (Page no. 364) is to be satisfied\n",
+ "#sum(zi/(1+ L/(VKi))) = 0.45\n",
+ "\n",
+ "z = [0.25, 0.4, 0.35];\n",
+ "T = [366.5 ,377.6]; \t\t\t#assumed temperatures\n",
+ "K1 = [2.3 ,0.9 ,0.4]; \t\t\t#at 366.5 K\n",
+ "K2 = [2.6 ,1.1 ,0.5]; \t\t\t#at 377.6 K\n",
+ "\n",
+ "Kz = [0 ,0];\n",
+ "for i in range(3):\n",
+ " Kz[0] = Kz[0] + z[i]/(1 + L/(V*K1[i]));\n",
+ " Kz[1] = Kz[1] + z[i]/(1 + L/(V*K2[i]));\n",
+ "\n",
+ "#The required temperature is T3\n",
+ "T3 = interp(.45,Kz,T);\n",
+ "\n",
+ "#At T3 K\n",
+ "K3 = [2.5, 1.08, 0.48];\n",
+ "\n",
+ "#Calculating liquid and vapour compositions\n",
+ "for i in range(3):\n",
+ " y[i] = (z[i]/(1 + L/(V*K3[i])))/0.45;\n",
+ " x[i] = ((F*z[i]) - (V*y[i]))/L;\n",
+ " print (x[i]);\n",
+ "\n",
+ "\n",
+ "print ' (c).'\n",
+ "print ' The equilibrium temperature is %f K'%T3\n",
+ "print ' Liquid composition in equilibrium is %f percent propane, %f percent butane \\\n",
+ "and %f percent pentane'%(x[0]*100,x[1]*100,x[2]*100)\n",
+ "print ' Vapour composition in equilibrium is %f percent propane, %f percent butane \\\n",
+ "and %f percent pentane'%(y[0]*100,y[1]*100,y[2]*100);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).\n",
+ " The bubble point temperature is 360.855932 K\n",
+ " At bubble point vapour contains 53.000000 percent propane, 34.000000 percent butane and 12.950000 percent pentane\n",
+ " (b).\n",
+ " The dew point temperature is 388.800000 K\n",
+ " Liquid at dew point contains 8.771930 percent propane, 32.000000 percent butane and 59.322034 percent pentane\n",
+ "0.149253731343\n",
+ "0.3861003861\n",
+ "0.456919060052\n",
+ " (c).\n",
+ " The equilibrium temperature is 374.651845 K\n",
+ " Liquid composition in equilibrium is 14.925373 percent propane, 38.610039 percent butane and 45.691906 percent pentane\n",
+ " Vapour composition in equilibrium is 37.313433 percent propane, 41.698842 percent butane and 21.932115 percent pentane\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To test whetherthe given data are thermodynamically consistent or not\n",
+ "\n",
+ "from numpy import array\n",
+ "\n",
+ "# Variables\n",
+ "P = 101.3; \t\t\t#total pressure (kPa)\n",
+ "x1 = array([0.003, 0.449, 0.700, 0.900])\n",
+ "y1 = array([0.432, 0.449, 0.520, 0.719])\n",
+ "P1 = [65.31 ,63.98, 66.64, 81.31]; \t\t\t#(kPa)\n",
+ "P2 = [68.64 ,68.64, 69.31, 72.24]; \t\t\t#(kPa)\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "#To test whether the given data are thermodynamically consistent or not\n",
+ "x2 = 1-x1;\n",
+ "y2 = 1-y1;\n",
+ "g1= [0,0,0,0]\n",
+ "g2 = [0,0,0,0]\n",
+ "c=[0,0,0,0]\n",
+ "import math\n",
+ "for i in range(4):\n",
+ " g1[i] = (y1[i]*P)/(x1[i]*P1[i])\n",
+ " g2[i] = (y2[i]*P)/(x2[i]*P2[i])\n",
+ " c[i] = math.log(g1[i]/g2[i]) \t\t\t#k = ln (g1/g2)\n",
+ "from matplotlib.pyplot import *\n",
+ "plot(x1,c)\n",
+ "\t\t\t#a = get(\"current_axes\"\n",
+ "\t\t\t#set(a,\"x_location\",\"origin\"\n",
+ "\n",
+ "# Results\n",
+ "show()\n",
+ "\t\t\t#As seen from the graph net area is not zero\n",
+ "print 'The given math.experimental data do not satisfy the Redlich-Kistern criterion'\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH7R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IEDfffLNYtWqV8ky7d+8WN998s4iNjRW5ubmipqbmmsfkw0dERDrC19kREekI\nS52ISEdY6kREOsJSJyLSEZY6EZGOsNSJiHSEpU5EpCMsdSIiHfl/2hihodD/xAQAAAAASUVORK5C\nYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x227f050>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The given math.experimental data do not satisfy the Redlich-Kistern criterion\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To estimate the constants in Margules equation\n",
+ "\n",
+ "# Variables\n",
+ "x1 = [0.0331, 0.9652]; \t\t\t#composition of chloroform\n",
+ "P = [40.84 ,84.88]; \t\t\t#total pressure for system (kPa)\n",
+ "P1 = 82.35; \t\t\t#vapour pressure of chloroform at 328 K (kPa)\n",
+ "P2 = 37.30; \t\t\t#vapour pressure of acetone at 328 K (kPa) \n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#To estimate the constants in Margules equation\n",
+ "#Using eq. 8.103 and 8.104 (Page no. 375)\n",
+ "g1_inf = (P[0]-(1-x1[0])*P2)/(x1[0]*P1)\n",
+ "g2_inf = (P[1]-(x1[1]*P1))/((1-x1[1])*P2)\n",
+ "\n",
+ "import math\n",
+ "A = math.log(g1_inf)\n",
+ "B = math.log(g2_inf)\n",
+ "\n",
+ "# Results\n",
+ "print 'Margules constants are:'\n",
+ "print ' A = %f'%A\n",
+ "print ' B = %f'%B\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Margules constants are:\n",
+ " A = 0.560560\n",
+ " B = 1.424762\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the partial pressure of water in vapour phase\n",
+ "\n",
+ "# Variables\n",
+ "x1 = [0., 0.033, 0.117, 0.318, 0.554, 0.736, 1.000]; \t\t\t#liquid composition of acetone\n",
+ "pp1 = [0.,25.33, 59.05, 78.37, 89.58,94.77, 114.63]; \t\t\t#partial pressure of acetone (kPa)\n",
+ "Pw = 19.91; \t\t\t#vapour pressure of water at 333 K (kPa)\n",
+ "k = [0,0,0,0,0,0,0]\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(1,6):\n",
+ " k[i] = x1[i]/((1.-x1[i])*pp1[i])\n",
+ "\n",
+ "k[6] = 0.1; \t\t\t#k(7) should tend to infinity\n",
+ "from matplotlib.pyplot import *\n",
+ "plot(pp1,k)\n",
+ "show()\n",
+ "\t\t\t#From graph% area gives the integration and hence partiaal pressure of water is calculated\n",
+ "pp2 = [19.91, 19.31, 18.27, 16.99, 15.42, 13.90, 0];\n",
+ "\n",
+ "# Results\n",
+ "print \"The results are:\"\n",
+ "print ' Acetone composition Partial pressure of water'\n",
+ "for i in range(7):\n",
+ " print ' %f %f'%(x1[i],pp2[i])\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH5pJREFUeJzt3X9UlPWeB/A3vwK7WvkLyhn8Eagww2AzCxqu604/DPHH\n5gpK6h07ZC3XW+vJ3La7f+xR15Mt/jjKpnHxptxbUEZ5K28Qx2M6lZZEC6TYdVUUncEof6aE0MB8\n948n5oLCzMDM8MzM836dMwdm5vvMfL51ztsPz/N9nidECCFARESKESp3AURENLAY/ERECsPg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DH4iIoVh8BMRKcz/Axc5FnWtf/T6AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x30fad10>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The results are:\n",
+ " Acetone composition Partial pressure of water\n",
+ " 0.000000 19.910000\n",
+ " 0.033000 19.310000\n",
+ " 0.117000 18.270000\n",
+ " 0.318000 16.990000\n",
+ " 0.554000 15.420000\n",
+ " 0.736000 13.900000\n",
+ " 1.000000 0.000000\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.27 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# to calculate under three phase equilibrium\n",
+ "\n",
+ "# Variables\n",
+ "P = 93.30; \t\t\t#total pressure in kPa\n",
+ "T1 = 353.; \t\t\t#(K)\n",
+ "T2 = 373.; \t\t\t#(K)\n",
+ "Pa1 = 47.98; \t\t\t#Vapour pressure of water at 353 K (kPa)\n",
+ "Pb1 = 2.67; \t\t\t#Vapour pressure of liquid at 353 K (kPa)\n",
+ "Pa2 = 101.3; \t\t\t#Vapour pressure of water at 373 K (kPa)\n",
+ "Pb2 = 5.33; \t\t\t#Vapour pressure of liquid at 373 K (kPa)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate under three phase equilibrium:\n",
+ "#(a). The equilibrium temperature\n",
+ "P1 = Pa1+Pb1; \t\t\t#sum of vapour pressures at 353 K\n",
+ "P2 = Pa2+Pb2; \t\t\t#at 373 K\n",
+ "\n",
+ "#Since vapour pressure vary linearly with temperature% so T at which P = 93.30 kPa\n",
+ "T = T1 + ((T2-T1)/(P2-P1))*(P-P1)\n",
+ "print '(a). The equilibrium temperature is %f K'%T\n",
+ "\n",
+ "#(b). The composition of resulting vapour\n",
+ "#At equilibrium temp:\n",
+ "Pa = 88.5; \t\t\t#vapour pressure of water (kPa)\n",
+ "Pb = 4.80; \t\t\t#vapour pressure of liquid (kPa)\n",
+ "\n",
+ "#At 3-phase equilibrium% ratio of mol fractions of components is same as the ratio of vapour pressures\n",
+ "P = Pa+Pb; \t\t\t#sum of vapour pressures\n",
+ "y = Pa/P; \t\t\t#mole fraction of water\n",
+ "print ' The vapour contains %f mol percent water vapour'%(y*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). The equilibrium temperature is 368.237585 K\n",
+ " The vapour contains 94.855305 mol percent water vapour\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To prepare temperature composition diagram\n",
+ "\n",
+ "# Variables\n",
+ "T = [323 ,333, 343, 348, 353, 363, 373]; \t\t\t#temperatures (K)\n",
+ "P2 = [12.40 ,19.86, 31.06, 37.99, 47.32, 70.11, 101.3]; \t\t\t#vapour pressure for benzene (kPa)\n",
+ "P1 = [35.85 ,51.85, 72.91, 85.31, 100.50, 135.42, 179.14]; \t\t\t#vapour pressure for water (kPa)\n",
+ "Tb = 353.1; \t\t\t#boiling temperature (K)\n",
+ "Pb = 101.3; \t\t\t#boiling pressure (kPa)\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To prepare temperature composition diagram\n",
+ "#To find three phase temperature\n",
+ "P = [0,0,0,0,0,0,0]\n",
+ "for i in range(7):\n",
+ " P[i] = P1[i] + P2[i];\n",
+ "from matplotlib.pyplot import *\n",
+ "plot(P,T)\n",
+ "\t\t\t#From graph, at P = 101.3 kPa..\n",
+ "T_ = 340.; \t\t\t#three phase temperature\n",
+ "\n",
+ "\t\t\t#At three phase temperature\n",
+ "P1_ = 71.18; \t\t\t#(kPa)\n",
+ "P2_ = 30.12; \t\t\t#(kPa)\n",
+ "xb_ = P1_/Pb; \t\t\t#mol fraction of benzene at triple point\n",
+ "\n",
+ "\t\t\t#For the dew point curve\n",
+ "\t\t\t#For curve BE in temp range from 342 to 373 K\n",
+ "y1 = [0,0,0,0,0,0,0]\n",
+ "for i in range(2,7):\n",
+ " y1[i] = 1-(P2[i]/Pb )\n",
+ "\n",
+ "\t\t\t#xset('window',1\n",
+ "T1 = [0,0,0,0,0,0,0]\n",
+ "y1_ = [0,0,0,0,0,0,0]\n",
+ "T1[0] = 342\n",
+ "y1_[0] = 0.7;\n",
+ "for i in range(1,6):\n",
+ " T1[i] = T[i+1];\n",
+ " y1_[i] = y1[i+1];\n",
+ "\n",
+ "plot(y1_,T1)\n",
+ "y2 = [0,0,0,0,0,0,0]\n",
+ "\t\t\t#For the curve Ae in the temp range of 342 K to 353.1 K\n",
+ "for i in range(2,5):\n",
+ " y2[i] = P1[i]/Pb;\n",
+ "\n",
+ "T2 = [0,0,0,0,0,0,0]\n",
+ "y2_ = [0,0,0,0,0,0,0]\n",
+ "T2[0] = 342.;\n",
+ "y2_[0] = 0.7;\n",
+ "for i in range(1,4):\n",
+ " T2[i] = T[i+1]\n",
+ " y2_[i] = y2[i+1]\n",
+ "\n",
+ "plot(y2_,T2)\n",
+ "\t\t\t#axhspan(0.25,0.75,facecolor='0.5'\n",
+ "\t\t\t#title(\"Temperature Composition diagram\",\"xa,ya\",\"Temperature\"\n",
+ "show()\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAD9CAYAAABdoNd6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG+JJREFUeJzt3X9wVPW9//Hnwey0UqjQK1norvculyQNCyFZS5NMp06X\nhmC9Xtd4caKx0r0K9w+Y3hkL7S38oSZ1JLEt1wFqZrw2fr+x3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369axduzZ+ueng4CB2ux0Au93O4ODgbE5x2sZaT19f36grreby\n+dy/fz/5+fls3rw5/m3yXF9fd3c3bW1tFBUVpd05vLS24uJiIH3OXzQapaCgALvdHm9ZJevcpTTs\n0/H6+uPHj9PW1saRI0d45plnOHbs2KjXDcNIq3VPtJ65uNatW7fS1dVFe3s7y5YtY8eOHWPuO1fW\nNzw8zMaNG9m7dy8LFy4c9dpcP4fDw8Pce++97N27lwULFqTV+Zs3bx7t7e309vby6quvcvTo0VGv\nT+fcpTTsJ3MN/lyzbNkyAJYsWcI999xDMBjEbrczMDAAQH9/P5mZmbM5xWkbaz1Xns/e3l4cDses\nzHE6MjMz4/+JtmzZEv9WeK6u78KFC2zcuJFNmzZRVlYGpM85vLS2Bx98ML62dDt/ADfddBN33nkn\nb7zxRtLOXUrDPt2uwT937hxnzpwB4OzZs7S2tpKXl4fP56O+vh6A+vr6+D/KuWqs9fh8PhoaGohE\nInR1ddHZ2Rm/Imku6e/vjz8/dOhQ/Eqdubg+0zTZvHkzbrebRx55JL49Hc7hWGtLl/N34sSJeAvq\n008/5eWXX8bj8STv3M3oj5YTeOmll8ycnBxzxYoV5u7du1M9fFK9//77Zn5+vpmfn2+uWrUqvp6T\nJ0+aJSUlZnZ2tllaWmp+/PHHszzTybv//vvNZcuWmTabzXQ6nebzzz8/7nqefPJJc8WKFeZXvvIV\ns6WlZRZnPjlXrq+urs7ctGmTmZeXZ65Zs8a8++67zYGBgfj+c219x44dMw3DMPPz882CggKzoKDA\nPHLkSFqcw0Rre+mll9Lm/L355pumx+Mx8/Pzzby8PPMnP/mJaZrj58m1rC/p98YREZHrjz6pSkTE\nAhT2IiIWoLAXEbEAhb2IiAUo7EVELEBhLyJiAf8PLH4K5zRwZxUAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2cc5c50>"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb
new file mode 100644
index 00000000..a4ef1c21
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/ch9.ipynb
@@ -0,0 +1,1102 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Chemical Reaction Equilibria"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate equilibrium constant\n",
+ "\n",
+ "import math\n",
+ "#Given:\n",
+ "Go_reac = 97540.; \t\t\t#standard free energy of formation of reactant (J/mol)\n",
+ "Go_pdt = 51310.; \t\t\t#standard free energy of formation of product (J/mol)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "T = 298.; \t\t\t#temperature (K)\n",
+ "#Reaction: N2O4(g) --> 2NO2(g)\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate equilibrium constant\n",
+ "#Using eq. 9.50 (Page no.413)\n",
+ "Go = 2*Go_pdt - Go_reac;\n",
+ "#Using eq. 9.31 (Page no. 406)\n",
+ "K = math.e**(-Go/(R*T))\n",
+ "\n",
+ "# Results\n",
+ "print 'The equilbrium constant %f'%K\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilbrium constant 0.128684\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate equilibrium constant at 500 K\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 298.; \t\t\t#temperature in K\n",
+ "Hf = -46100.; \t\t\t#standard heat of formation (J/mol)\n",
+ "Go = -16500.; \t\t\t#standard free energy change (J/mol)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "T = 500.; \n",
+ "#Reaction: N2(g) + 3H2(g) --> 2NH3(g)\n",
+ "#To calculate the equilibrium constant at 500 K\n",
+ "#Using eq. 9.50 (Page no. 413)\n",
+ "\n",
+ "# Calculations\n",
+ "del_Go = 2*Go;\n",
+ "import math\n",
+ "#Using eq. 9.31 (Page no. 406)\n",
+ "K1 = math.e**(-del_Go/(R*T1)) \t\t\t#equilibrium const at 298 K\n",
+ "Ho = 2*Hf; \t\t\t#standard heat of reaction\n",
+ "\n",
+ "#Using eq. 9.37 (Page no. 411)\n",
+ "K = K1*(math.e**((-Ho/R)*(1/T - 1/T1)))\n",
+ "\n",
+ "# Results\n",
+ "print 'The equilibrium constant at 500 K is %f'%K\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium constant at 500 K is 0.179981\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To alculate standard free energy change and heat of formation\n",
+ "\n",
+ "# Variablesa\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "T2 = 317.; \t\t\t#temperature in K\n",
+ "T1 = 391.; \t\t\t#(K)\n",
+ "x2 = 0.31; \t\t\t#mol fraction of n-butane at 317 K\n",
+ "x1 = 0.43; \t\t\t#mol fraction of iso-butane at 391 K\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate standard free energy change and heat of reaction\n",
+ "#At 317 K\n",
+ "K2 = (1-x2)/x2; \t\t\t#equilibrium constant at 317 K\n",
+ "K1 = (1-x1)/x1; \t\t\t#equilibrium constant at 391 K\n",
+ "import math\n",
+ "#Using eq. 9.31 (Page no. 406)\n",
+ "#Standard free energy change\n",
+ "G2 = -R*T2*math.log(K2 )\t\t\t#at 317 K (J/mol)\n",
+ "G1 = -R*T1*math.log(K1 )\t\t\t#at 391 K (J/mol)\n",
+ "\n",
+ "#Using eq. 9.37 (Page no. 411)\n",
+ "Ho = -math.log(K2/K1)*R/(1/T2 - 1/T1)\n",
+ "\n",
+ "# Calculations\n",
+ "print 'Standard free energy change of the reaction'\n",
+ "print ' At 317 K is %f J/mol'%G2\n",
+ "print ' At 391 K is %f J/mol'%G1\n",
+ "print ' Average value of heat of reaction is %f J/mol'%Ho\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Standard free energy change of the reaction\n",
+ " At 317 K is -2108.744820 J/mol\n",
+ " At 391 K is -916.234397 J/mol\n",
+ " Average value of heat of reaction is -7217.201631 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To estimate free energy change and equilibrium constant at 700 K\n",
+ "\n",
+ "# Variables\n",
+ "To = 298.; \t\t\t#temperature in K\n",
+ "T = 700.; \t\t\t#(K)\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "Hf = -46100.; \t\t\t#standard heat of formation (J/mol)\n",
+ "Gf = -16500.; \t\t\t#standard free energy of formtion of ammonia (J/mol)\n",
+ "\n",
+ "# Calculations\n",
+ "Ho = 2*Hf;\n",
+ "Go = 2*Gf;\n",
+ "alpha = 2*29.75 - 27.27 - 3*27.01;\n",
+ "betta = (2*25.11 - 4.93 - 3*3.51)*10**-3;\n",
+ "import math\n",
+ "#Using eq. 9.46 (Page no. 412)\n",
+ "del_H = Ho - alpha*To - (betta/2)*To**2;\n",
+ "#Using eq. 9.48 (Page no. 413)\n",
+ "A = -(Go - del_H + alpha*To*math.log(To) + (betta/2)*To**2)/(R*To)\n",
+ "\n",
+ "#Using eq. 9.47 and 9.48 (Page no. 412)\n",
+ "K = math.e**((-del_H/(R*T)) + (alpha/R)*math.log(T) + (betta/(2*R))*T + A)\n",
+ "G = del_H - alpha*T*math.log(T) -(betta/2)*T**2 - A*R*T;\n",
+ "\n",
+ "# Results\n",
+ "print 'At 700 K'\n",
+ "print ' Equilibrium constant is %3.2e'%K\n",
+ "print ' Standard free energy change is %f J/mol'%G\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At 700 K\n",
+ " Equilibrium constant is 9.99e-05\n",
+ " Standard free energy change is 53606.315911 J/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# to calculate equilibrium constant at 600 K\n",
+ "\n",
+ "# Variables\n",
+ "T = 600.; \t\t\t#temperature in K\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "#Gibbs free energy at 600 K (J/mol K)\n",
+ "Gc = -203.81; \t\t\t#for CO\n",
+ "Gh = -136.39; \t\t\t#for hydrogen\n",
+ "Gm = -249.83; \t\t\t#for methanol\n",
+ "\n",
+ "#Heats of formation at 298 K (J/mol)\n",
+ "Hc = -110500.; \t\t\t#for CO\n",
+ "Hm = -200700.; \t\t\t#for methanol\n",
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "#To calculate equilibrium constant at 600 K\n",
+ "Go = T*((Gm-Gc-(2*Gh)) + (1/T)*(Hm-Hc))\n",
+ "\t\t\t#Using eq. 9.31 (Page no. 406)\n",
+ "K = math.e**(-Go/(R*T))\n",
+ "\n",
+ "# Results\n",
+ "print 'Equilibrium constant is %4.3e'%K\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equilibrium constant is 1.018e-04\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate equilibrium constant at 500K\n",
+ "\n",
+ "# Variables\n",
+ "T = 500.; \t\t\t#temperature in K\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "\n",
+ "#Free energy at 500 K (J/mol K)\n",
+ "Fn = -177.5; \t\t\t#for nitrogen\n",
+ "Fh = -116.9; \t\t\t#for hydrogen\n",
+ "Fa = -176.9; \t\t\t#for ammonia\n",
+ "\n",
+ "#The function (Ho at 298 K - Ho at 0 K) [J/mol]\n",
+ "Hn = 8669.; \t\t\t#for nitrogen\n",
+ "Hh = 8468.; \t\t\t#for hydrogen\n",
+ "Ha = 9920.; \t\t\t#for methanol\n",
+ "\n",
+ "#Free energy of formation at 298 K (J/mol)\n",
+ "Hf = -46100.;\n",
+ "import math\n",
+ "#To calculate equilibrium constant at 500 K\n",
+ "\n",
+ "# Calculations\n",
+ "#Using eq. 9.53 (Page no. 414)\n",
+ "sum_F = (2*Fa - Fn - 3*Fh) - (2*Ha - Hn - 3*Hh)/T; \t\t\t#(J/mol K)\n",
+ "#Using eq. 9.57 (Page no.415)\n",
+ "Go = T*(sum_F + 2*Hf/T)\n",
+ "K = math.e**(-Go/(R*T))\n",
+ "\n",
+ "# Results\n",
+ "print 'Equilibrium constant is %f'%K\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equilibrium constant is 0.108493\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To find the value of n\n",
+ "\n",
+ "# Variables\n",
+ "P1 = 1.; \t\t\t#pressure (bar)\n",
+ "P2 = 2.; \t\t\t#(bar)\n",
+ "x1 = 0.15; \t\t\t#mol fraction of polymer at 1 bar\n",
+ "x2 = 0.367; \t\t\t#mol fraction of polymer at 2 bar\n",
+ "\n",
+ "# Calculations\n",
+ "import math\n",
+ "n = round((math.log(x2/x1)+math.log(2))/(math.log(2)-math.log((1-x1)/(1-x2))))\n",
+ "\n",
+ "# Results\n",
+ "print 'The value of n is %i'%n\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of n is 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the percent conversion\n",
+ "\n",
+ "from scipy.optimize import root\n",
+ "\n",
+ "# Variables\n",
+ "#Reaction: N2 + 3H2 --> 2NH3\n",
+ "K = 2*10**-4; \t\t\t#equilibrium constant of reaction\n",
+ "P = 20; \t\t\t#(bar)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#e(4-2e)/(1-e)**2 = 0.73485\n",
+ "#e = poly(0,'e')\n",
+ "def f(e):\n",
+ " return 2.73845*e**2 - 5.4697*e + 0.73485;\n",
+ "x = root(f,0)\n",
+ "\n",
+ "print '(a) Percentage conversion is %f percent'%(x.x[0]*100)\n",
+ "\n",
+ "#(b)\n",
+ "P = 200; \t\t\t#(bar)\n",
+ "\n",
+ "#e(4-2e)/(1-e)**2 = 7.3485\n",
+ "\n",
+ "def f2(e):\n",
+ " return 9.3485*e**2 - 18.697*e + 7.3485;\n",
+ "x = root(f2,0)\n",
+ "print ' (b) Percentage conversion is %f percent'%(x.x[0]*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Percentage conversion is 14.485445 percent\n",
+ " (b) Percentage conversion is 53.746561 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate fractional dissociation of steam\n",
+ "\n",
+ "# Variables\n",
+ "K = 1; \t\t\t#equilibrium constant for reaction\n",
+ "\n",
+ "# Calculations and Results\n",
+ "e = 1./2;\n",
+ "print '(a) Fractional dissociation of steam is %i percent'%(e*100)\n",
+ "\n",
+ "#(b). If reactant stream is diluted with 2 mol nitrogen\n",
+ "#Mole fraction of components\n",
+ "#CO: (1-e)/4\n",
+ "#H20: (1-e)/4\n",
+ "#CO2: e/4\n",
+ "#H2: e/4\n",
+ "\n",
+ "#so% K = (e/4)(e/4)/[(1-e)/4][(1-e)/4]\n",
+ "#On solving we get\n",
+ "e = 1./2;\n",
+ "print ' (b) After dilution fractional distillation of steam is %i percent'%(e*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Fractional dissociation of steam is 50 percent\n",
+ " (b) After dilution fractional distillation of steam is 50 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine conversion of nitrogen affected by argon\n",
+ "\n",
+ "from scipy.optimize import root\n",
+ "\n",
+ "# Variables\n",
+ "K = 2.*10**-4; \t\t\t#equilibrium constant of reaction\n",
+ "P = 20.; \t\t\t#pressure in bar\n",
+ "\n",
+ "#To determine conversion of nitrogen affected by argon\n",
+ "\n",
+ "#Mole fraction of components\n",
+ "#Nitrogen: (1-e)/(6-2e)\n",
+ "#Hydrogen: 3(1-e)/(6-2e)\n",
+ "#Ammonia: 2e/(6-2e)\n",
+ "\n",
+ "#[2e/(6-2e)]**2/[(1-e)/(6-2e)][3(1-e)/(6-2e)]**3 = K*P**2\n",
+ "#e(3-e)/(1-e)**2 = 0.3674\n",
+ "\n",
+ "# Calculations\n",
+ "def f(e):\n",
+ " return 1.3674*e**2 - 3.7348*e + 0.3674;\n",
+ "x = root(f,0)\n",
+ "\n",
+ "# Results\n",
+ "print 'Percentage coversion in presence of argon is %f percent'%(x.x[0]*100)\n",
+ "print ' while in absence of argon is 14.48 percent' \t\t\t#From example 9.13\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage coversion in presence of argon is 10.219587 percent\n",
+ " while in absence of argon is 14.48 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the fractional dissociation of steam\n",
+ "\n",
+ "# Variables\n",
+ "P = 1.; \t\t\t#pressure in bar\n",
+ "K = 1.; \t\t\t#equilibrium constant of reaction\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate the fractional dissociation of steam\n",
+ "#Basis: 1 mole water vapour present in reactant stream\n",
+ "#Let e be the extent of reaction\n",
+ "\n",
+ "#(a). CO supplied is 100% in excess of the stoichiometric requirement\n",
+ "#Mole fraction of components:\n",
+ "#CO: (2-e)/3\n",
+ "#H20: (1-e)/3\n",
+ "#CO2: e/3\n",
+ "#H2: e/3\n",
+ "\n",
+ "#e**2/{(1-e)(2-e)] = K = 1% so\n",
+ "#3e-2 = 0;\n",
+ "e = 2./3;\n",
+ "print '(a). The conversion of steam is %f percent'%(e*100)\n",
+ "\n",
+ "#(b). CO supplied is only 50% of the theoretical requirement\n",
+ "#Mole fraction of components\n",
+ "#CO: (0.5-e)/1.5\n",
+ "#H20: (1-e)/1.5\n",
+ "#CO2: e/1.5\n",
+ "#H2: e/1.5\n",
+ "\n",
+ "#e**2/[(0.5-e)(1-e)] = K = 1\n",
+ "#1.5e-0.5 = 1\n",
+ "e = 0.5/1.5;\n",
+ "print ' (b). Percentage conversion of steam is %f percent'%(e*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a). The conversion of steam is 66.666667 percent\n",
+ " (b). Percentage conversion of steam is 33.333333 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the fractional distillation of steam\n",
+ "\n",
+ "# Variables\n",
+ "K = 1.; \t\t\t#equilibrium constant of reaction\n",
+ "\n",
+ "# Calculations\n",
+ "e = 1./3;\n",
+ "\n",
+ "# Results\n",
+ "print 'Percentage conversion of steam is %f percent'%(e*100)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage conversion of steam is 33.333333 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To evaluate the percent conversion of CO\n",
+ "\n",
+ "# Variables\n",
+ "#Reaction: CO(g) + 2H2(g) --> CH3OH(g)\n",
+ "Kf = 4.9*10**-5;\n",
+ "Kfi = 0.35;\n",
+ "P = 300.; \t\t\t#pressure in bar\n",
+ "n_CO = 25.;\n",
+ "n_H2 = 55.;\n",
+ "n_inert = 20.;\n",
+ "v = -1-2+1; \t\t\t#change in number of moles in reaction\n",
+ "\n",
+ "# Calculations\n",
+ "#Mole fractions in the equilibrium mixture\n",
+ "#CO = (25-e)/(100-2e)\n",
+ "#H2 = (55-2e)/(100-2e)\n",
+ "#CH3OH = e/(100-2e)\n",
+ "\n",
+ "Ky = (Kf/Kfi)*P**(-v)\n",
+ "\t\t\t#[e/(100-2e)]/[(25-e)/(100-2e)][(55-2e)/(100-2e)]**2 = Ky% so\n",
+ "\n",
+ "def f(e):\n",
+ " return (4+4*Ky)*e**3 - (400+320*Ky)*e**2 + (10000+8525*Ky)*e - 75625*Ky\n",
+ "\n",
+ "x = root(f,0)\n",
+ "conv = x.x[0]/n_CO; \t\t\t#first two roots are complex\n",
+ "\n",
+ "# Results\n",
+ "print 'Percentage conversion of CO is %f percent'%(conv*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage conversion of CO is 61.015734 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the composition of gases leaving the reactor\n",
+ "\n",
+ "# Variables\n",
+ "#Reaction: 1/2N2 + 3/2H2 --> NH3\n",
+ "Kp = 1.25*10**-2 ;\t\t\t#equilibrium constant\n",
+ "P = 50; \t\t\t#pressure in bar\n",
+ "v = 1-(3./2)-(1./2) \t\t\t#change in number of moles in reaction\n",
+ "\n",
+ "#Initial composition of gas mixture\n",
+ "n_h = 60.;\n",
+ "n_n = 20.;\n",
+ "n_inert = 100-n_h-n_n;\n",
+ "\n",
+ "# Calculations\n",
+ "#To determine the composition of gases leaving the reactor\n",
+ "#Mole fractions in the equilibrium mixture\n",
+ "#N2: [20-(e/2)]/(100-e)\n",
+ "#H2: [60-(3e/2)]/(100-e)\n",
+ "#NH3: e/(100-e)\n",
+ "Ky = Kp*(P**-v)\n",
+ "#e/(100-e)/[(20-(e/2)]**1/2[{60-(3e/2)}/(100-e)]**3/2 = Ky\n",
+ "#e = poly(0%'e'\n",
+ "\n",
+ "def f(e):\n",
+ " return (1.6875*Ky**2-1)*e**4 - (270*Ky**2+200)*e**3 + (16200*Ky**2-10000)*e**2 - (334800*Ky**2)*e + 4320000*Ky**2;\n",
+ "x = root(f,0)\n",
+ "e = x.x[0]\n",
+ "\n",
+ "#x(4) being the only positive root is the percentage conversion\n",
+ "#Mole fractions in equilibrium mixture\n",
+ "x_n = (20-(e/2))/(100-e)\n",
+ "x_h = (60-3*(e/2))/(100-e)\n",
+ "x_a = e/(100-e)\n",
+ "x_inert = 1 - x_n - x_h - x_a;\n",
+ "\n",
+ "# Results\n",
+ "print 'Composition of gas leaving the reactor is'\n",
+ "print ' Nitrogen : %f percent'%(x_n*100)\n",
+ "print ' Hydrogen : %f percent'%(x_h*100)\n",
+ "print ' Ammonia : %f percent'%(x_a*100)\n",
+ "print ' Inert gas : %f percent'%(x_inert*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Composition of gas leaving the reactor is\n",
+ " Nitrogen : 17.048802 percent\n",
+ " Hydrogen : 51.146406 percent\n",
+ " Ammonia : 9.837327 percent\n",
+ " Inert gas : 21.967465 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To evaluate the equilibrium constant\n",
+ "\n",
+ "# Variables\n",
+ "P = 85.; \t\t\t#pressure in bar\n",
+ "n_e = 0.015; \t\t\t#mol percent of ethanol\n",
+ "n_w = 0.95; \t\t\t#mole percent of water\n",
+ "n_a = 0.48; \t\t\t#mol percent of ethylene in vapour phase\n",
+ "M = 18.; \t\t\t#molecular mass of water\n",
+ "fc = 0.9; \t\t\t#fugacity coeffecient for ethylene\n",
+ "\n",
+ "#To evaluate the equilibrium constant\n",
+ "#K = a_c/(a_a*a_b)\n",
+ "# Calculations\n",
+ "m_e = n_e/(n_w*M*10**-3) \t\t\t#mol/kg water\n",
+ "a_c = m_e;\n",
+ "fa = fc*n_a*P; \t\t\t#bar\n",
+ "a_a = fa;\n",
+ "\n",
+ "#Since mol fraction of water is close to unity% so fugacity coeffecient of water is assumed to be 1\n",
+ "a_b = n_w;\n",
+ "K = a_c/(a_a*a_b)\n",
+ "\n",
+ "# Results\n",
+ "print 'The equilibrium constant is %5.4e (mol C2H4)/(kg water bar)'%K\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium constant is 2.5146e-02 (mol C2H4)/(kg water bar)\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the decomposition pressure and temperature at 1 bar\n",
+ "\n",
+ "# Variables\n",
+ "T = 1000.; \t\t\t#temperature of reaction in K\n",
+ "P = 1.; \t\t\t#pressure in bar\n",
+ "R = 8.314; \t\t\t#ideal gas constant\n",
+ "import math\n",
+ "\n",
+ "#Function for standard free energy of the reaction\n",
+ "def G(T):\n",
+ " y = 1.8856*10**5 - 243.42*T + 11.8478*T*math.log(T) - 3.1045*10**-3*T**2 + 1.7271*10**-6*T**3 - (4.1784*10**5)/T\n",
+ " return y\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#To calculate the decomposition pressure and temperaure at 1 bar\n",
+ "Go = G(T)\n",
+ "K = math.e**(-Go/(R*T))\n",
+ "#Using eq. 9.75 (Page no. 432)\n",
+ "p_CO2 = K; \t\t\t#decomposition pressure\n",
+ "print 'Decomposition pressure of limestone at 1000 K s %f bar'%p_CO2\n",
+ "\n",
+ "#At pressure = 1 bar\n",
+ "K = 1.;\n",
+ "Go = 0.; \t\t\t#since K = 1\n",
+ "\n",
+ "T = 1160.; \t\t\t#assumed temperature (K)\n",
+ "flag = 1.;\n",
+ "while(flag==1):\n",
+ " res = round(G(T))\n",
+ " if(res<=0):\n",
+ " flag = 0;\n",
+ " else:\n",
+ " T = T+1;\n",
+ "\n",
+ "print 'Decomposition temperature at 1 bar is %i K'%T\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decomposition pressure of limestone at 1000 K s 0.048344 bar\n",
+ "Decomposition temperature at 1 bar is 1169 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To evaluate wt of iron produced per 100 cubic m of gas admitted\n",
+ "\n",
+ "# Variables\n",
+ "K = 0.403; \t\t\t#equilibrium constant of reaction\n",
+ "T = 1200.; \t\t\t#temperature of reaction (K)\n",
+ "To = 273.; \t\t\t#standard temperature (K)\n",
+ "Vo = 22.4*10**-3; \t\t\t#molar volume at STP \n",
+ "M = 55.8; \t\t\t#molecular mass of iron\n",
+ "n = 100.; \t\t\t#moles of gas entering\n",
+ "n_C = 20.; \t\t\t#moles of carbon mono oxide\n",
+ "n_N = 80.; \t\t\t#moles of nitrogen\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#Let e be the extent of reaction\n",
+ "#Mole fractions in equilibrium mixture\n",
+ "#CO = (20-e)/100\n",
+ "#CO2 = e/100\n",
+ "#e/(20-e) = K\n",
+ "e = (20*K)/(1+K)\n",
+ "n_CO2 = e; \t\t\t#moles of CO2 at equilibrium\n",
+ "n_Fe = n_CO2; \t\t\t#by stoichiometry\n",
+ "V = (n*Vo*T)/To; \t\t\t#volume of 100 mol of gas at 1200 K and 1 bar\n",
+ "\n",
+ "#Let m be iron produced per 100 m**3 gas\n",
+ "m = (n_Fe*100*M)/V;\n",
+ "\n",
+ "# Results\n",
+ "print 'Iron produced per 100 cubic m of gas is %f kg'%(m/1000)\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Iron produced per 100 cubic m of gas is 3.255704 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To calculate the composition at equilibrium assuming ideal behaviour\n",
+ "\n",
+ "from scipy.optimize import fsolve\n",
+ "\n",
+ "# Variables\n",
+ "P = 1.; \t\t\t#pressure in bar\n",
+ "K1 = 0.574; \t\t\t#equilibrium constant for eq. 9.88 (Page no. 437)\n",
+ "K2 = 2.21; \t\t\t#equilibrium constant for eq. 9.89 (Page no. 437)\n",
+ "\n",
+ "v1 = 1+3-1-1;\n",
+ "v2 = 1+1-1-1;\n",
+ "Ky1 = K1*P**-v1;\n",
+ "Ky2 = K2*P**-v2;\n",
+ "\n",
+ "# Calculations\n",
+ "#mole fractions in equilibrium mixture are:\n",
+ "#CH4: (1-e1)/(6+2e1)\n",
+ "#H2O: (5-e1-e2)/(6+2e1)\n",
+ "#CO: (e1-e2)/(6+2e1)\n",
+ "#H2: (3e1+e2)/(6+2e1)\n",
+ "#CO2: e2/(6+2e1)\n",
+ "\n",
+ "#For 1st reaction:\n",
+ "#Ky1 = [(e1-e2)(3e1+e2)**3]/[(1-e1)(5-e1-e2)(6+2e1)**2]\n",
+ "#For 2nd reaction:\n",
+ "#Ky2 = [e2(3e1+e2)]/[(e1-e2)(5-e1-e2)]\n",
+ "#on solving% we get:\n",
+ "\n",
+ "def f2(e):\n",
+ " f_1 = ((e[0]-e[1])*(3*e[0]+e[1])**3)/((1-e[0])*(5-e[0]-e[1])*(6+2*e[0])**2)-Ky1\n",
+ " f_2 = (e[1]*(3*e[0]+e[1]))/((e[0]-e[1])*(5-e[0]-e[1]))-Ky2\n",
+ " y = [f_1,f_2]\n",
+ " return y\n",
+ "eo = [0.9,0.6]; \t\t\t#initial guesses\n",
+ "e = fsolve(f2,eo)\n",
+ "\n",
+ "\t\t\t#Mole fraction of components:\n",
+ "n_m = (1-e[0])/(6+2*e[0])\n",
+ "n_w = (5-e[0]-e[1])/(6+2*e[0])\n",
+ "n_CO = (e[0]-e[1])/(6+2*e[0])\n",
+ "n_h = (3*e[0]+e[1])/(6+2*e[0])\n",
+ "n_c = e[1]/(6+2*e[0])\n",
+ "\n",
+ "# Results\n",
+ "print 'Mole fraction of the components are:'\n",
+ "print ' Methane = %f'%n_m\n",
+ "print ' Water = %f'%n_w\n",
+ "print ' Carbon monoxide = %f'% n_CO\n",
+ "print ' Hydrogen = %f'%n_h\n",
+ "print ' Carbon dioxide = %f'%n_c\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mole fraction of the components are:\n",
+ " Methane = 0.011240\n",
+ " Water = 0.441597\n",
+ " Carbon monoxide = 0.035687\n",
+ " Hydrogen = 0.430593\n",
+ " Carbon dioxide = 0.080883\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# To determine the number of degrees of freedom\n",
+ "\n",
+ "# Variables\n",
+ "#A system consisting of CO% CO2% H2% H2O% CH4\n",
+ "\n",
+ "#To determine the number of degrees of freedom\n",
+ "\n",
+ "#Formation reactions for each of compounds is written\n",
+ "#a. C + 1/2O2 --> CO\n",
+ "#b. C + O2 --> CO2\n",
+ "#c. H2 + 1/2O2 --> H2O\n",
+ "#d. C + 2H2 --> CH4\n",
+ "\n",
+ "#Elements C and O2 are not present% so they are to be eliminated\n",
+ "#Combining a and b\n",
+ "#e. CO2 --> CO + 1/2O2\n",
+ "\n",
+ "#Combining a and d\n",
+ "#f. CH4 + 1/2O2 --> CO + 2H2\n",
+ "\n",
+ "#Combining c and e\n",
+ "#g. CO2 + H2 --> CO + H2O\n",
+ "\n",
+ "#Combining c and f\n",
+ "#h. 3H2 + CO --> CH4 + H2O\n",
+ "\n",
+ "#Equations g and h represent independent chemical reactions% so\n",
+ "r = 2.;\n",
+ "C = 5.; \t\t\t#no. of components\n",
+ "pi = 1.; \t\t\t#no. of phases\n",
+ "\n",
+ "# Calculations\n",
+ "#From eq. 9.90 (Page no. 438)\n",
+ "F = C-pi-r+2;\n",
+ "\n",
+ "# Results\n",
+ "print 'The number of degrees of freedom are %i'%F\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of degrees of freedom are 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png
new file mode 100644
index 00000000..5dd7c85d
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-1.png
Binary files differ
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png
new file mode 100644
index 00000000..9bdfe953
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-2.png
Binary files differ
diff --git a/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png
new file mode 100644
index 00000000..d85833ae
--- /dev/null
+++ b/A_Textbook_Of_Chemical_Engineering_Thermodynamics/screenshots/giri-3.png
Binary files differ