summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:40:35 +0530
committerkinitrupti2017-05-12 18:40:35 +0530
commitd36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch)
tree9806b0d68a708d2cfc4efc8ae3751423c56b7721 /Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder
parent1b1bb67e9ea912be5c8591523c8b328766e3680f (diff)
downloadPython-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz
Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2
Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip
Revised list of TBCs
Diffstat (limited to 'Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder')
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb645
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb1346
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb357
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb1310
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb1274
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb543
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb557
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb1241
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb945
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb597
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb580
-rwxr-xr-xIntroduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb1078
12 files changed, 0 insertions, 10473 deletions
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb
deleted file mode 100755
index 60cbc213..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb
+++ /dev/null
@@ -1,645 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 1 - Introduction and basic concepts"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.1 Page: 4"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.1 - Page: 4\n",
- "\n",
- "\n",
- "Weight of the man on the moon is 260.43 N\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "# Soltion\n",
- "\n",
- "print \"Example: 1.1 - Page: 4\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "g_Earth = 9.83 # [m/square s]\n",
- "F_Earth = 800 # [N]\n",
- "g_Moon = 3.2 # [m/square s]\n",
- "#************#\n",
- "\n",
- "# From the expression of force, the force on the man on the Eath's surface is given by:\n",
- "# F = m*g_Earth\n",
- "m = F_Earth/g_Earth # [kg]\n",
- "\n",
- "# On the moon, the weight of the mass is equal to the force acting on the mass on the moon and is given by\n",
- "F_Moon = m*g_Moon # [N]\n",
- "\n",
- "print \"Weight of the man on the moon is %0.2f N\\n\"%(F_Moon)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.2 Page: 5"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.2 - Page: 5\n",
- "\n",
- "\n",
- "Gravitational force on the body is 16.68 N\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.2 - Page: 5\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "m1 = 1.5 # [mass of the body, kg]\n",
- "m2 = 6*10**(24) # [mass of the Earth, kg]\n",
- "G = 6.672*10**(-11) # [N.square m/square.kg]\n",
- "r = 6000*10**(3) # [m]\n",
- "#************#\n",
- "\n",
- "# According to Newton's universal law of gravity:\n",
- "F = G*m1*m2/r**2 # [N]\n",
- "print \"Gravitational force on the body is %.2f N\\n\"%(F)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.3 Page: 5"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.3 - Page: 5\n",
- "\n",
- "\n",
- "Mass of 1 kg will weigh 6.92 kg on moon\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.3 - Page: 5\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "r_Moon = 0.3 # [km]\n",
- "r_Earth = 1 # [km]\n",
- "m2 = 1 # [mass of body, kg]\n",
- "mMoon_By_mEarth = 0.013 # [kg/kg]\n",
- "#***************#\n",
- "\n",
- "# According to the Newton's universal law of gravitation:\n",
- "Fe_By_Fm = (1/mMoon_By_mEarth)*(r_Moon/r_Earth)**2#\n",
- "print \"Mass of 1 kg will weigh %.2f kg on moon\\n\"%(Fe_By_Fm)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.4 Page: 6"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.4 - Page: 6\n",
- "\n",
- "\n",
- "The absolute pressure is 54.914 kPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.4 - Page: 6\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "h = 40 # [cm]\n",
- "density = 14.02 # [g/cubic cm]\n",
- "g = 9.792 # [m/square s]\n",
- "#*************#\n",
- "\n",
- "P = h*density*g/1000 # [N/square cm]\n",
- "P = P*10 # [kPa]\n",
- "\n",
- "print \"The absolute pressure is %.3f kPa\\n\"%(P)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.5 Page: 7"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.5 - Page: 7\n",
- "\n",
- "\n",
- "The absolute pressure within the container is 119.299 kPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.5 - Page: 7\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "Patm = 112 # [kPa]\n",
- "density = 1200 # [kg/cubic m]\n",
- "g = 9.81 # [m/sqaure s]\n",
- "h = 0.62 # [m]\n",
- "#**************#\n",
- "\n",
- "P = Patm + (density*g*h/1000) # [kPa]\n",
- "\n",
- "print \"The absolute pressure within the container is %.3f kPa\\n\"%(P)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.6 Page: 9"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.6 - Page: 9\n",
- "\n",
- "\n",
- "Work done by the system is 1500 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.6 - Page: 9\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "F = 150 # [N]\n",
- "Displacement = 10 # [m]\n",
- "#**************#\n",
- "\n",
- "W = F*Displacement # [J]\n",
- "\n",
- "print \"Work done by the system is %d J\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.7 Page: 9"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.7 - Page: 9\n",
- "\n",
- "\n",
- "Actual Work done by the system is 9.1e+05 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.7 - Page: 9\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "P = 560*10**3 # [Pa]\n",
- "Vinit = 3 # [cubic m]\n",
- "Vfinal = 5 # [cubic m]\n",
- "Wext = 210*10**3 # [J]\n",
- "#*************#\n",
- "\n",
- "W = P*(Vfinal - Vinit) # [J]\n",
- "# Again the system receives 210 kJ of work from the external agent.\n",
- "W = W - Wext # [J]\n",
- "\n",
- "print \"Actual Work done by the system is %.1e J\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.8 Page: 11"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.8 - Page: 11\n",
- "\n",
- "\n",
- "Change in potential Energy is 981 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.8 - Page: 11\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "g = 9.81 # [m/square s]\n",
- "Z = 100 # [m]\n",
- "#***************#\n",
- "\n",
- "# Basis: 1 kg of water\n",
- "m = 1 # [kg]\n",
- "Ep = m*g*Z # [J]\n",
- "print \"Change in potential Energy is %d J\\n\"%(Ep)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.9 Page: 11"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 30,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.9 - Page: 11\n",
- "\n",
- "\n",
- "The velocity of the metal block is 15.34 m/s\n",
- "\n",
- "The final Kinetic Energy is 1765.8 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "# Solution\n",
- "\n",
- "print \"Example: 1.9 - Page: 11\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "m = 15# # [kg]\n",
- "g = 9.81 # [m/square s]\n",
- "V1 = 0 # [m/square s]\n",
- "Z1 = 12 # [m]\n",
- "Z2 = 0 # [m]\n",
- "#***************#\n",
- "\n",
- "# At initial condition, V1 = 0, so kinetic energy is zero.\n",
- "# At final condition, Z2 = 0, so potential energy is zero.\n",
- "# Ep1 + Ek1 = Ep2 + Ek2\n",
- "#deff('[y] = f(V2)','y = ((1/2)*m*V1**2) + (m*g*Z1) - (((1/2)*m*V2**2) + (m*g*Z2))')#\n",
- "def f(V2):\n",
- " y = ((1/2)*m*V1**2) + (m*g*Z1) - (((1/2)*m*V2**2) + (m*g*Z2))\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "V2 = fsolve(f,7)#\n",
- "\n",
- "print \"The velocity of the metal block is %.2f m/s\\n\"%(V2)#\n",
- "\n",
- "Ek2 = (1/2)*m*V2**2 # [J]\n",
- "print \"The final Kinetic Energy is %.1f J\\n\"%(Ek2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.10 Page: 12"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.10 - Page: 12\n",
- "\n",
- "\n",
- "Power required is 7.64 kW\n",
- "\n"
- ]
- }
- ],
- "source": [
- "# Solution\n",
- "\n",
- "print \"Example: 1.10 - Page: 12\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "m = 1200 # [kg]\n",
- "v1 = 10 # [km/h]\n",
- "v2 = 100 # [km/h]\n",
- "time = 1 # [min]\n",
- "#***************#\n",
- "\n",
- "v1 = 10*1000/3600 # [m/s]\n",
- "v2 = 100*1000/3600 # [m/s]\n",
- "W = (1/2)*m*(v2**2 - v1**2) # [J]\n",
- "time = time*60 # [s]\n",
- "P = W/time # [W]\n",
- "print \"Power required is %.2f kW\\n\"%(P/1000)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.11 Page: 13"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.11 - Page: 13\n",
- "\n",
- "\n",
- "Total Force eacting upon the gas is 8139.7 N\n",
- "\n",
- "Pressure exerted is 115.153 kPa\n",
- "\n",
- "\n",
- "Work due to expansion by the gas is 4.070 kJ\n",
- "\n",
- "\n",
- "Change in Potential Energy is 489.6 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "print \"Example: 1.11 - Page: 13\\n\\n\"\n",
- "\n",
- "#*****Data*****#\n",
- "dia = 0.3 # [m]\n",
- "m = 100 # [kg]\n",
- "P_atm = 1.013*10**5 # [N/square m]\n",
- "g = 9.792 # [m/square s]\n",
- "#**************#\n",
- "\n",
- "Area = (pi/4)*dia**2 # [square m]\n",
- "#Solution (a)(i)\n",
- "# Force exerted by the atmosphere:\n",
- "F_atm = P_atm*Area # [N]\n",
- "# Force exerted by piston & metal block:\n",
- "F_mass = m*g # [N]\n",
- "# Total force acting upon the gas:\n",
- "F = F_atm + F_mass # [N]\n",
- "print \"Total Force eacting upon the gas is %.1f N\\n\"%(F)#\n",
- "\n",
- "# Solution (a)(ii)\n",
- "Pressure = F/Area # [N/square m]\n",
- "print \"Pressure exerted is %.3f kPa\\n\\n\"%(Pressure/1000)#\n",
- "\n",
- "# Solution (b)\n",
- "# The gas expands on application of heat, the volume of the gas goes on increasing and the piston moves upward.\n",
- "Z = 0.5 # [m]\n",
- "# Work done due to expansion of gas:\n",
- "W = F*Z # [J]\n",
- "print \"Work due to expansion by the gas is %.3f kJ\\n\\n\"%(W/1000)#\n",
- "\n",
- "# Solution (c)\n",
- "# Change in potential energy of piston and weight after expansion process:\n",
- "Ep = m*g*Z # [J]\n",
- "print \"Change in Potential Energy is %.1f J\\n\"%(Ep)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.12 Page: 24"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 33,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.12 - Page: 24\n",
- "\n",
- "\n",
- "The temperature which has the same value on both the centigrade and Fahrenheit scales is -40 degree Celsius or -40 degree Fahrenheit\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 1.12 - Page: 24\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# The relation is:\n",
- "# (C/5) = ((F - 32)/9)\n",
- "# For C = F\n",
- "C = - (32*5/4)# # [degree Celsius]\n",
- "print \"The temperature which has the same value on both the centigrade and Fahrenheit scales is %d degree Celsius or %d degree Fahrenheit\\n\"%(C,C)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 1.13 Page: 24"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 34,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 1.13 - Page: 24\n",
- "\n",
- "\n",
- "The rise in temperature in the Kelvin scale is 30 K\n",
- "\n",
- "The rise in temperature in the Rankine scale is 54 R\n",
- "\n",
- "The rise in temperature in the Fahrenheit scale is 54 OF\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 1.13 - Page: 24\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "delta_T_C = 30 # [OC]\n",
- "#*************#\n",
- "\n",
- "# The relation between the Kelvin temperature scale and the Celsius temperature scale:\n",
- "# T(K) = T(OC) + 273.15\n",
- "# Here, the temperature rise is to be expressed in terms of K, but the difference in temperature will be the same in the Kelvin and Celsius scales of temperature:\n",
- "delta_T_K = delta_T_C # [K]\n",
- "print \"The rise in temperature in the Kelvin scale is %d K\\n\"%(delta_T_K)#\n",
- "# The emperical relationship between the Rankine and Kelvin scales is given by:\n",
- "delta_T_R = 1.8*delta_T_K # [R]\n",
- "print \"The rise in temperature in the Rankine scale is %d R\\n\"%(delta_T_R)#\n",
- "delta_T_F = delta_T_R # [OF]\n",
- "print \"The rise in temperature in the Fahrenheit scale is %d OF\\n\"%(delta_T_F)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb
deleted file mode 100755
index fb871c2a..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb
+++ /dev/null
@@ -1,1346 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 10 - Vapour liquid equillibrium"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.1 Page: 390"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.1 - Page: 390\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 10.1 on page 390 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.1 - Page: 390\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 10.1 on page number 390 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 10.1 on page 390 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.2 Page: 399"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.2 - Page: 399\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 10.2 on page 399 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.2 - Page: 399\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 10.2 on page number 399 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 10.2 on page 399 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.3 Page: 400"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.3 - Page: 400\n",
- "\n",
- "\n",
- "The total pressure is 13.04 atm\n",
- "\n",
- "Mole fraction of ethylene in vapour phase is 0.7\n",
- "\n",
- "Mole fraction of propylene in the vapour phase is 0.3\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 10.3 - Page: 400\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "x1 = 0.6## [mole fraction of ethylene]\n",
- "x2 = 0.4## [mole fraction of propylene]\n",
- "T = 423## [K]\n",
- "P1_sat = 15.2## [vapour pressure of ethylene, atm]\n",
- "P2_sat = 9.8## [vapour pressure of propylene, atm]\n",
- "#**************#\n",
- "\n",
- "P = x1*P1_sat + x2*P2_sat## [atm]\n",
- "print \"The total pressure is %.2f atm\\n\"%(P)#\n",
- "# In vapour phase:\n",
- "y1 = x1*P1_sat/P## [mole fraction of ethylene]\n",
- "y2 = x2*P2_sat/P## [mole fraction of propylene]\n",
- "print \"Mole fraction of ethylene in vapour phase is %.1f\\n\"%(y1)#\n",
- "print \"Mole fraction of propylene in the vapour phase is %.1f\\n\"%(y2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.4 Page: 400"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.4 - Page: 400\n",
- "\n",
- "\n",
- "In Liquid phase\n",
- "\n",
- "The mole fraction of X is 0.701\n",
- "\n",
- "The mole fraction of Y is 0.299\n",
- "\n",
- "In Vapour phase\n",
- "\n",
- "The mole fraction of X is 0.796\n",
- "\n",
- "The mole fraction of Y is 0.204\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import exp\n",
- "print \"Example: 10.4 - Page: 400\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Temp = 77## [OC]\n",
- "P = 75## [kPa]\n",
- "#deff('[P1] = f1(T)','P1 = exp(14.35 - 2942/(T + 220))')#\n",
- "#deff('[P2] = f2(T)','P2 = exp(14.25 - 2960/(T + 210))')#\n",
- "def f1(T):\n",
- " P1 = exp(14.35 - 2942/(T + 220))\n",
- " return P1\n",
- "\n",
- "def f2(T):\n",
- " P2 = exp(14.25 - 2960/(T + 210))\n",
- " return P2\n",
- "\n",
- "\n",
- "#*************#\n",
- "\n",
- "P1sat = f1(Temp)## [kPa]\n",
- "P2sat = f2(Temp)## [kPa]\n",
- "#deff('[y] = f3(x1)','y = P - (x1*P1sat) - (1 - x1)*P2sat')#\n",
- "def f3(x1):\n",
- " y = P - (x1*P1sat) - (1 - x1)*P2sat\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "x1 = fsolve(f3,7)#\n",
- "x2 = 1 - x1#\n",
- "print \"In Liquid phase\\n\"\n",
- "print \"The mole fraction of X is %.3f\\n\"%(x1)#\n",
- "print \"The mole fraction of Y is %.3f\\n\"%(x2)#\n",
- "\n",
- "y1 = x1*P1sat/P#\n",
- "y2 = 1 - y1#\n",
- "print \"In Vapour phase\\n\"\n",
- "print \"The mole fraction of X is %.3f\\n\"%(y1)#\n",
- "print \"The mole fraction of Y is %.3f\\n\"%(y2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.5 Page: 401"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.5 - Page: 401\n",
- "\n",
- "\n",
- "Solution (i)\n",
- "\n",
- "The mole fraction of acetone is 0.549\n",
- "\n",
- "The mole fraction of acetonitrile is 0.327\n",
- "\n",
- "The mole fraction of nitromethane is 0.124\n",
- "\n",
- "Solution (ii)\n",
- "\n",
- "The mole fraction of acetone is 0.216\n",
- "\n",
- "The mole fraction of acetonitrile is 0.371\n",
- "\n",
- "The mole fraction of nitromethane is 0.413\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.5 - Page: 401\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "#deff('[P1] = f1(T)','P1 = exp(14.3916 - 2795/(T + 230))')#\n",
- "def f1(T):\n",
- " P1 = exp(14.3916 - 2795/(T + 230))\n",
- " return P1\n",
- "\n",
- "#deff('[P2] = f2(T)','P2 = exp(14.2724 - 2945.47/(T + 224))')#\n",
- "def f2(T):\n",
- " P2 = exp(14.2724 - 2945.47/(T + 224))\n",
- " return P2\n",
- "#deff('[P3] = f3(T)','P3 = exp(14.2043 - 2972.64/(T + 209))')#\n",
- "def f3(T):\n",
- " P3 = exp(14.2043 - 2972.64/(T + 209))\n",
- " return P3\n",
- "\n",
- "#*************#\n",
- "\n",
- "# Solution (i)\n",
- "\n",
- "#*****Data******#\n",
- "Temp = 75## [OC]\n",
- "P = 75## [kPa]\n",
- "x1 = 0.30#\n",
- "x2 = 0.40#\n",
- "#*************#\n",
- "\n",
- "x3 = 1 - (x1 + x2)#\n",
- "P1sat = f1(Temp)## [kPa]\n",
- "P2sat = f2(Temp)## [kPa]\n",
- "P3sat = f3(Temp)## [kPa]\n",
- "P = x1*P1sat + x2*P2sat + x3*P3sat## [kPa]\n",
- "y1 = x1*P1sat/P#\n",
- "y2 = x2*P2sat/P#\n",
- "y3 = x3*P3sat/P#\n",
- "print \"Solution (i)\\n\"\n",
- "print \"The mole fraction of acetone is %.3f\\n\"%(y1)#\n",
- "print \"The mole fraction of acetonitrile is %.3f\\n\"%(y2)#\n",
- "print \"The mole fraction of nitromethane is %.3f\\n\"%(y3)#\n",
- "\n",
- "# Solution (ii)\n",
- "\n",
- "#*****Data*****#\n",
- "Temp = 80## [OC]\n",
- "y1 = 0.45#\n",
- "y2 = 0.35#\n",
- "#**************#\n",
- "\n",
- "y3 = 1 - (y1 + y2)#\n",
- "P1sat = f1(Temp)## [kPa]\n",
- "P2sat = f2(Temp)## [kPa]\n",
- "P3sat = f3(Temp)## [kPa]\n",
- "P = 1/((y1/P1sat) + (y2/P2sat) + (y3/P3sat))## [kPa]\n",
- "x1 = y1*P/P1sat#\n",
- "x2 = y2*P/P2sat#\n",
- "x3 = y3*P/P3sat#\n",
- "print \"Solution (ii)\\n\"\n",
- "print \"The mole fraction of acetone is %.3f\\n\"%(x1)#\n",
- "print \"The mole fraction of acetonitrile is %.3f\\n\"%(x2)#\n",
- "print \"The mole fraction of nitromethane is %.3f\\n\"%(x3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.6 Page: 403"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.6 - Page: 403\n",
- "\n",
- "\n",
- "In Vapour phase\n",
- "\n",
- "The mole fraction of methanol is 0.282\n",
- "\n",
- "The mole fraction of methyl acetate is 0.718\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.6 - Page: 403\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "#deff('[P1] = f1(T)','P1 = exp(16.5915 - 3643.31/(T - 33.424))')#\n",
- "def f1(T):\n",
- " P1 = exp(16.5915 - 3643.31/(T - 33.424))\n",
- " return P1\n",
- "#deff('[P2] = f2(T)','P2 = exp(14.2532 - 2665.54/(T - 53.424))')#\n",
- "def f2(T):\n",
- " P2 = exp(14.2532 - 2665.54/(T - 53.424))\n",
- " return P2\n",
- "#deff('[A] = f3(T)','A = 2.771 - 0.00523*T')#\n",
- "def f3(T):\n",
- " A = 2.771 - 0.00523*T\n",
- " return A\n",
- "\n",
- "Temp = 318.15## [K]\n",
- "x1 = 0.25#\n",
- "#**************#\n",
- "\n",
- "P1sat = f1(Temp)## [kPa]\n",
- "P2sat = f2(Temp)## [kPa]\n",
- "A = f3(Temp)#\n",
- "x2 = 1 - x1#\n",
- "gama1 = exp(A*x2**2)#\n",
- "gama2 = exp(A*x1**2)#\n",
- "P = x1*gama1*P1sat + x2*gama2*P2sat#\n",
- "y1 = x1*gama1*P1sat/P#\n",
- "y2 = x2*gama2*P2sat/P#\n",
- "print \"In Vapour phase\\n\"\n",
- "print \"The mole fraction of methanol is %.3f\\n\"%(y1)#\n",
- "print \"The mole fraction of methyl acetate is %.3f\\n\"%(y2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.7 Page: 408"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.7 - Page: 408\n",
- "\n",
- "\n",
- "Azeotropic Composition\n",
- "\n",
- "The mole fraction of component 1 is 0.260\n",
- "\n",
- "The mole fraction of component 2 is 0.740\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 10.7 - Page: 408\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Temp = 30## [OC]\n",
- "A = 0.625#\n",
- "#**************#\n",
- "\n",
- "P1sat = exp(13.71 - 3800/Temp)## [kPa]\n",
- "P2sat = exp(14.01 - 3800/Temp)## [kPa]\n",
- "# At azeotropic point:\n",
- "# P = gama1*P1sat + gama2*P2sat\n",
- "# gama1/gama2 = P2sat/P1sat\n",
- "# log(gama1) - log(gama2) = log(P2sat) - log(P1sat)\n",
- "# Val = log(gama1) - gama2\n",
- "Val = log(P2sat) - log(P1sat)#\n",
- "# log(gama1) = (A*x2**2)\n",
- "# log(gama2) = (A*x1**2)\n",
- "# A(x2**2 - x1**2) = 0.625*(x2**2 - x1**2)..................... (1)\n",
- "# x1 + x2 = 1............................................. (2)\n",
- "# On simplifying, we get:\n",
- "# A*(1 - (2*x1)) = Val\n",
- "x1 = (1/2)*(1 - Val/A)#\n",
- "x2 = 1 - x1#\n",
- "print \"Azeotropic Composition\\n\"\n",
- "print \"The mole fraction of component 1 is %.3f\\n\"%(x1)#\n",
- "print \"The mole fraction of component 2 is %.3f\\n\"%(x2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.8 Page: 410"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.8 - Page: 410\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 10.8 on page 410 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.8 - Page: 410\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 10.8 on page number 410 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 10.8 on page 410 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.9 Page: 412"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.9 - Page: 412\n",
- "\n",
- "\n",
- "Van Laar Constants\n",
- "\n",
- "A = -5.008\n",
- "\n",
- "B = 0.275\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.9 - Page: 412\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "x1 = 0.42#\n",
- "x2 = 0.58#\n",
- "P = 760## [mm of Hg]\n",
- "P1sat = 786## [mm of Hg]\n",
- "P2sat = 551## [mm of Hg]\n",
- "#***************#\n",
- "\n",
- "gama1 = P/P1sat#\n",
- "gama2 = P/P2sat#\n",
- "A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))**2#\n",
- "B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))**2#\n",
- "print \"Van Laar Constants\\n\"\n",
- "print \"A = %.3f\\n\"%(A)#\n",
- "print \"B = %.3f\\n\"%(B)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.10 Page: 412"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.10 - Page: 412\n",
- "\n",
- "\n",
- "Activity Coeffecient\n",
- "\n",
- "gama1 = 1.086\n",
- "\n",
- "gama2 = 1.002\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.10 - Page: 412\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P = 101.3## [kPa]\n",
- "P1sat = 100.59## [kPa]\n",
- "P2sat = 99.27## [kPa]\n",
- "x1 = 0.532#\n",
- "#****************#\n",
- "\n",
- "x2 = 1 - x1#\n",
- "gama1 = P/P1sat#\n",
- "gama2 = P/P2sat#\n",
- "A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))**2#\n",
- "B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))**2#\n",
- "\n",
- "# For solution containing 10 mol percent benzene:\n",
- "x1 = 0.10#\n",
- "x2 = 1 - x1#\n",
- "gama1 = exp(A/(1 + (A*x1/(B*x2))**2))#\n",
- "gama2 = exp(B/(1 + (B*x2/(A*x1))**2))#\n",
- "print \"Activity Coeffecient\\n\"\n",
- "print \"gama1 = %.3f\\n\"%(gama1)#\n",
- "print \"gama2 = %.3f\\n\"%(gama2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.11 Page: 413"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.11 - Page: 413\n",
- "\n",
- "\n",
- "Equilibrium Composition\n",
- "\n",
- "Acetone Composition = 4.98 %\n",
- "\n",
- "Chloform composition = 95.02 %\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.11 - Page: 413\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P = 760## [mm of Hg]\n",
- "P1sat = 995## [mm of Hg]\n",
- "P2sat = 885## [mm of Hg]\n",
- "x1 = 0.335#\n",
- "T = 64.6## [OC]\n",
- "#****************#\n",
- "\n",
- "x2 = 1 - x1#\n",
- "gama1 = P/P1sat#\n",
- "gama2 = P/P2sat#\n",
- "A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))**2#\n",
- "B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))**2#\n",
- "\n",
- "# For solution containing 11.1 mol percent acetone:\n",
- "x1 = 0.111#\n",
- "x2 = 1 - x1#\n",
- "gama1 = exp((A*x2**2)/(x2 + (A*x1/(B))**2))#\n",
- "gama2 = exp((B*x1**2)/(x1 + (B*x2/(A))**2))#\n",
- "y1 = 1/(1 + (gama2*x2*P2sat/(gama1*x1*P1sat)))#\n",
- "y2 = 1 - y1#\n",
- "print \"Equilibrium Composition\\n\"\n",
- "print \"Acetone Composition = %.2f %%\\n\"%(y1*100)#\n",
- "print \"Chloform composition = %.2f %%\\n\"%(y2*100)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.12 Page: 414"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.12 - Page: 414\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 10.12 on page 414 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.12 - Page: 414\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 10.12 on page number 414 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 10.12 on page 414 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.13 Page: 418"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.13 - Page: 418\n",
- "\n",
- "\n",
- "Wilson equation\n",
- "\n",
- "Activity Coeffecient of iso - butanol is 2.270\n",
- "\n",
- "Activity Coeffecient of iso - propanol is 1.265\n",
- "\n",
- "\n",
- "\n",
- "NTRL equation\n",
- "\n",
- "Activity Coeffecient of iso - butanol is 2.160\n",
- "\n",
- "Activity Coeffecient of iso - propanol is 1.269\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.13 - Page: 418\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# 1: iso - butanol\n",
- "# 2: iso - propanol\n",
- "T = 50 + 273## [K]\n",
- "x1 = 0.3#\n",
- "V1 = 65.2## [cubic cm/mol]\n",
- "V2 = 15.34## [cubic cm/mol]\n",
- "# For Wilson equation:\n",
- "a12 = 300.55## [cal/mol]\n",
- "a21 = 1520.32## [cal/mol]\n",
- "# For NTRL equation:\n",
- "b12 = 685.21## [cal/mol]\n",
- "b21 = 1210.21## [cal/mol]\n",
- "alpha = 0.552#\n",
- "R = 2## [cal/mol K]\n",
- "#******************#\n",
- "\n",
- "x2 = 1 - x1#\n",
- "# A: Estimation of activity coeffecient using Wilson equation:\n",
- "# From Eqn. 10.65:\n",
- "A12 = (V2/V1)*exp(-a12/(R*T))#\n",
- "# From Eqn. 10.66:\n",
- "A21 = (V1/V2)*exp(-a21/(R*T))#\n",
- "# From Eqn. 10.67:\n",
- "gama1 = exp(-log(x1 + A12*x2) + x2*((A12/(x1 + A12*x2)) - (A21/(A21*x1 + x2))))#\n",
- "# From Eqn. 10.68:\n",
- "gama2 = exp(-log(x2 + A21*x1) - x1*((A12/(x1 + A12*x2)) - (A21/(A21*x1 + x2))))#\n",
- "print \"Wilson equation\\n\"\n",
- "print \"Activity Coeffecient of iso - butanol is %.3f\\n\"%(gama1)#\n",
- "print \"Activity Coeffecient of iso - propanol is %.3f\\n\"%(gama2)#\n",
- "print \"\\n\"\n",
- "\n",
- "# A: Estimation of activity coeffecient using NTRL equation:\n",
- "t12 = b12/(R*T)#\n",
- "t21 = b21/(R*T)#\n",
- "G12 = exp(-alpha*t12)#\n",
- "G21 = exp(-alpha*t21)#\n",
- "# From Eqn. 10.70:\n",
- "gama1 = exp((x2**2)*(t21*(G21/(x1 + x2*G21))**2 + (t12*G12/(x2 + x1*G12)**2)))#\n",
- "# From Eqn. 10.71:\n",
- "gama2 = exp((x1**2)*(t12*(G12/(x2 + x1*G12))**2 + (t21*G21/(x1 + x2*G21)**2)))#\n",
- "print \"NTRL equation\\n\"\n",
- "print \"Activity Coeffecient of iso - butanol is %.3f\\n\"%(gama1)#\n",
- "print \"Activity Coeffecient of iso - propanol is %.3f\\n\"%(gama2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.14 Page: 426"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.14 - Page: 426\n",
- "\n",
- "\n",
- "Bubble Temperature is 9 OC\n",
- "\n",
- "Composition of the vapour bubble:\n",
- " y1 = 0.70\n",
- " y2 = 0.30\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.14 - Page: 426\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "x1 = 0.4## [mole fraction of ethane in vapour phase]\n",
- "x2 = 0.6## [mole fraction of propane in vapour phase]\n",
- "P = 1.5## [MPa]\n",
- "#***************#\n",
- "\n",
- "# Assume T = 10 OC\n",
- "T = 10## [OC]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 1.8#\n",
- "K2 = 0.5#\n",
- "# From Eqn. 10.83:\n",
- "y1 = K1*x1#\n",
- "y2 = K2*x2#\n",
- "# Since y1 + y2 > 1, so we assume another value of T = 9 OC.\n",
- "T = 9## [OC]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 1.75#\n",
- "K2 = 0.5#\n",
- "# From Eqn. 10.83:\n",
- "y1 = K1*x1#\n",
- "y2 = K2*x2#\n",
- "# Since y1 + y2 = 1. Therefore:\n",
- "print \"Bubble Temperature is %d OC\\n\"%(T)#\n",
- "print \"Composition of the vapour bubble:\\n y1 = %.2f\\n y2 = %.2f\"%(y1,y2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.15 Page: 428"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.15 - Page: 428\n",
- "\n",
- "\n",
- "Dew Pressure is 2.15 MPa\n",
- "\n",
- "Composition of the liquid drop:\n",
- " x1 = 0.0247\n",
- " x2 = 0.1648\n",
- " x3 = 0.8065\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.15 - Page: 428\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "y1 = 0.20## [mole fraction of methane in vapour phase]\n",
- "y2 = 0.30## [mole fraction of ethane in vapour phase]\n",
- "y3 = 0.50## [mole fraction of propane in vapour phase]\n",
- "T = 30## [OC]\n",
- "#*************#\n",
- "\n",
- "# Assume P = 2.0 MPa\n",
- "P = 2.0## [MPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 8.5#\n",
- "K2 = 2.0#\n",
- "K3 = 0.68#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "# Since x1 + x2 +x3 < 1, so we assume another value of P = 2.15 MPa at 30 OC.\n",
- "P = 2.15## [MPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 8.1#\n",
- "K2 = 1.82#\n",
- "K3 = 0.62#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "# Since x1 + x2 +x3 = 1. Therefore:\n",
- "print \"Dew Pressure is %.2f MPa\\n\"%(P)#\n",
- "print \"Composition of the liquid drop:\\n x1 = %.4f\\n x2 = %.4f\\n x3 = %.4f\"%(x1,x2,x3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.16 Page: 429"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.16 - Page: 429\n",
- "\n",
- "\n",
- "Dew Pressure is 870 kPa\n",
- "\n",
- "Composition of the liquid drop:\n",
- " x1 = 0.0063\n",
- " x2 = 0.0755\n",
- " x3 = 0.9186\n",
- "\n",
- "\n",
- "\n",
- "Bubble Pressure is 2656 kPa\n",
- "\n",
- "Composition of the vapour bubble:\n",
- " y1 = 0.5490\n",
- " y2 = 0.2200\n",
- " y3 = 0.2310\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.16 - Page: 429\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# Dew point Pressure\n",
- "#*****Data******#\n",
- "y1 = 0.10## [mole fraction of methane in vapour phase]\n",
- "y2 = 0.20## [mole fraction of ethane in vapour phase]\n",
- "y3 = 0.70## [mole fraction of propane in vapour phase]\n",
- "T = 10## [OC]\n",
- "#*************#\n",
- "\n",
- "# Assume P = 690 kPa\n",
- "P = 690## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 20.0#\n",
- "K2 = 3.25#\n",
- "K3 = 0.92#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "# Since x1 + x2 +x3 < 1, so we assume another value of P = 10135 kPa at 10 OC.\n",
- "P = 10135## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 13.20#\n",
- "K2 = 2.25#\n",
- "K3 = 0.65#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "# Since x1 + x2 +x3 > 1, so we assume another value of P = 870 kPa at 10 OC.\n",
- "P = 870## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 16.0#\n",
- "K2 = 2.65#\n",
- "K3 = 0.762#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "# Since x1 + x2 +x3 = 1. Therefore:\n",
- "print \"Dew Pressure is %d kPa\\n\"%(P)#\n",
- "print \"Composition of the liquid drop:\\n x1 = %.4f\\n x2 = %.4f\\n x3 = %.4f\\n\"%(x1,x2,x3)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Bubble point Pressure\n",
- "#*****Data******#\n",
- "x1 = 0.10## [mole fraction of methane in vapour phase]\n",
- "x2 = 0.20## [mole fraction of ethane in vapour phase]\n",
- "x3 = 0.70## [mole fraction of propane in vapour phase]\n",
- "T = 10## [OC]\n",
- "#*************#\n",
- "\n",
- "# Assume P = 2622 kPa\n",
- "P = 2622## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 5.60#\n",
- "K2 = 1.11#\n",
- "K3 = 0.335#\n",
- "# From Eqn. 10.83:\n",
- "y1 = K1*x1#\n",
- "y2 = K2*x2#\n",
- "y3 = K3*x3#\n",
- "# Since x1 + x2 +x3 > 1, so we assume another value of P = 2760 kPa at 10 OC.\n",
- "P = 2760## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 5.25#\n",
- "K2 = 1.07#\n",
- "K3 = 0.32#\n",
- "# From Eqn. 10.83:\n",
- "y1 = K1*x1#\n",
- "y2 = K2*x2#\n",
- "y3 = K3*x3#\n",
- "# Since x1 + x2 +x3 < 1, so we assume another value of P = 2656 kPa at 10 OC.\n",
- "P = 2656## [kPa]\n",
- "# From Fig. 10.14 (Pg 426):\n",
- "K1 = 5.49#\n",
- "K2 = 1.10#\n",
- "K3 = 0.33#\n",
- "# From Eqn. 10.83:\n",
- "y1 = K1*x1#\n",
- "y2 = K2*x2#\n",
- "y3 = K3*x3#\n",
- "# Since x1 + x2 +x3 = 1. Therefore:\n",
- "print \"Bubble Pressure is %d kPa\\n\"%(P)#\n",
- "print \"Composition of the vapour bubble:\\n y1 = %.4f\\n y2 = %.4f\\n y3 = %.4f\"%(y1,y2,y3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.17 Page: 432"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.17 - Page: 432\n",
- "\n",
- "\n",
- " L = 3.154304e-08 mol\n",
- "\n",
- " V = 1.000000e+00 mol\n",
- "\n",
- " y1 = 0.4500\n",
- " y2 = 0.3500\n",
- " y3 = 0.2000\n",
- "\n",
- " x1 = 0.2334\n",
- " x2 = 0.3631\n",
- " x3 = 0.4035\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.17 - Page: 432\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# 1: acetone 2: acetonitrile 3: nitromethane\n",
- "z1 = 0.45#\n",
- "z2 = 0.35#\n",
- "z3 = 0.20#\n",
- "P1sat = 195.75## [kPa]\n",
- "P2sat = 97.84## [kPa]\n",
- "P3sat = 50.32## [kPa]\n",
- "#***************#\n",
- "\n",
- "# Bubble Point Calculation:\n",
- "Pbubble = z1*+P1sat + z2*P2sat +z3*P3sat## [kPa]\n",
- "\n",
- "# Dew Point Calculation:\n",
- "Pdew = 1/((z1/P1sat) + (z2/P2sat) + (z3/P3sat))## [kPa]\n",
- "K1 = P1sat/Pdew#\n",
- "K2 = P2sat/Pdew#\n",
- "K3 = P3sat/Pdew#\n",
- "# Overall Material balance:\n",
- "# For 1 mol of the feed.\n",
- "# L + V = 1......................................... (1)\n",
- "# F*zi = L*xi + V*yi ............................... (2)\n",
- "# zi = (1 - V)*xi + V*yi ........................... (3)\n",
- "# Substituting xi = yi/K in eqn. (3)\n",
- "# yi = zi*Ki/(1 + V*(Ki - 1))\n",
- "# Since, Sum(yi) = 1.\n",
- "#deff('[y] = f(V)','y = (z1*K1/(1 + V*(K1 - 1))) + (z2*K2/(1 + V*(K2 - 1))) + (z3*K3/(1 + V*(K3 - 1))) - 1')#\n",
- "def f(V):\n",
- " y = (z1*K1/(1 + V*(K1 - 1))) + (z2*K2/(1 + V*(K2 - 1))) + (z3*K3/(1 + V*(K3 - 1))) - 1\n",
- " return y\n",
- "\n",
- "V = fsolve(f,0.8)#\n",
- "L = 1 - V#\n",
- "y1 = z1*K1/(1 + V*(K1 - 1))#\n",
- "y2 = z2*K2/(1 + V*(K2 - 1))#\n",
- "y3 = z3*K3/(1 + V*(K3 - 1))#\n",
- "# From Eqn. 10.83:\n",
- "x1 = y1/K1#\n",
- "x2 = y2/K2#\n",
- "x3 = y3/K3#\n",
- "print \" L = %e mol\\n\"%(L)#\n",
- "print \" V = %e mol\\n\"%(V)#\n",
- "print \" y1 = %.4f\\n y2 = %.4f\\n y3 = %.4f\\n\"%(y1,y2,y3)#\n",
- "print \" x1 = %.4f\\n x2 = %.4f\\n x3 = %.4f\\n\"%(x1,x2,x3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.18 Page: 433"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.18 - Page: 433\n",
- "\n",
- "\n",
- " L = 0.1615 mol\n",
- "\n",
- " V = 0.8385 mol\n",
- "\n",
- " y1 = 0.8205\n",
- " y2 = 0.1795\n",
- "\n",
- " x1 = 0.7555\n",
- " x2 = 0.2445\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 10.18 - Page: 433\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# 1: Benzene 2: Toulene\n",
- "z1 = 0.81#\n",
- "Temp = 60## [OC]\n",
- "P = 70## [kPa]\n",
- "# Antonine Constants:\n",
- "A1 = 14.2321#\n",
- "B1 = 2773.61#\n",
- "C1 = 220.13#\n",
- "A2 = 15.0198#\n",
- "B2 = 3102.64#\n",
- "C2 = 220.02#\n",
- "#******************#\n",
- "\n",
- "#deff('[P1] = f1(T)','P1 = exp(A1 - B1/(T + C1))')#\n",
- "def f1(T):\n",
- " P1 = exp(A1 - B1/(T + C1))\n",
- " return P1\n",
- "\n",
- "P1sat = f1(Temp)## [kPa]\n",
- "#deff('[P2] = f2(T)','P2 = exp(A2 - B2/(T + C2))')#\n",
- "def f2(T):\n",
- " P2 = exp(A2 - B2/(T + C2))\n",
- " return P2\n",
- "\n",
- "P2sat = f2(Temp)## [kPa]\n",
- "# P = x1*P1sat + x2*P2sat#\n",
- "# x2 = 1 - x1#\n",
- "#deff('[y] = f3(x1)','[y] = P - (x1*P1sat + (1 - x1)*P2sat)')#\n",
- "def f3(x1):\n",
- " y= P - (x1*P1sat + (1 - x1)*P2sat)\n",
- " return y\n",
- "\n",
- "x1 = fsolve(f3,7)#\n",
- "y1 = x1*P1sat/P#\n",
- "x2 = 1 - x1#\n",
- "y2 = 1 - y1#\n",
- "\n",
- "# Basis: 1 mol of feed stream.\n",
- "F = 1## [mol]\n",
- "# F*zi = L*xi + V*yi = L*xi + (1 - L)*yi\n",
- "#deff('[y] = f4(L)','[y] = F*z1 - (L*x1 + (1 - L)*y1)')#\n",
- "def f4(L):\n",
- " y = F*z1 - (L*x1 + (1 - L)*y1)\n",
- " return y\n",
- "\n",
- "L = fsolve(f4,7)## [mol]\n",
- "V = 1 - L## [mol]\n",
- "print \" L = %.4f mol\\n\"%(L)#\n",
- "print \" V = %.4f mol\\n\"%(V)#\n",
- "print \" y1 = %.4f\\n y2 = %.4f\\n\"%(y1,y2)#\n",
- "print \" x1 = %.4f\\n x2 = %.4f\\n\"%(x1,x2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 10.19 Page: 413"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 10.19 - Page: 436\n",
- "\n",
- "\n",
- "The data is not consistent thermodynamically\n",
- "\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEPCAYAAABGP2P1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcFNXV//HPAQQF0VERTdA4SUTcHUQFHzCMDwQRF4Jx\nQ6OZoIgLWY2oSVRwQXHfFVHBJYpbEjUiKtFRxA3UQRBQ0JgHNPEXFXdjWM7vj9tQM+Mw0zM91VXd\n/X2/XvMK1V3TfTxp+lD31L3X3B0REZE12iQdgIiIpIsKg4iI1KHCICIidagwiIhIHSoMIiJShwqD\niIjUEWthMLNbzex9M5vXyDmVZvaqmc03s+o44xERkaZZnPMYzGwf4HPgdnffpYHny4BZwH7uvszM\nurj7B7EFJCIiTYr1isHdZ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B50vGJtJbULIkhknbu\nPtvMHgLOBzYA7ijGJSdEVBhEmudcwiJuXxE2BxIpOhpKEmmeLkAnYEPCVcMaWnRMioYKg0jzTAT+\nANwFTKj1eDFuDiQlSkNJIlkys2OBr919qpm1AZ7L7KA3Dtge2DCz7PEId38iyVhFcqFlt0VEpA4N\nJYmISB0qDCIiUocKg4iI1KHCICIidagwiIhIHSoMIiJShwqDiIjUocIgIiJ1/H/dXsztO8QXxAAA\nAABJRU5ErkJggg==\n",
- "text/plain": [
- "<matplotlib.figure.Figure at 0x7f55b74dcdd0>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "from math import exp, log\n",
- "print \"Example: 10.19 - Page: 436\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# (1): acetone (2): carbon tetrachloride\n",
- "T = 45## [OC]\n",
- "# Data = [P (torr), x1, y1]\n",
- "from numpy import mat\n",
- "Data = mat([[315.32, 0.0556, 0.2165],[339.70, 0.0903, 0.2910],[397.77, 0.2152, 0.4495],[422.46, 0.2929, 0.5137],[448.88, 0.3970, 0.5832],[463.92, 0.4769, 0.6309],[472.84, 0.5300, 0.6621],[485.16, 0.6047, 0.7081],[498.07, 0.7128, 0.7718],[513.20, 0.9636, 0.9636]])\n",
- "#*************#\n",
- "\n",
- "# From the standard data (Pg 531):\n",
- "# For Acetone:\n",
- "A1 = 14.2342#\n",
- "B1 = 2691.46#\n",
- "C1 = 230.00#\n",
- "# For carbon tetrachloride:\n",
- "A2 = 13.6816#\n",
- "B2 = 2355.82#\n",
- "C2 = 220.58#\n",
- "P1sat = exp(A1 - B1/(T + C1))## [kPa]\n",
- "P2sat = exp(A2 - B2/(T + C2))## [kPa]\n",
- "P1sat = P1sat*760/101.325## [torr]\n",
- "P2sat = P2sat*760/101.325## [torr]\n",
- "P = Data[:,0]#\n",
- "x1 = Data[:,1]#\n",
- "y1 = Data[:,2]#\n",
- "x2 = 1 - x1#\n",
- "y2 = 1 - y1#\n",
- "from numpy import nditer, shape, zeros\n",
- "gama1 = zeros(x1.shape)\n",
- "i=0\n",
- "for a,b,c in nditer([y1,P,x1]):\n",
- " gama1[i]=(a*b/c)\n",
- " i+=1\n",
- "\n",
- " \n",
- "gama2 = zeros(x2.shape)\n",
- "i=0\n",
- "for a,b,c in nditer([y2,P,x2]):\n",
- " gama2[i]=(a*b/c)\n",
- " i+=1\n",
- "\n",
- "Value = zeros(gama1.shape)\n",
- "i=0 \n",
- "for x,y in nditer([gama1, gama2]):\n",
- " Value[i]=(log(x/y))\n",
- " i+=1\n",
- " \n",
- "%matplotlib inline\n",
- "from matplotlib.pyplot import plot, xlabel, ylabel, show, grid\n",
- "plot(x1,Value)\n",
- "grid()#\n",
- "xlabel(\"x1\")\n",
- "ylabel(\"ln(y1/y2)\")\n",
- "# Since the whole area is above X - axis:\n",
- "print \"The data is not consistent thermodynamically\\n\"\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb
deleted file mode 100755
index f82a09fd..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb
+++ /dev/null
@@ -1,357 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Chapter 11 - Additional topics in phase equillibrium"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.1 Page: 458"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.1 - Page: 458\n",
- "\n",
- "\n",
- "Molecular Formula of Sulphur is S8\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 11.1 - Page: 458\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "a = 2.423## [g]\n",
- "b = 100## [g]\n",
- "Lf = 35.7## [cal/g]\n",
- "Tf = 353.1## [cal/g]\n",
- "delta_Tf = 0.64## [OC]\n",
- "R = 2## [cal/mol K]\n",
- "Mw = 32## [Molecular wt. of Sulphur, g/mol]\n",
- "#*************#\n",
- "\n",
- "M2 = ((R*Tf**2/(1000*Lf))*(a*1000/(b)))/delta_Tf## [g/mol]\n",
- "n = M2/Mw#\n",
- "print \"Molecular Formula of Sulphur is S%d\"%(round(n))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.2 Page: 459"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.2 - Page: 459\n",
- "\n",
- "\n",
- "Molal Freezing point is 5.10 kg/kmol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.2 - Page: 459\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Tf = 5 + 273## [K]\n",
- "Lf = 9830## [J/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "M1 = 78## [kg/kmol]\n",
- "#**************#\n",
- "\n",
- "Kf = R*Tf**2*M1/(1000*Lf)## [kg/kmol]\n",
- "print \"Molal Freezing point is %.2f kg/kmol\\n\"%(Kf)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.3 Page: 458"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.3 - Page: 458\n",
- "\n",
- "\n",
- "Latent Heat of Fusion of phenol is 26.54 cal/g\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.3 - Page: 458\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "T_melting = 40## [OC]\n",
- "Tf = T_melting + 273## [K]\n",
- "a = 0.172## [g]\n",
- "b = 12.54## [g]\n",
- "T_new = 39.25## [OC]\n",
- "M2 = 135## [Molecular wt. of acetanilide, g/mol]\n",
- "R = 2## [cal/mol K]\n",
- "#**************#\n",
- "\n",
- "delta_T = T_melting - T_new## [OC]\n",
- "Kf = delta_T*b*M2/(1000*a)#\n",
- "Lv = ((R*Tf**2/(1000)))/Kf## [cal/g]\n",
- "print \"Latent Heat of Fusion of phenol is %.2f cal/g\\n\"%(Lv)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.4 Page: 461"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.4 - Page: 461\n",
- "\n",
- "\n",
- "Molecular weight of anthracene is 178 kg/kmol\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.4 - Page: 461\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "T_boiling = 118.24## [OC]\n",
- "Tb = T_boiling + 273## [K]\n",
- "a = 0.4344## [g]\n",
- "b = 44.16## [g]\n",
- "Lv = 121## [cal/g]\n",
- "T_new = 118.1## [OC]\n",
- "R = 2## [cal/mol K]\n",
- "#**************#\n",
- "\n",
- "delta_Tb = T_boiling - T_new## [OC]\n",
- "M2 = (R*Tb**2/(1000*Lv))*(a*1000/(b*delta_Tb))#\n",
- "print \"Molecular weight of anthracene is %d kg/kmol\"%(round(M2))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.5 Page: 462"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.5 - Page: 462\n",
- "\n",
- "\n",
- "Molar Latent Heat of Vaporisation is 31638 J/mol\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.5 - Page: 462\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "delta_Tb = 2.3## [K]\n",
- "w1 = 100## [g]\n",
- "M1 = 78## [g/mol]\n",
- "w2 = 13.86## [g]\n",
- "M2 = 154## [g/mol]\n",
- "Tb = 353.1## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************#\n",
- "\n",
- "# Molality:\n",
- "m = w2*1000/(w1*M2)## [mol/kg]\n",
- "# Molal Elevation Constant:\n",
- "Kb = delta_Tb/m## [K kg/mol]\n",
- "# Molar Latent Heat of Vaporisation:\n",
- "Lv = R*Tb**2*M1/(1000*Kb)## [J/mol]\n",
- "print \"Molar Latent Heat of Vaporisation is %d J/mol\"%(Lv)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.6 Page: 465"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.6 - Page: 465\n",
- "\n",
- "\n",
- "Osmotic Pressure is 594.38 kPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.6 - Page: 465\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Temp = 50 + 273## [K]\n",
- "w2 = 60## [g]\n",
- "w1 = 1500## [g]\n",
- "M1 = 18## [g/mol]\n",
- "M2 = 180## [g/mol]\n",
- "Vl = 18*10**(-6)## [Molar Volume of water, cubic m/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "# Mole fraction of glucose:\n",
- "x2 = (w2/M2)/((w2/M2) + (w1/M1))#\n",
- "# Applying Eqn. (11.45):\n",
- "P = R*Temp*x2/Vl## [N/square m]\n",
- "P = P/1000## [kPa]\n",
- "print \"Osmotic Pressure is %.2f kPa\\n\"%(P)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 11.7 Page: 465"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 11.7 - Page: 465\n",
- "\n",
- "\n",
- "Osmotic Pressure of the solution is 4.92 atm\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 11.7 - Page: 465\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "w2 = 0.6## [g]\n",
- "w3 = 1.8## [g]\n",
- "Temp = 27 + 273## [K]\n",
- "V1 = 100## [cubic cm]\n",
- "M2 = 60## [g/mol]\n",
- "M3 = 180## [g/mol]\n",
- "R = 0.082## [L.atm/mol.K]\n",
- "#****************#\n",
- "\n",
- "V1 = V1/1000## [litre]\n",
- "# C: Concentration per litre\n",
- "C = ((w2/M2) + (w3/M3))/V1## [mol/litre]\n",
- "P = C*R*Temp## [atm]\n",
- "print \"Osmotic Pressure of the solution is %.2f atm\"%(P)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb
deleted file mode 100755
index f7621b67..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb
+++ /dev/null
@@ -1,1310 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter12 - Chemical reaction equillibria"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.1 Page: 471"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.1 - Page: 471\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 12.1 on page 471 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.1 - Page: 471\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 12.1 on page number 471 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 12.1 on page 471 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.2 Page: 473"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.2 - Page: 473\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 12.2 on page 473 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.2 - Page: 473\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 12.2 on page number 473 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 12.2 on page 473 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.3 Page: 479"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.3 - Page: 479\n",
- "\n",
- "\n",
- "Reaction is feasible\n",
- "\n",
- "Equilibium Constant is 7.964e+32\n"
- ]
- }
- ],
- "source": [
- "from math import exp\n",
- "from __future__ import division\n",
- "print \"Example: 12.3 - Page: 479\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: C2H5OH(g) + (1/2)O2(g) = CH3CHO(g) + H2O(g)\n",
- "Temp = 298## [K]\n",
- "G_CH3CHO = -133.978## [kJ]\n",
- "G_H2O = -228.60## [kJ]\n",
- "G_C2H5OH = -174.883## [kJ]\n",
- "R = 8.314## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "G_O2 = 0## [kJ]\n",
- "G_rkn = G_CH3CHO + G_H2O -(G_C2H5OH + G_O2)## [kJ]\n",
- "G_rkn = G_rkn*1000## [J]\n",
- "if G_rkn < 0 :\n",
- " print \"Reaction is feasible\\n\"\n",
- " K = exp(-(G_rkn/(R*Temp)))#\n",
- " print \"Equilibium Constant is %.3e\"%(K)#\n",
- "else:\n",
- " print \"Reaction is not feasible\\n\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.4 Page: 479"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.4 - Page: 479\n",
- "\n",
- "\n",
- "Vaporisation of liquid water is not spontaneous\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.4 - Page: 479\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# H2O(l) = H2O(g)\n",
- "deltaH = 9710## [cal]\n",
- "deltaS = 26## [e.u.]\n",
- "Temp = 27 + 273## [K]\n",
- "P = 1## [atm]\n",
- "#**************#\n",
- "\n",
- "deltaG = deltaH - Temp*deltaS## [cal]\n",
- "if deltaG > 0:\n",
- " print \"Vaporisation of liquid water is not spontaneous\\n\"\n",
- "else:\n",
- " print \"Vaporisation of liquid water is spontaneous\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.5 Page: 481"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.5 - Page: 481\n",
- "\n",
- "\n",
- "Standard Gibbs free energy change is -33.5 kJ/mol\n",
- "\n",
- "Equilibrium constant is 7.45e+05\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.5 - Page: 481\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: N2(g) + 3H2(g) = 2NH3(g)\n",
- "Temp = 298## [K]\n",
- "G_NH3 = -16.750## [kJ/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "G_N2 = 0## [kJ/mol]\n",
- "G_H2 = 0## [kJ/mol]\n",
- "G_rkn = 2*G_NH3 - G_N2 - 3*G_H2## [kJ/mol]\n",
- "print \"Standard Gibbs free energy change is %.1f kJ/mol\\n\"%(G_rkn)#\n",
- "G_rkn = G_rkn*1000## [J/mol]#\n",
- "K = exp(-(G_rkn/(R*Temp)))#\n",
- "print \"Equilibrium constant is %.2e\"%(K)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.6 Page: 481"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.6 - Page: 481\n",
- "\n",
- "\n",
- "Equilibrium Constant is 1.005e+05\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.6 - Page: 481\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)\n",
- "G_CO = -32.8## [kcal]\n",
- "G_H2O = -54.64## [kcal]\n",
- "G_CO2 = -94.26## [kcal]\n",
- "Temp = 273 + 25## [K]\n",
- "R = 1.987## [cal/mol.K]\n",
- "#***************#\n",
- "\n",
- "G_H2 = 0## [kcal]\n",
- "G_rkn = G_CO2 + G_H2 - (G_CO + G_H2O)## [kcal]\n",
- "G_rkn = G_rkn*1000## [cal]\n",
- "K = exp(-(G_rkn/(R*Temp)))#\n",
- "print \"Equilibrium Constant is %.3e\"%(K)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.7 Page: 485"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.7 - Page: 485\n",
- "\n",
- "\n",
- "Equilibrium constant at 1000 K is 0.9190\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.7 - Page: 485\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)\n",
- "T1 = 298## [K]\n",
- "T2 = 1000## [K]\n",
- "P = 1## [bar]\n",
- "K1 = 1.1582*10**5#\n",
- "H_CO = -110.532## [kJ]\n",
- "H_H2O = -241.997## [kJ]\n",
- "H_CO2 = -393.978## [kJ]\n",
- "R = 8.314## [J/mol.K]\n",
- "#***************#\n",
- "\n",
- "H_H2 = 0## [kJ]\n",
- "H_rkn = H_CO2 + H_H2 - (H_CO + H_H2O)## [kJ]\n",
- "H_rkn = H_rkn*1000## [J]\n",
- "# From Van't Hoff Equation,\n",
- "K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)))#\n",
- "print \"Equilibrium constant at 1000 K is %.4f\"%(K2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.8 Page: 485"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.8 - Page: 485\n",
- "\n",
- "\n",
- "Equilibrium constant at 700 K is 3.8878e-04\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.8 - Page: 485\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: N2(g) + 3H2(g) = 2NH3(g)\n",
- "T1 = 298## [K]\n",
- "T2 = 700## [K]\n",
- "H_NH3 = -46.1## [kJ]\n",
- "G_NH3 = -16.747## [kJ]\n",
- "R = 8.314## [J/mol.K]\n",
- "#**************#\n",
- "\n",
- "H_N2 = 0## [kJ]\n",
- "H_H2 = 0## [kJ]\n",
- "G_N2 = 0## [kJ]\n",
- "G_H2 = 0## [kJ]\n",
- "H_rkn = 2*H_NH3 - (H_N2 + 3*H_H2)## [kJ]\n",
- "G_rkn = 2*G_NH3 - (G_N2 + 3*G_H2)## [kJ]\n",
- "H_rkn = H_rkn*1000## [J]\n",
- "G_rkn = G_rkn*1000## [J]\n",
- "K1 = exp(-(G_rkn/(R*T1)))#\n",
- "K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)))#\n",
- "print \"Equilibrium constant at 700 K is %.4e\"%(K2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.9 Page: 486"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.9 - Page: 486\n",
- "\n",
- "\n",
- "Standard Gibbs free energy at 1000 K -6.055 kJ\n",
- "\n",
- "Standard Equilibrium Constant is 2.1\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 12.9 - Page: 486\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CO(g) + H2O(g) ----> CO2(g) + H2(g)\n",
- "T1 = 298## [K]\n",
- "T2 = 1000## [K]\n",
- "deltaH_298 = -41450## [J/mol]\n",
- "deltaGf_298 = -28888## [J/mol]\n",
- "alpha_CO2 = 45.369## [kJ/kmol K]\n",
- "alpha_H2 = 27.012## [kJ/kmol K]\n",
- "alpha_CO = 28.068## [kJ/kmol K]\n",
- "alpha_H2O = 28.850## [kJ/kmol K]\n",
- "beeta_CO2 = 8.688*10**(-3)## [kJ/kmol square K]\n",
- "beeta_H2 = 3.509*10**(-3)## [kJ/kmol square K]\n",
- "beeta_CO = 4.631*10**(-3)## [kJ/kmol square K]\n",
- "beeta_H2O = 12.055*10**(-3)## [kJ/kmol square K]\n",
- "R = 8.314## [J/mol K]\n",
- "#*************#\n",
- "\n",
- "delta_alpha = alpha_CO2 + alpha_H2 - (alpha_CO + alpha_H2O)#\n",
- "delta_beeta = beeta_CO2 + beeta_H2 - (beeta_CO + beeta_H2O)#\n",
- "# To obtain the standard heat of reaction:\n",
- "deltaH_0 = deltaH_298 - (delta_alpha*T1 + (delta_beeta*T1**2)/2)## [kJ/mol]\n",
- "# From Eqn. 12.52:\n",
- "IR = (deltaH_0 - delta_alpha*T1*log(T1) - (delta_beeta*T1**2)/2 - deltaGf_298)/T1## [kJ/mol K]\n",
- "# Substituting T = T2 and IR in Eqn. 12.51:\n",
- "deltaG_1000 = deltaH_0 - delta_alpha*T2*log(T2) - (delta_beeta*T2**2)/2 - IR*T2## [kJ/mol]\n",
- "print \"Standard Gibbs free energy at 1000 K %.3f kJ\\n\"%(deltaG_1000/1000)#\n",
- "\n",
- "# Standard Equilibrium Constant at 1000 K\n",
- "K_1000 = exp(-(deltaG_1000)/(R*T2))#\n",
- "print \"Standard Equilibrium Constant is %.1f\"%(K_1000)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.10 Page: 489"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.10 - Page: 489\n",
- "\n",
- "\n",
- "Composition of the gas leaving the mixture\n",
- "\n",
- "yCO = yH20 = 0.2247\n",
- "\n",
- "yCO2 = yH2 = 0.2753\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.10 - Page: 489\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CO(g) + H2O(g) ------> CO2(g) + H2(g)\n",
- "P = 10## [bar]\n",
- "T = 1000## [K]\n",
- "K_1000 = 1.5#\n",
- "#***********#\n",
- "\n",
- "# Moles in feed:\n",
- "nCO_feed = 1#\n",
- "nH20_feed = 1#\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# Moles at Equilibrium:\n",
- "# nCO_eqb = 1 - e#\n",
- "# nH20_eqb = 1 - e#\n",
- "# nCO2_eqb = e#\n",
- "# nH2_eqb = e#\n",
- "# Total moles at equilibrium = 1 - e + 1 - e + e + e = 2\n",
- "# Mole Fractions at Equilibrium:\n",
- "# yCO_eqb = (1 - e)/2#\n",
- "# yH20_eqb = (1 - e)/2#\n",
- "# yCO2_eqb = e/2#\n",
- "# yH2_eqb = e/2#\n",
- "# Sum of stoichometric coeffecient:\n",
- "v = 1 + 1 - 1 - 1#\n",
- "K = K_1000*P**v#\n",
- "#deff('[y] = f(e)','y = K - (e/2)*(e/2)/(((1 - e)/2)*(1 - e)/2)')#\n",
- "def f(e):\n",
- " y = K - (e/2)*(e/2)/(((1 - e)/2)*(1 - e)/2)\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "e = fsolve(f, 0.5)#\n",
- "print \"Composition of the gas leaving the mixture\\n\"\n",
- "print \"yCO = yH20 = %.4f\\n\"%((1 - e)/2)#\n",
- "print \"yCO2 = yH2 = %.4f\\n\"%(e/2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.11 Page: 489"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.11 - Page: 489\n",
- "\n",
- "\n",
- "Molar Composition of the gases\n",
- "\n",
- "yN2 = 0.1103\n",
- "\n",
- "yH2 = 0.7207\n",
- "\n",
- "yNH3 = 0.1690\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.11 - Page: 489\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: N2(g) + 3H2(g) --------> 2NH3\n",
- "nN2_feed = 1#\n",
- "nH2_feed = 5#\n",
- "T = 800## [K]\n",
- "P = 250## [bar]\n",
- "K = 1.106*10**(-5)#\n",
- "#**************#\n",
- "\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# Moles at Equilibrium:\n",
- "# nN2_eqb = 1 - e#\n",
- "# nH2_eqb = 5 - 3*e#\n",
- "# nNH3_eqb = 2*e#\n",
- "# Total moles at equilibrium = 1 - e + 5 - 3*e + 2*e = 2*(3 - e)\n",
- "# Mole Fractions at Equilibrium:\n",
- "# yN2_eqb = (1 - e)/(2*(3 - e))#\n",
- "# yH2_eqb = (5 - 3*e)/(2*(3 - e))#\n",
- "# yNH3_eqb = 2*e/(2*(3 - e))#\n",
- "# Sum of stoichometric coeffecient:\n",
- "v = 2 - 3 - 1#\n",
- "Ky = K*P**(-v)#\n",
- "def f(e):\n",
- " y = Ky - ((2*e/(2*(3 - e)))**2)/(((1-e)/((2*(3 - e))))*((5 - 3*e)/(2*(3 - e)))**3)\n",
- " return y\n",
- "e = fsolve(f, 0.5)#\n",
- "print \"Molar Composition of the gases\\n\"\n",
- "print \"yN2 = %.4f\\n\"%((1 - e)/(2*(3 - e)))#\n",
- "print \"yH2 = %.4f\\n\"%((5 - 3*e)/(2*(3 - e)))#\n",
- "print \"yNH3 = %.4f\\n\"%((2*e)/(2*(3 - e)))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.12 Page: 490"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.12 - Page: 490\n",
- "\n",
- "\n",
- "Molar Composition of the gases\n",
- "\n",
- "nSO2 = 0.52\n",
- "\n",
- "nO2 = 3.26\n",
- "\n",
- "nSO3 = 9.48\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.12 - Page: 490\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: SO2(g) + (1/2)O2 ------> SO3(g)\n",
- "P = 1## [bar]\n",
- "T = 750## [K]\n",
- "K = 74#\n",
- "#************#\n",
- "\n",
- "# Moles in Feed:\n",
- "nSO2 = 1#\n",
- "nO2 = 0.5#\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# Moles at Equilibrium:\n",
- "# nSO2_eqb = 10 - e#\n",
- "# nO2_eqb = 8 - 0.5*e#\n",
- "# nSO3_eqb = e#\n",
- "# Total no. of moles = 10 - e + 8 - 0.5*e + e = 18 -0.5*e#\n",
- "# Mole fraction at Equilibrium:\n",
- "# ySO2_eqb = (10 - e)/(18 - 0.5*e)#\n",
- "# yO2_eqb = (8 - 0.5*e)/(18 - 0.5*e)#\n",
- "# ySO3_eqb = e/(18 - 0.8*e)#\n",
- "# Sum of stoichometric coeffecient:\n",
- "v = 1 - 1 -0.5#\n",
- "Ky = K*P**(-v)#\n",
- "def f(e):\n",
- " y = Ky - (e*(18 - (0.5*e)))/((10 - e)*(8 - 0.5*e))\n",
- " return y\n",
- "e = fsolve(f, 7)#\n",
- "print \"Molar Composition of the gases\\n\"\n",
- "print \"nSO2 = %.2f\\n\"%((10 - e))#\n",
- "print \"nO2 = %.2f\\n\"%((8 - 0.5*e))#\n",
- "print \"nSO3 = %.2f\\n\"%(e)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.13 Page: 492"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.13 - Page: 492\n",
- "\n",
- "\n",
- "Total Pressure Required for 50 % conversion of PCl5 is 5.4 atm\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.13 - Page: 492\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: PCl5 = PCl3 + Cl2\n",
- "T = 250## [OC]\n",
- "Kp = 1.8#\n",
- "e = 0.5#\n",
- "#**************#\n",
- "\n",
- "# Basis: 1 mol of PCl5\n",
- "# At Equilibrium:\n",
- "n_PCl5 = 1 - e#\n",
- "n_PCl3 = e#\n",
- "n_Cl2 = e#\n",
- "n_total = n_PCl5 + n_PCl3 + n_Cl2#\n",
- "# Patrial Pressures:\n",
- "# P_PCl5 = (n_PCl5/n_total)*P\n",
- "# P_PCl3 = (n_PCl3/n_total)*P\n",
- "# P_Cl2 = (n_Cl2/n_total)*P\n",
- "def f(P):\n",
- " y = Kp - ((n_PCl3/n_total)*P)*((n_Cl2/n_total)*P)/((n_PCl5/n_total)*P)\n",
- " return y\n",
- "P = fsolve(f, 7)## [atm]\n",
- "print \"Total Pressure Required for 50 %% conversion of PCl5 is %.1f atm\"%(P)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.14 Page: 494"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.14 - Page: 494\n",
- "\n",
- "\n",
- "Degree of Conversion is 0.802\n",
- "\n",
- "Equilibrium Composition of the reaction Mixture\n",
- "\n",
- "ySO2 = 0.0639\n",
- "\n",
- "yO2 = 0.0319\n",
- "\n",
- "ySO3 = 0.2588\n",
- "\n",
- "yAr = 0.6454\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.14 - Page: 494\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: SO2(g) + (1/2)O2(g) -------> SO3(g)\n",
- "# Moles in Feed:\n",
- "nSO2_feed = 1#\n",
- "nO2_feed = 0.5#\n",
- "nAr_feed = 2#\n",
- "P = 30## [bar]\n",
- "T = 900## [K]\n",
- "K = 6#\n",
- "#*************#\n",
- "\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# nSO2_eqb = 1 - e#\n",
- "# nO2_eqb = 0.5*(1 - e)#\n",
- "# nSO3_eqb = e#\n",
- "# nAr_eqb = 2#\n",
- "# Total moles at equilibrium = 1 - e + 0.5*(1 - e) + e + 2 = (7 - e)/2\n",
- "# Mole fractions:\n",
- "# ySO2_eqb = 2*(1 - e)/(7 - e)\n",
- "# yO2_eqb = (1 - e)/(7 - e)\n",
- "# ySO3_eqb = 2*e/(7 - e)\n",
- "# yAr_eqb = 4/(7 - e)\n",
- "# Sum of Stoichiometric Coeffecient:\n",
- "v = 1 - 1 - 1/2#\n",
- "Ky = K*P**(-v)#\n",
- "e = 0.8#\n",
- "err = 1#\n",
- "while err > 0.2:\n",
- " Ky_new = (2*e/(7 - e))/(((2*(1 - e))/(7 - e))*(((1 - e)/(7 - e))**0.5))#\n",
- " err = abs(Ky - Ky_new)#\n",
- " Ky = Ky_new#\n",
- " e = e + 0.001#\n",
- "print \"Degree of Conversion is %.3f\\n\"%(e)#\n",
- "ySO2_eqb = 2*(1 - e)/(7 - e)#\n",
- "yO2_eqb = (1 - e)/(7 - e)#\n",
- "ySO3_eqb = 2*e/(7 - e)#\n",
- "yAr_eqb = 4/(7 - e)#\n",
- "print \"Equilibrium Composition of the reaction Mixture\\n\"\n",
- "print \"ySO2 = %.4f\\n\"%(ySO2_eqb)#\n",
- "print \"yO2 = %.4f\\n\"%(yO2_eqb)#\n",
- "print \"ySO3 = %.4f\\n\"%(ySO3_eqb)#\n",
- "print \"yAr = %.4f\\n\"%(yAr_eqb)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.15 Page: 498"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.15 - Page: 498\n",
- "\n",
- "\n",
- "Mole fraction of ethyl acetate is 0.344\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.15 - Page: 498\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CH3COOH(l) + C2H5OH(l) --------> CH3COOC2H5(l) + H2O(l)\n",
- "T = 373.15## [K]\n",
- "nCH3COOH_feed = 1#\n",
- "nC2H5OH_feed = 1#\n",
- "deltaHf_CH3COOH = -484.5## [kJ]\n",
- "deltaHf_C2H5OH = -277.69## [kJ]\n",
- "deltaHf_CH3COOC2H5 = -480## [kJ]\n",
- "deltaHf_H2O = -285.83## [kJ]\n",
- "deltaGf_CH3COOH = -389.9## [kJ]\n",
- "deltaGf_C2H5OH = -174.78## [kJ]\n",
- "deltaGf_CH3COOC2H5 = -332.2## [kJ]\n",
- "deltaGf_H2O = -237.13## [kJ]\n",
- "R = 8.314## [J/mol K]\n",
- "#******************#\n",
- "\n",
- "deltaH_298 = deltaHf_CH3COOC2H5 + deltaHf_H2O - deltaHf_CH3COOH - deltaHf_C2H5OH## [kJ]\n",
- "deltaG_298 = deltaGf_CH3COOC2H5 + deltaGf_H2O - deltaGf_CH3COOH - deltaGf_C2H5OH## [kJ]\n",
- "T0 = 298## [K]\n",
- "K_298 = exp(-(deltaG_298*1000/(R*T0)))#\n",
- "K_373 = K_298*exp((deltaH_298*1000/R)*((1/T0) - (1/T)))#\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# nCH3COOH_eqb = 1 - e#\n",
- "# nC2H5OH_eqb = 1 - e#\n",
- "# nCH3COOC2H5_eqb = e#\n",
- "# nH2O_eqb = e#\n",
- "# Total moles at equilibrium = 1 - e + 1 - e + e + e = 2\n",
- "# Mole fractions:\n",
- "# ySO2_eqb = (1 - e)/2\n",
- "# yO2_eqb = (1 - e)/2\n",
- "# ySO3_eqb = e/2\n",
- "# yAr_eqb = e/2\n",
- "# Sum of Stoichiometric Coeffecient:\n",
- "v = 1 + 1 - 1 - 1#\n",
- "def f(e):\n",
- " y = K_373 - ((e/2)*(e/2))/(((1 - e)/2)*((1 - e)/2))\n",
- " return y\n",
- "e = fsolve(f, 0.5)#\n",
- "print \"Mole fraction of ethyl acetate is %.3f\"%(e/2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.16 Page: 501"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.16 - Page: 501\n",
- "\n",
- "\n",
- "The decomposition pressure of limestone is 0.0493 bar at 1000 K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.16 - Page: 501\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: CaCO3(s) = CaO(s) + CO2(g)\n",
- "T = 1000## [K]\n",
- "deltaH_1000 = 1.7533*10**5## [J]\n",
- "deltaS_1000 = 150.3## [J/mol K]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************#\n",
- "\n",
- "deltaG_1000 = deltaH_1000 - T*deltaS_1000## [J]\n",
- "K_1000 = exp(-(deltaG_1000/(R*T)))## [bar]\n",
- "P = K_1000#\n",
- "print \"The decomposition pressure of limestone is %.4f bar at 1000 K\"%(P)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.17 Page: 501"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.17 - Page: 501\n",
- "\n",
- "\n",
- "The decomposition pressure is 0.0093 bar at 400 K\n",
- "\n",
- "The decomposition pressure is 343.20 bar at 700 K\n",
- "\n",
- "The decomposition temperature is 493.450 K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.17 - Page: 501\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Reaction: A(s) ---------> B(s) + C(g)\n",
- "def f1(T):\n",
- " deltaG = 85000 - 213.73*T + 6.71*T*log(T) - 0.00028*T**2\n",
- " return deltaG\n",
- "T1 = 400## [K]\n",
- "T2 = 700## [K]\n",
- "Pc = 1## [bar]\n",
- "R = 8.314## [J/mol K]\n",
- "#**************#\n",
- "\n",
- "deltaG_400 = f1(400)## [J]\n",
- "deltaG_700 = f1(700)## [J]\n",
- "K_400 = exp(-(deltaG_400/(R*T1)))## [bar]\n",
- "K_700 = exp(-(deltaG_700/(R*T2)))## [bar]\n",
- "print \"The decomposition pressure is %.4f bar at 400 K\\n\"%(K_400)#\n",
- "print \"The decomposition pressure is %.2f bar at 700 K\\n\"%(K_700)#\n",
- "\n",
- "# Equilibrium constant for solid - gas reaction is:\n",
- "# K = aB*aC/aA = aC = fC = Pc\n",
- "def f2(T):\n",
- " y = Pc - exp(-f1(T)/(R*T))\n",
- " return y\n",
- "T = fsolve(f2,900)## [K]\n",
- "print \"The decomposition temperature is %.3f K\"%(T)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.18 Page: 502"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.18 - Page: 502\n",
- "\n",
- "\n",
- "Equilibrium Composition\n",
- "\n",
- "yH2 = 0.34\n",
- "\n",
- "y_H2O = 0.66\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.18 - Page: 502\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "T = 875## [K]\n",
- "K = 0.514#\n",
- "P = 1## [bar]\n",
- "#*************#\n",
- "\n",
- "# Reaction: Fe(s) + H2O(g) --------->FeO(s) + H2(g)\n",
- "# K = a_FeO*a_H2/(a_Fe*a_H2O)\n",
- "# Since the activities of the solid components Fe & FeO at equilibrium may be taken as unity.\n",
- "# a_Fe = a_FeO = 1\n",
- "# Ka = a_H2/a_H2O#\n",
- "# Feed:\n",
- "nH2O_feed = 1#\n",
- "nH2feed = 0#\n",
- "# Let e be the degree of completion at equilibrium.\n",
- "# Moles at Equilibrium:\n",
- "# nH2O_eqb = 1 - e#\n",
- "# nH2_eqb = e#\n",
- "# Total moles at equilibrium = 1 - e + e = 1\n",
- "# Mole Fractions at Equilibrium:\n",
- "# yH20_eqb = 1 - e#\n",
- "# yH2_eqb = e#\n",
- "# Sum of stoichometric coeffecient:\n",
- "v = 1 - 1#\n",
- "Ky = K*P**(-v)#\n",
- "# Ky = e/(1 - e)\n",
- "e = Ky/(Ky + 1)#\n",
- "yH2_eqb = e#\n",
- "yH2O_eqb = 1 - e#\n",
- "print \"Equilibrium Composition\\n\"\n",
- "print \"yH2 = %.2f\\n\"%(yH2_eqb)#\n",
- "print \"y_H2O = %.2f\\n\"%(yH2O_eqb)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.19 Page: 503"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.19 - Page: 503\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 12.19 on page 503 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.19 - Page: 503\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 12.19 on page number 503 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 12.19 on page 503 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.20 Page: 505"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.20 - Page: 505\n",
- "\n",
- "\n",
- "No. of independent reaction that occur is 2\n",
- "\n",
- "No. of Degree of freedom is 4\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.20 - Page: 505\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#Reactions:\n",
- "# CO + (1/2)O2 ------------> CO2 ......................................(1)\n",
- "# C + O2 ------------------> CO2 ......................................(2)\n",
- "# H2 + (1/2)O2 ------------> H2O ......................................(3)\n",
- "# C + 2H2 -----------------> CH4 ......................................(4)\n",
- "\n",
- "# Elimination of C:\n",
- "# Combining Eqn. (2) with (1):\n",
- "# CO + (1/2)O2 ------------> CO2 ......................................(5)\n",
- "# Combining Eqn. (2) with (4):\n",
- "# CH4 + O2 ----------------> 2H2 + CO2 ................................(6)\n",
- "\n",
- "# Elimination of O2:\n",
- "# Combining Eqn. (3) with (4):\n",
- "# CO2 + H2 ----------------> CO + H2O .................................(7)\n",
- "# Combining Eqn. (3) with (6):\n",
- "# CH4 + 2H2O -------------> CO2 + 4H2 .................................(8)\n",
- "\n",
- "# Equations 7 & 8 are independent sets. Hence\n",
- "r = 2## [No. of independent rkn.]\n",
- "C = 5## [No. of component]\n",
- "P = 1## [No. of phases]\n",
- "s = 0## [No special constraint]\n",
- "# Applying Eqn. 12.81\n",
- "F = C - P + 2 - r - s## [Degree of freedom]\n",
- "print \"No. of independent reaction that occur is %d\\n\"%(r)#\n",
- "print \"No. of Degree of freedom is %d\"%(F)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.21 Page: 506"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.21 - Page: 506\n",
- "\n",
- "\n",
- "No. of Degree of freedom is 1\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.21 - Page: 506\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# Reaction: CaCO3 -----------> CaO + CO2\n",
- "r = 1## [No. of independent rkn.]\n",
- "C = 3## [No. of component]\n",
- "P = 3## [No. of phases, solid CaO, solid CaCO3, gaseous CO2]\n",
- "s = 0## [No special constraint]\n",
- "# Applying Eqn. 12.81\n",
- "F = C - P + 2 - r - s## [Degree of freedom]\n",
- "print \"No. of Degree of freedom is %d\"%(F)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 12.22 Page: 508"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 12.22 - Page: 508\n",
- "\n",
- "\n",
- "At Equilibrium\n",
- "\n",
- "yC4H10 = 0.0009\n",
- "\n",
- "yC2H4 = 0.0535\n",
- "\n",
- "yC2H6 = 0.0535\n",
- "\n",
- "yC3H6 = 0.4461\n",
- "\n",
- "yCH4 = 0.4461\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 12.22 - Page: 508\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*********Data*********#\n",
- "# Reaction: \n",
- "# C4H10 -----------> C2H4 + C2H6 ....................................(A)\n",
- "# C4H10 -----------> C3H6 + CH4 .................................... (B)\n",
- "T = 750## [K]\n",
- "P = 1.2## [bar]\n",
- "Ka = 3.856#\n",
- "Kb = 268.4#\n",
- "#************************#\n",
- "\n",
- "# Let\n",
- "# ea = Degree of conversion of C4H10 in reaction (A)\n",
- "# eb = Degree of conversion of C4H10 in reaction (B)\n",
- "\n",
- "# Moles in Feed:\n",
- "nC4H10_feed = 1#\n",
- "nC2H4_feed = 0#\n",
- "nC2H6_feed = 0#\n",
- "nC3H6_feed = 0#\n",
- "nCH4_feed = 0#\n",
- "\n",
- "# Moles at Equilibrium:\n",
- "# nC4H10_eqb = 1 - ea - eb\n",
- "# nC2H4_eqb = ea\n",
- "# nC2H6_eqb = ea\n",
- "# nC3H6_eqb = eb\n",
- "# nCH4_eqb = eb\n",
- "\n",
- "# Total moles at equilibrium = 1 - ea - eb + ea + eb + eb = 1 + ea + eb\n",
- "\n",
- "# Mole Fraction:\n",
- "# yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb)\n",
- "# yC2H4_eqb = ea/(1 + ea + eb)\n",
- "# yC2H6_eqb = ea/(1 + ea + eb)\n",
- "# yC3H6_eqb = eb/(1 + ea + eb)\n",
- "# yCH4_eqb = eb/(1 + ea + eb)\n",
- "\n",
- "# Sum of the stoichometric coeffecient:\n",
- "va = 1 + 1 - 1#\n",
- "vb = 1 + 1 - 1#\n",
- "\n",
- "# e = [ea eb]\n",
- "# Solution of simultaneous equation\n",
- "def F(e):\n",
- " f1 = (((e[0]/(1 + e[0] + e[1]))*(e[0]/(1 + e[0] + e[1])))/((1 - e[0] - e[1])/(1 + e[0] + e[1])))*P**va - Ka#\n",
- " f2 = (((e[1]/(1 + e[0] + e[1]))*(e[1]/(1 + e[0] + e[1])))/((1 - e[0] - e[1])/(1 + e[0] + e[1])))*P**vb - Kb#\n",
- " return [f1, f2]\n",
- "\n",
- "# Initial guess:\n",
- "e = [0.1, 0.8]#\n",
- "y = fsolve(F, e)#\n",
- "ea = y[0]#\n",
- "eb = y[1]#\n",
- "yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb)#\n",
- "yC2H4_eqb = ea/(1 + ea + eb)#\n",
- "yC2H6_eqb = ea/(1 + ea + eb)#\n",
- "yC3H6_eqb = eb/(1 + ea + eb)#\n",
- "yCH4_eqb = eb/(1 + ea + eb)#\n",
- "\n",
- "print \"At Equilibrium\\n\"\n",
- "print \"yC4H10 = %.4f\\n\"%(yC4H10_eqb)#\n",
- "print \"yC2H4 = %.4f\\n\"%(yC2H4_eqb)#\n",
- "print \"yC2H6 = %.4f\\n\"%(yC2H6_eqb)#\n",
- "print \"yC3H6 = %.4f\\n\"%(yC3H6_eqb)#\n",
- "print \"yCH4 = %.4f\\n\"%(yCH4_eqb)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb
deleted file mode 100755
index 9013eed3..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb
+++ /dev/null
@@ -1,1274 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 2 - First law of thermodynamics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.1 Page: 39"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.1 - Page: 39\n",
- "\n",
- "\n",
- "The work done during the process is -9486.67 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "\n",
- "print \"Example: 2.1 - Page: 39\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "#deff('[E] = f1(T)','E = 50 + 25*T + 0.05*T**2')## [J]\n",
- "#deff('[Q] = f2(T)','Q = 4000 + 10*T')## [J]\n",
- "\n",
- "def f1(T):\n",
- " E = 50 + 25*T + 0.05*T**2\n",
- " return E\n",
- "\n",
- "def f2(T):\n",
- " Q = 4000 + 10*T\n",
- " return Q\n",
- "Ti = 400## [K]\n",
- "Tf = 800## [K]\n",
- "#*************#\n",
- "\n",
- "# From the first law of thermodynamics:\n",
- "# W = Q - delta_E\n",
- "# W = f2 -f1\n",
- "from sympy.mpmath import quad\n",
- "W = quad(lambda T:(4000 + 10*T) - (50 + (25*T) + (0.05*T**2)),[Ti,Tf])#\n",
- "print \"The work done during the process is %.2f kJ\\n\"%(W/1000)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.2 Page: 40"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.2 - Page: 40\n",
- "\n",
- "\n",
- "The final internal energy of the fluid is 500 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.2 - Page: 40\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "U1 = 1000## [kJ]\n",
- "Q = -600# # [kJ]\n",
- "W = -100## [kJ]\n",
- "#************#\n",
- "\n",
- "# The system is considered to be a closed system. No mass transfer takes place across the system. The tank is rigid. \n",
- "# So, the kinetic and the potential energies is zero.\n",
- "# Therefore:\n",
- "# delta_E = delta_U + delta_PE + delta_KE\n",
- "# delta_E = delta_U\n",
- "# From the first law of thermodynamics:\n",
- "# Q = delta_U + W\n",
- "# delta_U = Q - W\n",
- "# U2 - U1 = Q - W\n",
- "U2 = U1 + Q - W## [kJ]\n",
- "print \"The final internal energy of the fluid is %d kJ\\n\"%(U2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.3 Page: 40"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.3 - Page: 40\n",
- "\n",
- "\n",
- "The change in the internal energy of the system would be 1125.99 J/s\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.3 - Page: 40\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "W = -3## [hp]\n",
- "Q = -4000## [kJ/h]\n",
- "#**************#\n",
- "\n",
- "# The work done by the stirrer on the system is given by\n",
- "W = W*745.7## [W]\n",
- "# The amount of heat transferred to the suroundings can be expressed in terms of J/s:\n",
- "Q = Q*1000/3600## [J/s]\n",
- "# From the first law of thermodynamics:\n",
- "# Q = delta_U - W\n",
- "delta_U = Q - W## [J/s]\n",
- "print \"The change in the internal energy of the system would be %.2f J/s\\n\"%(delta_U)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.4 Page: 41"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.4 - Page: 41\n",
- "\n",
- "\n",
- "The amount of heat transferred from the system to the surroundings during process B-3-A is 95 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.4 - Page: 41\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# From Fig. 2.4 (Page: 41)\n",
- "# For process A-1-B:\n",
- "Q1 = 60## [kJ]\n",
- "W1 = 35## [kJ]\n",
- "# For process A-2-B:\n",
- "W2 = 50## [kJ]\n",
- "# For process B-3-A:\n",
- "W3 = -70## [kJ]\n",
- "#************#\n",
- "\n",
- "# For process A-1-B:\n",
- "# The internal energy of the process A-1-B can be estimated as:\n",
- "# Q = delta_U + W\n",
- "delta_U = Q1 - W1## [kJ]\n",
- "# For process A-2-B:\n",
- "Q2 = delta_U + W2## [kJ]\n",
- "# For process B-3-A:\n",
- "Q3 = -delta_U + W3## [kJ]\n",
- "print \"The amount of heat transferred from the system to the surroundings during process B-3-A is %d kJ\\n\"%(-Q3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.5 Page: 41"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.5 - Page: 41\n",
- "\n",
- "\n",
- "Change in Internal Energy for process 1-2 is 50 kJ\n",
- "\n",
- "Change in Internal Energy for process 2-3 is 80 kJ\n",
- "\n",
- "Change in Internal Energy for process 3-1 is -130 kJ\n",
- "\n",
- "The work done during the adiabatic process is 130 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.5 - Page: 41\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# For constant pressure process 1-2:\n",
- "W12 = -100## [kJ]\n",
- "Q12 = -50## [kJ]\n",
- "# For constant volume process 2-3:\n",
- "Q23 = 80## [kJ]\n",
- "# process 3-1: Adiabatic process\n",
- "#**************#\n",
- "\n",
- "# The internal energy of process 1-2 can be calculated as:\n",
- "delta_U12 = Q12 - W12## [kJ]\n",
- "print \"Change in Internal Energy for process 1-2 is %d kJ\\n\"%(delta_U12)#\n",
- "# For the process 2-3:\n",
- "# As the process is constant volume process:\n",
- "W23 = 0## [kJ]\n",
- "delta_U23 = Q23 - W23## [kJ]\n",
- "print \"Change in Internal Energy for process 2-3 is %d kJ\\n\"%(delta_U23)#\n",
- "\n",
- "# For process 3-1:\n",
- "# Since the process is adiabatic, ther is no heat transfer between the system and the surrounding.\n",
- "Q31 = 0## [kJ]\n",
- "# For a cyclic process, the internal energy change is zero.\n",
- "# delta_U12 + delta_U23 + delta_U31 = 0\n",
- "delta_U31 = -(delta_U12 + delta_U23)## [kJ]\n",
- "# Putting the value of delta_U31:\n",
- "W31 = Q31 - delta_U31## [kJ]\n",
- "print \"Change in Internal Energy for process 3-1 is %d kJ\\n\"%(delta_U31)#\n",
- "print \"The work done during the adiabatic process is %d kJ\\n\"%(W31)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.6 Page: 44"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.6 - Page: 44\n",
- "\n",
- "\n",
- "Change in Internal Energy is 2087.59 kJ\n",
- "\n",
- "Change in enthalpy is 2257 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.6 - Page: 44\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 1## [kg]\n",
- "Temp = 373## [K]\n",
- "P = 101325## [N/square m]\n",
- "V_Liquid = 1.04*10**(-3)## [cubic m/kg]\n",
- "V_Vapour = 1.673## [cubic m/kg]\n",
- "Q = 2257## [kJ]\n",
- "#**************#\n",
- "\n",
- "# Work done due to expansion:\n",
- "Wexpansion = P*(V_Vapour - V_Liquid)## [N-m]\n",
- "deltaU = Q - Wexpansion/1000## [kJ]\n",
- "deltaH = deltaU + Wexpansion/1000## [kJ]\n",
- "\n",
- "print \"Change in Internal Energy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Change in enthalpy is %d kJ\\n\"%(deltaH)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.7 Page: 45"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.7 - Page: 45\n",
- "\n",
- "\n",
- "Change in Internal Energy is 26705.16 J\n",
- "\n",
- "Change in Enthalpy is 29640 J\n",
- "\n",
- "Amount of Heat supplied is 29640 J\n",
- "\n",
- "Work done is 2934.84 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.7 - Page: 45\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 1## [mol]\n",
- "Temp = 353## [K]\n",
- "P = 1## [atm]\n",
- "Hv = 380## [J/g]\n",
- "Mwt = 78## [g/mol]\n",
- "R = 8.314## [J/K mol]\n",
- "#*************#\n",
- "\n",
- "Q = Hv*Mwt## [J/mol]\n",
- "# Since Vv >> Vl:\n",
- "# P*(Vv - Vl) = P*Vv =n*R*Temp\n",
- "Wexpansion = n*R*Temp## [J]\n",
- "# By first law of thermodynamics:\n",
- "deltaU = Q - Wexpansion## [J]\n",
- "deltaH = deltaU + Wexpansion## [J]\n",
- "\n",
- "print \"Change in Internal Energy is %.2f J\\n\"%(deltaU)#\n",
- "print \"Change in Enthalpy is %d J\\n\"%(deltaH)#\n",
- "print \"Amount of Heat supplied is %d J\\n\"%(Q)#\n",
- "print \"Work done is %.2f J\\n\"%(Wexpansion)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.8 Page: 45"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.8 - Page: 45\n",
- "\n",
- "\n",
- "Change in enthalpy is 589.48 cal\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.8 - Page: 45\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "deltaU = 200## [cal]\n",
- "Vinit = 10## [L]\n",
- "Vfinal = 50## [L]\n",
- "#deff('[P] = f(V)','P = 10/V')#\n",
- "def f(V):\n",
- " P=10/V\n",
- " return P\n",
- "#**************#\n",
- "\n",
- "# By definition of enthalpy:\n",
- "# deltaQ = deltaU + PdV\n",
- "deltaQ = deltaU + quad(f,[Vinit,Vfinal])*24.2## [cal]\n",
- "print \"Change in enthalpy is %.2f cal\\n\"%(deltaQ)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.9 Page: 48"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.9 - Page: 48\n",
- "\n",
- "\n",
- "Rise in Temperature is 58.67 K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.9 - Page: 48\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m_water = 1## [kg]\n",
- "Cv = 4.18## [kJ/kg K]\n",
- "m_stirrer = 40## [kg]\n",
- "h = 25## [m]\n",
- "g = 9.81## [m/square s]\n",
- "#***************#\n",
- "\n",
- "# Since the system is thermally insulated:\n",
- "# Q = 0\n",
- "# From the first law of thermodynamics:\n",
- "# dQ = dE + dW\n",
- "# As E = U + Ek +Ep and Ek = Ep = 0\n",
- "# dQ = dU + dW\n",
- "dT = g*h/Cv## [K]\n",
- "print \"Rise in Temperature is %.2f K\\n\"%(dT)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.10 Page: 53"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.10 - Page: 53\n",
- "\n",
- "\n",
- "The final temperature is 753.6 K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.10 - Page: 53\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T1 = 300## [K]\n",
- "V1 = 30## [L]\n",
- "V2 = 3## [L]\n",
- "Cv = 5## [cal/mol]\n",
- "R = 2## [cal/K mol]\n",
- "#*************#\n",
- "\n",
- "Cp = Cv + R## [cal/mol]\n",
- "gama = Cp/Cv#\n",
- "# The relation between temperature and volume of ideal gas undergoing adiabatic change is given by:\n",
- "# (T2/T1) = (V1/V2)**(gama - 1)\n",
- "T2 = T1 * (V1/V2)**(gama - 1)## [K]\n",
- "print \"The final temperature is %.1f K\\n\"%(T2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.11 Page: 53"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.11 - Page: 53\n",
- "\n",
- "\n",
- "The final volme is 7.44 L\n",
- "\n",
- "The final temperature is 226.80 K\n",
- "\n",
- "Adiabatic work done is 35.72 L-atm\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.11 - Page: 53\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 2## [mol]\n",
- "T1 = 293## [K]\n",
- "P1 = 15##[atm]\n",
- "P2 = 5## [atm]\n",
- "Cp = 8.58## [cal/degree mol]\n",
- "#**************#\n",
- "\n",
- "R = 2## [cal/degree mol]\n",
- "Cv = Cp - R## [cal /degree mol]\n",
- "gama = Cp/Cv#\n",
- "R = 0.082## [L atm/degree K]\n",
- "# Since the gas is ideal:\n",
- "V1 = n*R*T1/P1## [L]\n",
- "# Under adiabatic conditions:\n",
- "# (V2/V1) = (P1/P2)**(1/gama)\n",
- "V2 = V1*(P1/P2)**(1/gama)## [L]\n",
- "print \"The final volme is %.2f L\\n\"%(V2)#\n",
- "\n",
- "# To determine the final temperature:\n",
- "# (T2/T1) = (V1/V2)**(gama - 1)#\n",
- "T2 = T1*(V1/V2)**(gama - 1)## [K]\n",
- "print \"The final temperature is %.2f K\\n\"%(T2)#\n",
- "\n",
- "# Adiabatic Work done can be calculated as:\n",
- "W = (P1*V1 - P2*V2)/(gama - 1)#\n",
- "print \"Adiabatic work done is %.2f L-atm\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.12 Page: 57"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.12 - Page: 57\n",
- "\n",
- "\n",
- "Adiabatic Process \n",
- "\n",
- "Final Pressure is 0.84 atm\n",
- "\n",
- "Final Temperature is 169.673696 K\n",
- "\n",
- "Adiabatic Work done is 31.432 L-atm\n",
- "\n",
- "\n",
- "\n",
- "Isothermal Process\n",
- "\n",
- "Final temperature is 323 K\n",
- "\n",
- "Final pressure is 1.6 atm\n",
- "\n",
- "Work done during the isothermal process is 42.63 L-atm\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 2.12 - Page: 57\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 1## [kg]\n",
- "P1 = 8## [atm]\n",
- "T1 = 50 + 273## [K]\n",
- "# V1 = V## [L]\n",
- "# V2 = 5V## [L]\n",
- "V1_by_V2 = 1/5#\n",
- "gama = 1.4#\n",
- "R = 0.082## [L-atm]\n",
- "#***************#\n",
- "\n",
- "# Adiabatic process:\n",
- "print \"Adiabatic Process \\n\"\n",
- "P2 = P1*V1_by_V2**gama## [atm]\n",
- "print \"Final Pressure is %.2f atm\\n\"%(P2)#\n",
- "T2 = T1*V1_by_V2**(gama - 1)## [K]\n",
- "print \"Final Temperature is %f K\\n\"%(T2)#\n",
- "Wad = R*(T2 - T1)/(1 - gama)## [L-atm]\n",
- "print \"Adiabatic Work done is %.3f L-atm\\n\"%(Wad)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Isothermal Process:\n",
- "print \"Isothermal Process\\n\"\n",
- "# In an isothermal Process, the temperature remans constant:\n",
- "T2 = T1## [K]\n",
- "print \"Final temperature is %d K\\n\"%(T2)#\n",
- "# From the ideal gas:\n",
- "# (P2*V2/T2) = (P1*V1/T1)\n",
- "# Since T2 = T1\n",
- "# P2*V2 = P1*V1\n",
- "P2 = P1*V1_by_V2## [atm]\n",
- "print \"Final pressure is %.1f atm\\n\"%(P2)#\n",
- "W = R*T1*log(1/V1_by_V2)## [L-atm]\n",
- "print \"Work done during the isothermal process is %.2f L-atm\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.13 Page: 58"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.13 - Page: 58\n",
- "\n",
- "\n",
- "Isochoric Process\n",
- "\n",
- "Change in Internal Energy is 716.55 kJ\n",
- "\n",
- "Heat Supplied is 716.55 kJ\n",
- "\n",
- "Work done is 0 kJ\n",
- "\n",
- "Change in Enthalpy is 1003.24 kJ\n",
- "\n",
- "\n",
- "\n",
- "Isobaric Process\n",
- "\n",
- "Change in Internal Energy is 716.76 kJ\n",
- "\n",
- "Heat Supplied is 1003.45 kJ\n",
- "\n",
- "Work done is 286.69 kJ\n",
- "\n",
- "Change in Enthalpy is 1003.45 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.13 - Page: 58\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 5## [kg]\n",
- "M = 29## [kg/mol]\n",
- "T1 = 37 + 273## [K]\n",
- "P1 = 101.33## [kPa]\n",
- "T2 = 237 + 273## [K]\n",
- "Cp = 29.1## [J/mol K]\n",
- "Cv = 20.78## [J/mol K]\n",
- "R = 8.314## [J/K mol]\n",
- "#*****************#\n",
- "\n",
- "n = m/M#\n",
- "# From ideal gas equation:\n",
- "V1 = n*R*T1/P1## [cubic m]\n",
- "\n",
- "# Isochoric Process:\n",
- "print \"Isochoric Process\\n\"\n",
- "# Volume = constant\n",
- "V2 = V1## [cubic m]\n",
- "deltaU = n*Cv*(T2 - T1)## [kJ]\n",
- "# Since Volume is constant\n",
- "W = 0#\n",
- "Q = deltaU + W## [kJ]\n",
- "# deltaH = deltaU + P*deltaV\n",
- "# deltaH = deltaU + n*R*deltaT\n",
- "deltaH = deltaU + n*R*(T2 - T1)## [kJ]\n",
- "print \"Change in Internal Energy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Heat Supplied is %.2f kJ\\n\"%(Q)#\n",
- "print \"Work done is %d kJ\\n\"%(W)#\n",
- "print \"Change in Enthalpy is %.2f kJ\\n\"%(deltaH)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Isobaric Process\n",
- "print \"Isobaric Process\\n\"\n",
- "# Since Pressure is constant.\n",
- "P2 = P1## [kPa]\n",
- "deltaH = n*Cp*(T2 - T1)## [kJ]\n",
- "Qp = deltaH## [kJ]\n",
- "# deltaU = deltaH - P*deltaV\n",
- "# From ideal gas equation:\n",
- "deltaU = deltaH - n*R*(T2 - T1)## [kJ]\n",
- "W = Qp - deltaU## [kJ]\n",
- "print \"Change in Internal Energy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Heat Supplied is %.2f kJ\\n\"%(Qp)#\n",
- "print \"Work done is %.2f kJ\\n\"%(W)#\n",
- "print \"Change in Enthalpy is %.2f kJ\\n\"%(deltaH)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.14 Page: 60"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.14 - Page: 60\n",
- "\n",
- "\n",
- "Step 1: Isothermal Expansion Of Ideal Gas\n",
- "\n",
- "delta_E for Step 1 is 0 J/mol\n",
- "\n",
- "Q for step 1 is 11679.76 J/mol\n",
- "\n",
- "W for step 1 is 11679.76 J/mol\n",
- "\n",
- "\n",
- "\n",
- "Step 2: Adiabatic Expansion of ideal gas\n",
- "\n",
- "delta_E for Step 2 is -6234 J/mol\n",
- "\n",
- "Q for step 2 is 0.00 J/mol\n",
- "\n",
- "W for step 2 is 6234.00 J/mol\n",
- "\n",
- "\n",
- "\n",
- "Step 3: Isothermal Compression Of Ideal Gas\n",
- "\n",
- "delta_E for Step 3 is 0 J/mol\n",
- "\n",
- "Q for step 3 is -5935.61 J/mol\n",
- "\n",
- "W for step 3 is -5935.61 J/mol\n",
- "\n",
- "\n",
- "\n",
- "Step 4: Adiabatic Compression of ideal gas\n",
- "\n",
- "delta_E for Step 4 is 6234 J/mol\n",
- "\n",
- "Q for step 4 is 0.00 J/mol\n",
- "\n",
- "W for step 4 is -6234.00 J/mol\n",
- "\n",
- "\n",
- "\n",
- "Net Work done for the complete cycle is 5744.14 J/mol\n",
- "\n",
- "The efficiency of the cycle is 0.49\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import log10\n",
- "print \"Example: 2.14 - Page: 60\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 1## [mol]\n",
- "T1 = 610## [K]\n",
- "P1 = 10**6## [N/square m]\n",
- "T2 = 310## [K]\n",
- "P2 = 10**5## [N/square m]\n",
- "Cv = 20.78## [J/mol K]\n",
- "#*************#\n",
- "\n",
- "R = 8.314## [J/K mol]\n",
- "\n",
- "# Step 1: Isothermal Expansion Of Ideal Gas:\n",
- "print \"Step 1: Isothermal Expansion Of Ideal Gas\\n\"\n",
- "T1 = 610## [K]\n",
- "P1 = 10**6## [N/square m]\n",
- "P2 = 10**5## [N/square m]\n",
- "# Work done:\n",
- "W1 = 2.303*n*R*T1*log10(P1/P2)## [J/mol]\n",
- "# For isothermal expansion:\n",
- "delta_E1 = 0## [J/mol]\n",
- "# From first law of thermodynamics:\n",
- "Q1 = delta_E1 + W1## [J/mol]\n",
- "print \"delta_E for Step 1 is %d J/mol\\n\"%(delta_E1)#\n",
- "print \"Q for step 1 is %.2f J/mol\\n\"%(Q1)#\n",
- "print \"W for step 1 is %.2f J/mol\\n\"%(W1)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Step 2: Adiabatic Expansion of ideal gas:\n",
- "print \"Step 2: Adiabatic Expansion of ideal gas\\n\"\n",
- "Q2 = 0## [J/mol]\n",
- "delta_E2 = Cv*(T2 - T1)## [J/mol]\n",
- "# From first law of thermodynamics:\n",
- "W2 = Q2 - delta_E2## [J/mol]\n",
- "print \"delta_E for Step 2 is %d J/mol\\n\"%(delta_E2)#\n",
- "print \"Q for step 2 is %.2f J/mol\\n\"%(Q2)#\n",
- "print \"W for step 2 is %.2f J/mol\\n\"%(W2)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Step 3: Isothermal Compression Of Ideal Gas:\n",
- "print \"Step 3: Isothermal Compression Of Ideal Gas\\n\"\n",
- "T2 = 310## [K]\n",
- "P1 = 10**5## [N/square m]\n",
- "P2 = 10**6## [N/square m]\n",
- "# Work done:\n",
- "W3 = 2.303*n*R*T2*log10(P1/P2)## [J/mol]\n",
- "# For isothermal expansion:\n",
- "delta_E3 = 0## [J/mol]\n",
- "# From first law of thermodynamics:\n",
- "Q3 = delta_E3 + W3## [J/mol]\n",
- "print \"delta_E for Step 3 is %d J/mol\\n\"%(delta_E3)#\n",
- "print \"Q for step 3 is %.2f J/mol\\n\"%(Q3)#\n",
- "print \"W for step 3 is %.2f J/mol\\n\"%(W3)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Step 4: Adiabatic Compression of ideal gas:\n",
- "print \"Step 4: Adiabatic Compression of ideal gas\\n\"\n",
- "T1 = 310## [K]\n",
- "T2 = 610## [K]\n",
- "Q4 = 0## [J/mol]\n",
- "delta_E4 = Cv*(T2 - T1)## [J/mol]\n",
- "# From first law of thermodynamics:\n",
- "W4 = Q4 - delta_E4## [J/mol]\n",
- "print \"delta_E for Step 4 is %d J/mol\\n\"%(delta_E4)#\n",
- "print \"Q for step 4 is %.2f J/mol\\n\"%(Q4)#\n",
- "print \"W for step 4 is %.2f J/mol\\n\"%(W4)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Net work done for the complete cycle:\n",
- "W = W1 + W2 + W3 + W4## [J/mol]\n",
- "print \"Net Work done for the complete cycle is %.2f J/mol\\n\"%(W)#\n",
- "\n",
- "# The efficiency of the cycle is given by:\n",
- "eta = 1- T1/T2#\n",
- "print \"The efficiency of the cycle is %.2f\\n\"%(eta)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.15 Page: 61"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.15 - Page: 61\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 2.15 on page 61 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.15 - Page: 61\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 2.15 on page number 61 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 2.15 on page 61 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.16 Page: 62"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.16 - Page: 62\n",
- "\n",
- "\n",
- "First Process\n",
- "\n",
- "Change in Internal Energy is -2223.97 kJ\n",
- "\n",
- "Change in Enthalpy is -5612.22 kJ\n",
- "\n",
- "Heat Requirement is -2246.40 kJ\n",
- "\n",
- "\n",
- "\n",
- "Second Process\n",
- "\n",
- "Change in Internal Energy is -22441.57 kJ\n",
- "\n",
- "Change in Enthalpy is -56122.20 kJ\n",
- "\n",
- "Heat Requirement is -22464.00 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.16 - Page: 62\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "P1 = 1## [bar]\n",
- "T1 = 300##[K]\n",
- "V1 = 24.92## [cubic m/kmol]\n",
- "P2 = 10## [bar]\n",
- "T2 = 300## [K]\n",
- "Cp = 29.10## [kJ/kmol K]\n",
- "Cv = 20.78## [kJ/kmol K]\n",
- "R = 8.314## [J/mol K]\n",
- "#**************#\n",
- "\n",
- "# Basis: 1 kmol of ideal gas:\n",
- "n = 1#\n",
- "V2 = P1*V1/P2## [cubic m]\n",
- "\n",
- "# First Process:\n",
- "print \"First Process\\n\"\n",
- "# In the first step of the first process, the cooling of ga takes place at constant pressure.\n",
- "# Here the volume is reduced appreciably and consequently the temperature decreases.\n",
- "T_prime = T1*V2/V1## [K]\n",
- "# Heat Requirement:\n",
- "Q1 = n*Cp*(T_prime - T1)## [kJ]\n",
- "deltaH1 = Q1## [kJ]\n",
- "deltaU1 = deltaH1 - P1*(V2 - V1)## [kJ]\n",
- "# In the second step, the gas is heated at constant Volume:\n",
- "# V = constant\n",
- "Q2 = n*Cv*(T2 - T_prime)## [kJ]\n",
- "deltaU2 = Q2## [kJ]\n",
- "deltaH2 = n*R*(T2 - T_prime)## [kJ]\n",
- "deltaU = deltaU1 + deltaU2## [kJ]\n",
- "deltaH = deltaH1 + deltaH2## [kJ]\n",
- "Q = Q1 + Q2## [kJ]\n",
- "print \"Change in Internal Energy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Change in Enthalpy is %.2f kJ\\n\"%(deltaH)#\n",
- "print \"Heat Requirement is %.2f kJ\\n\"%(Q)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Second Process:\n",
- "print \"Second Process\\n\"\n",
- "# In the first step of the second process, the gas is heated at constant volume.\n",
- "T_prime = T1*P2/P1## [K]\n",
- "# Heat Requirement:\n",
- "Q1 = n*Cv*(T_prime - T1)## [kJ]\n",
- "deltaU1 = Q1## [kJ]\n",
- "deltaH1 = n*R*(T_prime - T1)## [kJ]\n",
- "# In the second step, the gas is cooled at constant presure:\n",
- "# V = constant\n",
- "Q2 = n*Cp*(T2 - T_prime)## [kJ]\n",
- "deltaH2 = Q2## [kJ]\n",
- "deltaU2 = deltaH2 - P1*(V2 - V1)## [kJ]\n",
- "deltaU = deltaU1 + deltaU2## [kJ]\n",
- "deltaH = deltaH1 + deltaH2## [kJ]\n",
- "Q = Q1 + Q2## [kJ]\n",
- "print \"Change in Internal Energy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Change in Enthalpy is %.2f kJ\\n\"%(deltaH)#\n",
- "print \"Heat Requirement is %.2f kJ\\n\"%(Q)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.17 Page: 62"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.17 - Page: 64\n",
- "\n",
- "\n",
- "Workdone by the gas is 251.33 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "print \"Example: 2.17 - Page: 64\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "D1 = 1## [m]\n",
- "P1 = 120## [kPa]\n",
- "P2 = 360## [kPa]\n",
- "# P = k*D**3\n",
- "#***************#\n",
- "\n",
- "k = P1/D1**3## [proportionality constant]\n",
- "D2 = (P2/k)**(1/3)## [m]\n",
- "# Work done by the gas inside the balloon can be estimated as:\n",
- "# W = integral(P*dV)#\n",
- "# W = integral((k*D**3)*d((4/3)*pi*r**3)#\n",
- "# W = (pi*k/6)*integral((D**3)*d(D**3))#\n",
- "# W = (pi*k/12)*(D2**6 - D1**6)#\n",
- "W = (pi*k/12)*(D2**6 - D1**6)## [kJ]\n",
- "print \"Workdone by the gas is %.2f kJ\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.18 Page: 65"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.18 - Page: 65\n",
- "\n",
- "\n",
- "Change in Inernal Enrgy is 1040.65 kJ\n",
- "\n",
- "Change in Enthalpy is 1456.35 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.18 - Page: 65\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "P1 = 10*100## [kPa]\n",
- "T1 = 250## [K]\n",
- "P2 = 1*100## [kPa]\n",
- "T2 = 300## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "Cv = 20.78## [kJ/kmol K]\n",
- "Cp = 29.10## [kJ/kmol K]\n",
- "#**********#\n",
- "\n",
- "V1 = R*T1/P1## [cubic m]\n",
- "V2 = R*T2/P2## [cubic m]\n",
- "\n",
- "# Calculation based on First Process:\n",
- "# In this constant-volume process, the initial pressure of 10 bar is reduced to a final pressure of 1 bar and consequently the temperature decreases.\n",
- "T_prime = P2*V1/R## [K]\n",
- "deltaU1 = Cv*(T_prime - T1)## [kJ]\n",
- "deltaH1 = deltaU1 + V1*(P2 -P1)## [kJ]\n",
- "# Since V = constant\n",
- "W1 = 0##[kJ]\n",
- "# By first law of thermodynamics:\n",
- "Q = W1 + deltaU1## [kJ]\n",
- "\n",
- "# Calculation based on second process:\n",
- "# In this process, the gas is heated at constant pressure to the final temperature of T2.\n",
- "deltaH2 = Cp*(T2 - T_prime)## [kJ]\n",
- "deltaU2 = deltaH2 - P2*(V2 - V1)## [kJ]\n",
- "Q = deltaH2## [kJ]\n",
- "W2 = Q - deltaU2## [kJ]\n",
- "\n",
- "deltaU = deltaU1 + deltaU2## [kJ]\n",
- "deltaH = deltaH1 + deltaH2## [kJ]\n",
- "print \"Change in Inernal Enrgy is %.2f kJ\\n\"%(deltaU)#\n",
- "print \"Change in Enthalpy is %.2f kJ\\n\"%(deltaH)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 2.19 Page: 69"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 33,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 2.19 - Page: 69\n",
- "\n",
- "\n",
- "Tempertaure of water in the second tank is 312.86 K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 2.19 - Page: 69\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T1 = 273## [K]\n",
- "T2 = 273 + 67## [K]\n",
- "m_dot = 20000## [kg/h]\n",
- "Ws = -1.5## [hp]\n",
- "Q = -38000## [kJ/min]\n",
- "Z = 20## [m]\n",
- "Cp = 4.2## [kJ/kg K]\n",
- "g = 9.81## [m/second square]\n",
- "#***************#\n",
- "\n",
- "Q = Q*60/m_dot## [kJ/kg]\n",
- "Ws = Ws*0.7457*3600/m_dot## [kJ/kg]\n",
- "PE = g*Z*10**(-3)## [kJ/kg]\n",
- "# KE is assumed to be negligible.\n",
- "# For Steady Flow process: dE/dt = 0\n",
- "# From Eqn. 2.47:\n",
- "deltaH = Q - Ws - PE## [kJ/kg]\n",
- "H1 = Cp*(T2 - T1)## [kJ/kg]\n",
- "H2 = H1 + deltaH## [kJ/kg]\n",
- "\n",
- "# Now, the temperature of the tank can be determined as:\n",
- "T = (H2/Cp) + T1## [K]\n",
- "print \"Tempertaure of water in the second tank is %.2f K\\n\"%(T)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb
deleted file mode 100755
index ef7c1588..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb
+++ /dev/null
@@ -1,543 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 3 - Properties of pure substances"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.1 Page: 88"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.1 - Page: 88\n",
- "\n",
- "\n",
- "Molar Volume of the gas is 1.29e-02 cubic metres\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 3.1 - Page: 88\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "P = 2*10**5## [Pa]\n",
- "T = 273 + 37## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************\n",
- "# Since the gas behaves ideally:\n",
- "V = R*T/P## [cubic metres]\n",
- "print \"Molar Volume of the gas is %.2e cubic metres\"%(V)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.2 Page: 89"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.2 - Page: 89\n",
- "\n",
- "\n",
- "The pressure of air after compression is 1200 kPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 3.2 - Page: 89\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "V1 = 8## [cubic m]\n",
- "P1 = 300## [kPa]\n",
- "V2 = 2## [cubic m]\n",
- "#**************\n",
- "# Apptying the ideal gas Eqn. & since the Temperature remains constant:\n",
- "P2 = P1*V1/V2## [kPa]\n",
- "print \"The pressure of air after compression is %d kPa\\n\"%(P2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.3 Page: 89"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.3 - Page: 89\n",
- "\n",
- "\n",
- "The pressure of the remaining air is 400 kPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 3.3 - Page: 89\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "V1 = 6## [cubic m]\n",
- "P1 = 500## [kPa]\n",
- "R = 0.287## [kJ/kg K]\n",
- "#*************\n",
- "# Applying the charectarstic equation to the gas initially:\n",
- "# P1*V1 = m1*R*T1.......................................(i)\n",
- "# Applying the charectarstic equation to the gas which was left in the vessel after one-fifth of the gas has been removed:\n",
- "# P2*V2 = m2*R*T2.......................................(ii)\n",
- "# V2 = V1# T2 = T1# m2 = (4/5)*m1# Eqn (ii) becomes:\n",
- "# P2*V1 = (4/5)*m1*R*T1..................................(iii)\n",
- "# Dividing eqn (i) by eqn (iii), we get:\n",
- "P2 = (4/5)*P1## [kPa]\n",
- "print \"The pressure of the remaining air is %d kPa\\n\"%(P2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.4 Page: 90"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.4 - Page: 90\n",
- "\n",
- "\n",
- "Final Temperature of the air when the piston reaches stop is 361.5 K\n",
- "\n",
- "Pressure of air inside the cylinder is 2.51 bar\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 3.4 - Page: 90\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "T1 = 450 + 273## [K]\n",
- "P1 = 3## [bar]\n",
- "#***************\n",
- "# Soluton(a)\n",
- "# From Fig. 3.7, (Page 90)\n",
- "# Since the weight remains the same, therefore, the final pressure is equal to the initial pressure.\n",
- "# Therefore it is a constant pressure process.\n",
- "P2 = P1## [bar]\n",
- "# Volumetric Ratio:\n",
- "V2_by_V1 = 2.5/(2.5 + 2.5)# Applying ideal gas law & P1 = P2\n",
- "T2 = T1*V2_by_V1## [K]\n",
- "print \"Final Temperature of the air when the piston reaches stop is %.1f K\\n\"%(T2)\n",
- "# Solution (b)\n",
- "# When the piston rests ot the stops, the pressure exerted by the weight, air & the atmosphere will be different. But there will beno further decrease in volume.\n",
- "# This is a constant volume process.\n",
- "T3 = 273 + 30## [K]\n",
- "# Applying ideal gas law & V2 = V3\n",
- "P3 = T3*P2/T2## [bar]\n",
- "print \"Pressure of air inside the cylinder is %.2f bar\\n\"%(P3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.5 Page: 95"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.5 - Page: 95\n",
- "\n",
- "\n",
- "The temperature at which ammonia exists in the cylinder is 321.5 K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 3.5 - Page: 95\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "m = 1.373## [kg]\n",
- "P = 1.95*10**(6)## [Pa]\n",
- "V = 0.1## [cubic m]\n",
- "a = 422.546*10**(-3)## [cubic m/square mol]\n",
- "b = 37*10**(-6)## [cubic m/mol]\n",
- "M = 17*10**(-3)## [kg/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************\n",
- "n = m/M## [moles]\n",
- "Vm = V/n## [molar volume, cubic m]\n",
- "# Applying Van der Waals equation of state:\n",
- "T = (P + (a/Vm**2))*((Vm - b)/R)## [K]\n",
- "print \"The temperature at which ammonia exists in the cylinder is %.1f K\\n\"%(T)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.6 Page: 96"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.6 - Page: 96\n",
- "\n",
- "\n",
- "Ideal Equation of State\n",
- "\n",
- "Molar Volume of the gas is 4.284e-03 cubic m/mol\n",
- "\n",
- "\n",
- "\n",
- "Van der Wall Equation of State\n",
- "\n",
- "Molar Volume of the gas is 4.292e-03 cubic m/mol\n",
- "\n",
- "\n",
- "\n",
- "Virial Equation of State\n",
- "\n",
- "Molar Volume of the gas is 7.000e+00 cubic m/mol\n",
- "\n",
- "\n",
- "\n",
- "Redlich Kwong Equation of State\n",
- "\n",
- "Molar Volume of the gas is 7.000e+00 cubic m/mol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from scipy.optimize import fsolve\n",
- "print \"Example: 3.6 - Page: 96\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "P = 15*10**5## [Pa]\n",
- "T = 773## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "#**************\n",
- "# Solution (a)\n",
- "print \"Ideal Equation of State\\n\"\n",
- "# Applying ideal Eqn. of State:\n",
- "Vm = R*T/P## [cubic m/mol]\n",
- "print \"Molar Volume of the gas is %.3e cubic m/mol\\n\"%(Vm)\n",
- "print \"\\n\"\n",
- "\n",
- "# Solution (b)\n",
- "print \"Van der Wall Equation of State\\n\"\n",
- "a = 0.2303## [Nm**4/square mol]\n",
- "b = 4.3073*10**(-5)## [cubic m/mol]\n",
- "#deff('[y] = f1(Vm)','y = P - (R*T/(Vm-b)) + (a/Vm**2)')\n",
- "def f1(Vm):\n",
- " y = P - (R*T/(Vm-b)) + (a/Vm**2)\n",
- " return y\n",
- "Vm = fsolve(f1,Vm)## [cubic m/mol]\n",
- "print \"Molar Volume of the gas is %.3e cubic m/mol\\n\"%(Vm)\n",
- "print \"\\n\"\n",
- "\n",
- "#Solution (c)\n",
- "print \"Virial Equation of State\\n\"\n",
- "# Z = 1 + B/V\n",
- "# (P*V/(R*T)) = (1 + B/V)\n",
- "# V**2 - V*R*T/P - B*R*T/P = 0\n",
- "B = 1.3697*10**(-5)## [cubic m/mol]\n",
- "#deff('[y] f2(Vm)','y = Vm**2 - (Vm*R*T/P) - (B*R*T/P)')\n",
- "def f2(vm):\n",
- " y = Vm**2 - (Vm*R*T/P) - (B*R*T/P)\n",
- " return y\n",
- "Vm = fsolve(f2,7)## [cubic m/mol]\n",
- "print \"Molar Volume of the gas is %.3e cubic m/mol\\n\"%(Vm)\n",
- "print \"\\n\"\n",
- "\n",
- "# Solution (d)\n",
- "print \"Redlich Kwong Equation of State\\n\"\n",
- "Tc = 190.6## [K]\n",
- "Pc = 45.99*10**5## [Pa]\n",
- "a = 0.4278*R**2*Tc**2.5/Pc## [N/m**4 square mol]\n",
- "b = 0.0867*R*Tc/Pc## [cubic m/mol]\n",
- "#deff('[y] = f3(Vm)','y = P - (R*T/(Vm - b)) + (a/((T**0.5)*Vm*(Vm+b)))')\n",
- "def f3(vm):\n",
- " y = P - (R*T/(Vm - b)) + (a/((T**0.5)*Vm*(Vm+b)))\n",
- " return y\n",
- "\n",
- "Vm = fsolve(f3,Vm)## [cubic m/mol]\n",
- "print \"Molar Volume of the gas is %.3e cubic m/mol\\n\"%(Vm)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.8 Page: 101"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.8 - Page: 101\n",
- "\n",
- "\n",
- "Ideal Equation of State\n",
- "\n",
- "Molar Volume of gas is 5.196e-04 cubic m/mol\n",
- "\n",
- "\n",
- "\n",
- "Virial Equation of State\n",
- "\n",
- "Molar Volume of gas is 5.20e-04 cubic m/mol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 3.8 - Page: 101\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "T = 500## [K]\n",
- "P = 8*10**6## [Pa]\n",
- "R = 8.314## [J/mol K]\n",
- "#*************\n",
- "# Solution (a)\n",
- "# By ideal gas equation of state:\n",
- "print \"Ideal Equation of State\\n\"\n",
- "Vm = R*T/P## [cubic m/mol]\n",
- "print \"Molar Volume of gas is %.3e cubic m/mol\\n\"%(Vm)\n",
- "print \"\\n\"\n",
- "\n",
- "# Solution (b)\n",
- "# By Virial Equation of State:\n",
- "print \"Virial Equation of State\\n\"\n",
- "B = -0.265*10**(-3)## [cubic m/mol]\n",
- "C = 0.3025*10**(-7)## [m**6/square mol]\n",
- "#deff('[y] = f(Vm)','y = (P*Vm/(R*T)) - 1 -(B/Vm) - (C/Vm**2)')\n",
- "def f(vm):\n",
- " y = (P*Vm/(R*T)) - 1 -(B/Vm) - (C/Vm**2)\n",
- " return y\n",
- "Vm = fsolve(f,Vm)\n",
- "print \"Molar Volume of gas is %.2e cubic m/mol\\n\"%(Vm)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.10 Page: 103"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.10 - Page: 103\n",
- "\n",
- "\n",
- "Value of derivative is 23.98 bar/OC\n",
- "\n",
- "The pressure generated by heating at constant Volume is 240.84 Pa\n",
- "\n",
- "The change in Volume is -0.038 cubic cm/g\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import exp\n",
- "print \"Example: 3.10 - Page: 103\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "beeta = 1.487*10**(-3)## [1/OC]\n",
- "alpha = 62*10**(-6)## [1/bar]\n",
- "V1 = 1.287## [cubic cm /g]\n",
- "#************\n",
- "# Solution (a)\n",
- "# The value of derivative (dP/dT) at constant V:\n",
- "# dV/V = beeta*dT - alpha*dP\n",
- "# dV = 0\n",
- "# dP/dT = beeta/alpha\n",
- "# Value = dP/dT\n",
- "Value = beeta/alpha## [bar/OC]\n",
- "print \"Value of derivative is %.2f bar/OC\\n\"%(Value)\n",
- "# Solution (b)\n",
- "P1 = 1## [bar]\n",
- "T1 = 20## [OC]\n",
- "T2 = 30## [OC]\n",
- "# Applying the same equation:\n",
- "P2 = P1 +(beeta/alpha)*(T2 - T1)## [bar]\n",
- "print \"The pressure generated by heating at constant Volume is %.2f Pa\\n\"%(P2)\n",
- "# Solution (c)\n",
- "T2 = 0## [OC]\n",
- "T1 = 20## [OC]\n",
- "P2 = 10## [bar]\n",
- "P1 = 1## [bar]\n",
- "# The change in Volume can be obtained as:\n",
- "V2 = V1*exp((beeta*(T2 - T1)) - alpha*(P2 - P1))## [cubic cm/g]\n",
- "deltaV = V2 - V1## [cubic cm/g]\n",
- "print \"The change in Volume is %.3f cubic cm/g\\n\"%(deltaV)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 3.11 Page: 107"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 3.11 - Page: 107\n",
- "\n",
- "\n",
- "Acentric factor is 0.6447\n"
- ]
- }
- ],
- "source": [
- "from math import log10\n",
- "print \"Example: 3.11 - Page: 107\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****\n",
- "Tc = 513.9## [K]\n",
- "Pc = 61.48*10**5## [Pa]\n",
- "#************\n",
- "Tr = 0.7\n",
- "T = Tr*Tc - 273.15## [OC]\n",
- "P_sat = 10**(8.112 - (1592.864/(T + 226.184)))## [mm Hg]\n",
- "P_sat = P_sat*101325/760## [Pa]\n",
- "Pr_sat = P_sat/Pc## [Pa]\n",
- "omega = -1 - log10(Pr_sat)## [Acentric factor]\n",
- "print \"Acentric factor is %.4f\"%(omega)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
deleted file mode 100755
index c3a0a66f..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb
+++ /dev/null
@@ -1,557 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 4 - Heat effects"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.1 Page: 118"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.1 - Page: 118\n",
- "\n",
- "\n",
- "Value of Qv is -326.40 kcal\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 4.1 - Page: 118\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Qp = -327## [kcal]\n",
- "T = 27 + 273## [K]\n",
- "R = 2*10**(-3)## [kcal/K mol]\n",
- "#*************#\n",
- "\n",
- "# The reaction involved is:\n",
- "# C2H5OH(l) + 3O2(g) = 2CO2(g) + 3H2O(l)\n",
- "deltan = 2 - 3#\n",
- "Qv = Qp - deltan*R*T## [kcal]\n",
- "print \"Value of Qv is %.2f kcal\\n\"%(Qv)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.2 Page: 119"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.2 - Page: 119\n",
- "\n",
- "\n",
- "Heat produced in the reaction is -1019.9 kcal\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.2 - Page: 119\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# Mg + (1/2)O2 = MgO ...............(1)\n",
- "deltaH1 = -610.01## [kcal]\n",
- "# 2Fe + (3/2)O2 = Fe2O3 ............(2)\n",
- "deltaH2 = -810.14## [kcal]\n",
- "#*************#\n",
- "\n",
- "# 3Mg + Fe2O3 = 3MgO + 2Fe .........(3)\n",
- "# Multiplying (1) by 3 and substracting from (2), we get (3):\n",
- "deltaH = 3*deltaH1 - deltaH2## [kcal]\n",
- "print \"Heat produced in the reaction is %.1f kcal\\n\"%(deltaH)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.3 Page: 121"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.3 - Page: 121\n",
- "\n",
- "\n",
- "The standard heat of formation of methane is -74.75 kJ/gmol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.3 - Page: 121\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# 2H2(g) + O2(g) ---------------> 2H2O .....................(1)\n",
- "deltaH1 = -241.8*2## [kJ/gmol H2]\n",
- "# C(graphite) + O2(g) =---------> CO2(g) ...................(2)\n",
- "deltaH2 = -393.51## [kJ/gmol C]\n",
- "# CH4(g) + 2O2(g) ---------------> CO2(g) + 2H2O(l) ........(3)\n",
- "deltaH3 = -802.36## [kJ/mol CH4]\n",
- "#*************#\n",
- "\n",
- "# For standard heat of formation of methane, (a) + (b) - (c)\n",
- "# C + 2H2 ------------------------> CH4\n",
- "deltaHf = deltaH1 + deltaH2 - deltaH3## [kJ/gmol]\n",
- "print \"The standard heat of formation of methane is %.2f kJ/gmol\\n\"%(deltaHf)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.4 Page: 122"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.4 - Page: 122\n",
- "\n",
- "\n",
- "Energy supplied by reaction A is -69.2 kJ\n",
- "\n",
- "Energy supplied by reaction B is -2802.8 kJ\n",
- "\n",
- "Reaction B supplies more energy to the organism\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.4 - Page: 122\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "deltaH_C6H12O6 = -1273## [kcal]\n",
- "deltaH_C2H5OH = -277.6## [kcal]\n",
- "deltaH_CO2 = -393.5## [kcal]\n",
- "deltaH_H2O = -285.8## [kcal]\n",
- "#**************#\n",
- "\n",
- "# C6H12O6(s) = 2C2H5OH(l) + 2CO2(g) ..........................(A)\n",
- "deltaH_A = 2*deltaH_C2H5OH + 2*deltaH_CO2 - deltaH_C6H12O6## [kJ]\n",
- "# C6H12O6(s) + 6O2(g) = 6CO2(g) + 6H2O(l) ...................(B)\n",
- "deltaH_B = 6*deltaH_CO2 + 6*deltaH_H2O - deltaH_C6H12O6## [kJ]\n",
- "print \"Energy supplied by reaction A is %.1f kJ\\n\"%(deltaH_A)#\n",
- "print \"Energy supplied by reaction B is %.1f kJ\\n\"%(deltaH_B)#\n",
- "if deltaH_A < deltaH_B:\n",
- " print \"Reaction A supplies more energy to the organism\\n\"\n",
- "else:\n",
- " print \"Reaction B supplies more energy to the organism\\n\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.5 Page: 122"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.5 - Page: 122\n",
- "\n",
- "\n",
- "Heat of formation of ZnSO4 is -233.48 kcal/kmol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.5 - Page: 122\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# Zn + S = ZnS ....................................................(A)\n",
- "deltaH_A = -44## [kcal/kmol]\n",
- "# ZnS + 3O2 = 2ZnO + 2SO2 .........................................(B)\n",
- "deltaH_B = -221.88## [kcal/kmol]\n",
- "# 2SO2 + O2 = 2SO3 ................................................(C)\n",
- "deltaH_C = -46.88## [kcal/kmol]\n",
- "# ZnO + SO3 = ZnSO4 ...............................................(D)\n",
- "deltaH_D = -55.10## [kcal/kmol]\n",
- "#***************#\n",
- "\n",
- "# Multiplying (A) by 2 & (D) by (2) and adding (A), (B), (C) & (D)\n",
- "# Zn + S + 2O2 = ZnSO4\n",
- "deltaH = 2*deltaH_A + deltaH_B + deltaH_C + 2*deltaH_D## [kcal/kmol for 2 kmol of ZnSO4]\n",
- "print \"Heat of formation of ZnSO4 is %.2f kcal/kmol\\n\"%(deltaH/2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.6 Page: 124"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.6 - Page: 124\n",
- "\n",
- "\n",
- "Standard Heat of formation of NH3 is -11.8 kcal\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.6 - Page: 124\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# HC : Heat of Combustion\n",
- "HC_NH3 = -90.6## [kcal]\n",
- "HC_H2 = -68.3## [kcal]\n",
- "#*************#\n",
- "\n",
- "# Heat of combustion of NH3:\n",
- "# 2NH3 + 3O = N2 + 3H2O ............................ (A)\n",
- "# Heat of combustion of H2:\n",
- "# H2 + O = H2O ..................................... (B)\n",
- "# Multiplying (B) by 3 & substracting from (A), we get:\n",
- "# 2NH3 = N2 + 3H2 .................................. (C)\n",
- "# Hf : Heat of Formation\n",
- "Hf_NH3 = -(2*HC_NH3 - 3*HC_H2)/2## [kcal]\n",
- "print \"Standard Heat of formation of NH3 is %.1f kcal\"%(Hf_NH3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.7 Page: 125"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.7 - Page: 125\n",
- "\n",
- "\n",
- "The maximum attainable temperature is 2566.2 K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.7 - Page: 125\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "# HC : Heat of Combustion\n",
- "HC_C2H2 = -310600# # [cal]\n",
- "#**************#\n",
- "\n",
- "# C2H2 + (5/2)O2 = 2CO2 + H2O\n",
- "Q = -HC_C2H2## [cal]\n",
- "# The gases present in the flame zone after combustion are carbon dioxide, water vapor and the unreacted nitrogen of the air.\n",
- "# Since (5/2) mole of oxygen were required for combustion, nitrogen required would be 10 mol.\n",
- "# Hence the composition of the resultant gas would be 2 mol CO2, 1 ol H2 & 10 mol N2.\n",
- "# Q = integrate('Cp(T)','T',T,298)#\n",
- "# On integrating we get:\n",
- "# Q = 84.52*(T - 298) + 18.3*10**(-3)*(T**2 - 298**2)\n",
- "#deff('[y] = f(T)','y = Q - 84.52*(T - 298) - 18.3*10**(-3)*(T**2 - 298**2)')#\n",
- "def f(T):\n",
- " y = Q - 84.52*(T - 298) - 18.3*10**(-3)*(T**2 - 298**2)\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "T = fsolve(f,7)## [K]\n",
- "print \"The maximum attainable temperature is %.1f K\"%(T)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.8 Page: 126"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.8 - Page: 126\n",
- "\n",
- "\n",
- "The theoretical temperature of combustion is 1906 degree Celsius\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.8 - Page: 126\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Cp_CO2 = 54.56## [kJ/mol K]\n",
- "Cp_O2 = 35.20## [kJ/mol K]\n",
- "Cp_steam = 43.38## [kJ/mol K]\n",
- "Cp_N2 = 33.32## [kJ/mol K]\n",
- "# 2C2H6(g) + 7O2(g) = 4CO2(g) + 6H2O(g)\n",
- "deltaH_273 = -1560000## [kJ/kmol]\n",
- "#************#\n",
- "\n",
- "# Since the air is 25% in excess of the amount required,the combustion may be written as:\n",
- "# C2H6(g) + (7/2)O2(g) = 2CO2(g) + 3H2O(g)\n",
- "# 25% excess air is supplied.\n",
- "# Since the air contains N2 = 79% and O2 = 21%\n",
- "# C2H6(g) + 3.5O2(g) + 0.25*3.5O2(g) + (4.375*(79/21))N2 = 2CO2 + 3H2O + 0.875O2 + 16.46N2 .................. (A)\n",
- "# Considering the reaction (A),\n",
- "# Amount of O2:\n",
- "O2 = 3.5 + 3.5*0.25## [mol]\n",
- "# Amount of N2 required:\n",
- "N2 = 4.375*(79/21)## [mol]\n",
- "# Let the initial temperature of ethane and air be 0 OC and the temperature of products of combustion be T OC\n",
- "# Since heat librated by combustion = heat accumulated by combustion products\n",
- "Q = -deltaH_273## [kJ/mol K]\n",
- "T = Q/(2*Cp_CO2 + 3*Cp_steam + 0.875*Cp_O2 + N2*Cp_N2)## [OC]\n",
- "print \"The theoretical temperature of combustion is %d degree Celsius\"%(T)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.9 Page: 129"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.9 - Page: 129\n",
- "\n",
- "\n",
- "Laten heat of ice at -20 OC is 1266 cal/mol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.9 - Page: 129\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T1 = 273## [K]\n",
- "T2 = 253## [K]\n",
- "deltaH_273 = 1440## [cal/mol]\n",
- "Cp = 8.7## [cal/mol]\n",
- "#**************#\n",
- "\n",
- "deltaH_253 = deltaH_273 + Cp*(T2 - T1)## [cal/mol]\n",
- "print \"Laten heat of ice at -20 OC is %d cal/mol\\n\"%(deltaH_253)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.10 Page: 129"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.10 - Page: 129\n",
- "\n",
- "\n",
- "Heat of formation at 1273 K is -11172 cal\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.10 - Page: 129\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T2 = 1273## [K]\n",
- "T1 = 300## [K]\n",
- "deltaH_300 = -11030## [cal/mol]\n",
- "#*************#\n",
- "\n",
- "# The chemical reaction involved is:\n",
- "# N2 + 3H2 = 2NH3\n",
- "# (1/2)N2 + (3/2)H2 = NH3\n",
- "# deltaH_1273 = deltaH_300 + integrate('Cp_NH3(T) - (1/2)*Cp_N2(T) - (1/2)*Cp_H2(T)','T',1273,300)#\n",
- "from sympy.mpmath import quad\n",
- "deltaH_1273 = deltaH_300 + quad(lambda T:(6.2 + 7.8*10**(-3)*T - 7.2*10**(-6)*T**2) - (1/2)*(6.45 + 1.4*10**(-3)*T) - (1/2)*(6.94 - 0.2*10**(-3)*T),[1273,300])## [cal]\n",
- "print \"Heat of formation at 1273 K is %d cal\"%(deltaH_1273)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 4.11 Page: 130"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 4.11 - Page: 130\n",
- "\n",
- "\n",
- "Percent of excess air supplied is 39.9 %\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 4.11 - Page: 130\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "CO2 = 13.4## [percent by volume]\n",
- "N2 = 80.5## [percent by volume]\n",
- "O2 = 6.1## [percent by volume]\n",
- "#*************#\n",
- "\n",
- "# Basis : 100 cubic m of flue gas.\n",
- "Vol_N2_flue = N2## [Volume of Nitrogen in flue gas, cubic m]\n",
- "Vol_O2_flue = O2## [Volume of O2 in flue gas, cubic m]\n",
- "Vol_Air = N2/0.79## [Volume of air supplied, cubic m]\n",
- "Vol_O2 = Vol_Air*0.21## [Volume of O2 in air supply, cubic m]\n",
- "Vol_O2_cumbustion = Vol_O2 - Vol_O2_flue## [Volume of O2 used up in cumbustion of the fuel, cubic m]\n",
- "Excess_Air = Vol_O2_flue/Vol_O2_cumbustion * 100## [percent of excess air supplied]\n",
- "print \"Percent of excess air supplied is %.1f %%\"%(Excess_Air)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb
deleted file mode 100755
index 0aec293d..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb
+++ /dev/null
@@ -1,1241 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 5 - Second law of themodynamics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.1 Page: 150"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.1 - Page: 150\n",
- "\n",
- "\n",
- "The theoretical efficiency of heat engine is 63.5 %\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 5.1 - Page: 150\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Th = 550 + 273## [K]\n",
- "Tl = 27 + 273## [K]\n",
- "#************#\n",
- "\n",
- "# The theoretical efficiency of a heat engine is given by:\n",
- "# eta = Net Work Output/Net Work Input\n",
- "# eta = Wnet/Qin\n",
- "# eta = (Qin - Qout)/Qin = (Th - Tl)/Th\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"The theoretical efficiency of heat engine is %.1f %%\"%(eta * 100)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.2 Page: 150"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.2 - Page: 150\n",
- "\n",
- "\n",
- "(a) The efficiency of the heat engine is 63.0 %\n",
- "\n",
- "(b) The efficiency of the heat engine is 78.0 %\n",
- "\n",
- "(c) The efficiency of the heat engine is 57.5 %\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.2 - Page: 150\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Th = 810## [K]\n",
- "Tl = 300## [K]\n",
- "#*************#\n",
- "\n",
- "# Solution (a)\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"(a) The efficiency of the heat engine is %.1f %%\\n\"%(eta*100)#\n",
- "\n",
- "# Solution (b)\n",
- "Th = 1366## [K]\n",
- "Tl = 300## [K]\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"(b) The efficiency of the heat engine is %.1f %%\\n\"%(eta*100)#\n",
- "\n",
- "# Solution (c)\n",
- "Th = 810## [K]\n",
- "Tl = 344## [K]\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"(c) The efficiency of the heat engine is %.1f %%\\n\"%(eta*100)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.3 Page: 151"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.3 - Page: 151\n",
- "\n",
- "\n",
- "(a) The efficiency of the Carnot engine is 67.2 %\n",
- "\n",
- "(b) Heat released to cold reservoir is 192 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.3 - Page: 151\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Th = 650 + 273## [K]\n",
- "Tl = 30 + 273## [K]\n",
- "Qh = 585## [kJ/cycle]\n",
- "#*************#\n",
- "\n",
- "# Solution (a)\n",
- "# From Eqn. (5.9)\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"(a) The efficiency of the Carnot engine is %.1f %%\\n\"%(eta*100)#\n",
- "\n",
- "# Soluton (b)\n",
- "# From the knowledge of the ratio of heat and temperature between the two regions:\n",
- "Ql = Qh*Tl/Th## [kJ]\n",
- "print \"(b) Heat released to cold reservoir is %d kJ\\n\"%(Ql)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.4 Page: 151"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.4 - Page: 151\n",
- "\n",
- "\n",
- "Minimum Work requirement is 27 kJ\n",
- "\n",
- "Amount of heat released to the surrounding is 362 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.4 - Page: 151\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 1## [kg]\n",
- "Tl = 273## [K]\n",
- "Th = 295## [K]\n",
- "Ql = 335## [kJ/kg]\n",
- "#*************#\n",
- "\n",
- "# Solution (a)\n",
- "# The coeffecient of performance of refrigerating machine is:\n",
- "# COP = Ql/Wnet = Tl/(Th - Tl)\n",
- "Wnet = Ql*(Th - Tl)/Tl## [kJ]\n",
- "print \"Minimum Work requirement is %d kJ\\n\"%(round(Wnet))#\n",
- "\n",
- "# Solution (b)\n",
- "# Amount of heat released:\n",
- "# Wnet = Qh - Ql\n",
- "Qh = Wnet + Ql## [kJ]\n",
- "print \"Amount of heat released to the surrounding is %d kJ\\n\"%(round(Qh))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.5 Page: 152"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.5 - Page: 152\n",
- "\n",
- "\n",
- "Minimum Work Required is 13.1 kJ\n",
- "\n",
- "The efficiency of Heat Engine is 0.263\n",
- "\n",
- "Amount of Heat released is 36.9 kJ\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.5 - Page: 152\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Th = 373## [K]\n",
- "Tl = 275## [K]\n",
- "Qh = 50## [kJ]\n",
- "#*************#\n",
- "\n",
- "# Solution (a)\n",
- "# Theral Efficiency of the engine can be given as:\n",
- "# eta_HE = Wnet/Qh#\n",
- "# Wnet = Qh*COP = Qh*(Th - Tl)/Th#\n",
- "Wnet = Qh*(Th - Tl)/Th## [kJ]\n",
- "print \"Minimum Work Required is %.1f kJ\\n\"%(Wnet)#\n",
- "\n",
- "# Solution (b)\n",
- "eta = (Th - Tl)/Th#\n",
- "print \"The efficiency of Heat Engine is %.3f\\n\"%(eta)#\n",
- "\n",
- "# Solution (c)\n",
- "# Amount of heat released can be calculated as:\n",
- "# eta = Net Work Output/Net Work Input#\n",
- "# eta = Wnet/Qin#\n",
- "# eta = (Qin - Qout)/Qin#\n",
- "Qin = Qh## [kJ]\n",
- "Qout = Qin*(1 - eta)#\n",
- "print \"Amount of Heat released is %.1f kJ\\n\"%(Qout)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.6 Page: 153"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.6 - Page: 153\n",
- "\n",
- "\n",
- "Claim is not Valid\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.6 - Page: 153\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "W = 5## [hp]\n",
- "Q = 7000## [J/s]\n",
- "Th = 400 + 273## [K]\n",
- "Tl = 24 + 273## [K]\n",
- "#*************#\n",
- "\n",
- "W = 5*745.7## [W]\n",
- "thermal_eta = W/Q#\n",
- "theoretical_eta = (Th - Tl)/Th#\n",
- "\n",
- "if theoretical_eta <= thermal_eta:\n",
- " print \"Claim is Valid\"\n",
- "else:\n",
- " print \"Claim is not Valid\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.7 Page: 162"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.7 - Page: 162\n",
- "\n",
- "\n",
- "Change in Entropy is 23.81 J/mol K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.7 - Page: 162\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 1## [mol]\n",
- "deltaH_fusion = 6500## [J/mol]\n",
- "T_Tr = 273## [transition temperature, K]\n",
- "P = 1## [atm]\n",
- "#************#\n",
- "\n",
- "# By Eqn. (9.40)\n",
- "deltaS_fusion = deltaH_fusion/T_Tr## [J/mol K]\n",
- "print \"Change in Entropy is %.2f J/mol K\"%(deltaS_fusion)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.8 Page: 164"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.8 - Page: 164\n",
- "\n",
- "\n",
- "Change in Entropy is 22.876 eu\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 5.8 - Page: 164\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "V1 = 5## [L]\n",
- "V2 = 50## [L]\n",
- "n = 5## [moles]\n",
- "R = 1.987## [cal/mol K]\n",
- "#**************#\n",
- "\n",
- "# Change in entropy for an isothermal change for an ideal gas:\n",
- "# deltaS = n*R*log(P1/P2) = n*R*log(V2/V1)\n",
- "deltaS = n*R*log(V2/V1)## [cal/degree]\n",
- "print \"Change in Entropy is %.3f eu\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.9 Page: 164"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.9 - Page: 164\n",
- "\n",
- "\n",
- "deltaS is 115.26 J/K\n",
- "Change in Entropy is 115.257 eu\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.9 - Page: 164\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 8## [mol]\n",
- "R = 8.314## [J/mol K]\n",
- "T2 = 700## [K]\n",
- "T1 = 350## [K]\n",
- "Cp = (5/2)*R## [J/mol K]\n",
- "#*************#\n",
- "\n",
- "deltaS = n*Cp*log(T2/T1)## [J/K]\n",
- "print \"deltaS is %.2f J/K\"%(deltaS)#\n",
- "\n",
- "R*log(V2/V1)#// [cal/degree]\n",
- "print \"Change in Entropy is %.3f eu\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.10 Page: 164"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.10 - Page: 164\n",
- "\n",
- "\n",
- "Change in Entropy is -19.179548 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.10 - Page: 164\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "n = 5## [moles]\n",
- "T1 = 300## [K]\n",
- "T2 = 400## [K]\n",
- "P1 = 3## [bars]\n",
- "P2 = 12## [bars]\n",
- "Cp = 26.73## [J/mol K]\n",
- "R = 8.314## [K/mol K]\n",
- "#*************#\n",
- "\n",
- "deltaS = n*((Cp*log(T2/T1)) + (R*log(P1/P2)))## [kJ/K]\n",
- "print \"Change in Entropy is %f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.11 Page: 166"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.11 - Page: 166\n",
- "\n",
- "\n",
- "Entropy Change is 4.27 kJ/kmol K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.11 - Page: 166\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "N = 1## [kmol]\n",
- "xA = 0.21## [for Oxygen]\n",
- "xB = 0.79## [for Nitrogen]\n",
- "R = 8.314## [kJ/kmol K]\n",
- "#*************#\n",
- "\n",
- "deltaS = - (N*R*(xA*log(xA) + xB*log(xB)))## [kJ/mol K]\n",
- "print \"Entropy Change is %.2f kJ/kmol K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.12 Page: 167"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.12 - Page: 167\n",
- "\n",
- "\n",
- "Change in Entropy is 1.117 cal/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.12 - Page: 167\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Vol_O2 = 5.6## [L]\n",
- "Vol_H2 = 16.8## [L]\n",
- "R = 1.987## [cal/mol K]\n",
- "#*************#\n",
- "\n",
- "xA = Vol_O2/22.4## [mole fraction O2]\n",
- "xB = Vol_H2/22.4## [mle fraaction H2]\n",
- "N = xA + xB## [total number of moles]\n",
- "# From Eqn. 5.21:\n",
- "deltaS = - (N*R*(xA*log(xA) + xB*log(xB)))## [cal/K]\n",
- "print \"Change in Entropy is %.3f cal/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.13 Page: 168"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.13 - Page: 168\n",
- "\n",
- "\n",
- "Entropy Change is 0.319 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.13 - Page: 168\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 80## [mass of Argon, g]\n",
- "T1 = 300## [K]\n",
- "T2 = 500## [K]\n",
- "Cv = 0.3122## [kJ/kg K]\n",
- "#**************#\n",
- "\n",
- "Mw = 40## [Molecular Weight of Argon]\n",
- "n = m/Mw## [moles]\n",
- "deltaS = n*Cv*log(T2/T1)## [kJ/K]\n",
- "print \"Entropy Change is %.3f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.14 Page: 168"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.14 - Page: 168\n",
- "\n",
- "\n",
- "The upper temperature of the process is 864.929 K\n"
- ]
- }
- ],
- "source": [
- "from math import exp\n",
- "print \"Example: 5.14 - Page: 168\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "deltaS = 1## [kJ/kg K]\n",
- "Cv = 0.918## [kJ/kg K]\n",
- "T1 = 273 + 18## [K]\n",
- "#*************#\n",
- "\n",
- "# Let the upper temperature be T.\n",
- "# deltaS = integrate('Cv/T','T',T1,T)# \n",
- "# deltaS = Cv*log(T/T1)\n",
- "T = T1*exp(deltaS/Cv)## [K]\n",
- "print \"The upper temperature of the process is %.3f K\"%(T)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.15 Page: 169"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.15 - Page: 169\n",
- "\n",
- "\n",
- "Change in Entropy is -5.450 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.15 - Page: 169\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m1 = 5## [kg]\n",
- "m2 = 20## [kg]\n",
- "C = 4.2## [kJ/kg K]\n",
- "T1 = 350## [K]\n",
- "T2 = 250## [K]\n",
- "#**************#\n",
- "\n",
- "# Suppose the final temperature is T\n",
- "#deff('[y] = f(T)','y = m1*C*(T1 - T) - m2*C*(T - T2)')#\n",
- "def f(T):\n",
- " y = m1*C*(T1 - T) - m2*C*(T - T2)\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "T = fsolve(f, 7)[0]## [K]\n",
- "# Change in entropy of Hot Water:\n",
- "from sympy.mpmath import quad\n",
- "deltaS1 = m1*C*quad(lambda T:(1/T),[T1,T])## [kJ/K]\n",
- "# Change in Entopy of Hot Water:\n",
- "deltaS2 = m2*C*quad('(1/T)','T',T2,T)## [kJ/K]\n",
- "deltaS = deltaS1 + deltaS2## [kJ/K]\n",
- "print \"Change in Entropy is %.3f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.16 Page: 169"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.16 - Page: 169\n",
- "\n",
- "\n",
- "Change in Entropy is 0.540 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.16 - Page: 169\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m = 12## [g]\n",
- "T1 = 294## [K]\n",
- "T2 = 574## [K]\n",
- "T = 505## [melting point, K]\n",
- "H_fusion = 4.5## [cal/K]\n",
- "C_solid = 0.052## [cal/g K]\n",
- "C_liquid = 0.062## [cal/g K]\n",
- "#*************#\n",
- "\n",
- "# Entropy Change in heating 12 g of metal from T1 to T\n",
- "deltaS1 = m*C_solid*quad(lambda T:(1/T),[T1,T])## [kJ/K]\n",
- "# Entropy Change in fusion of metal:\n",
- "deltaS2 = m*H_fusion/T## [kJ/K]\n",
- "# Entropy Change in heating liquid metal from 505 K to 574 K\n",
- "deltaS3 = m*C_liquid*quad(lambda T:(1/T),[T,T2])## [kJ/K]\n",
- "deltaS = deltaS1 + deltaS2 + deltaS3## [kJ/K]\n",
- "print \"Change in Entropy is %.3f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.17 Page: 170"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.17 - Page: 170\n",
- "\n",
- "\n",
- "Change in Entropy is 9.165 cal/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.17 - Page: 170\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "#deff('[y] = Cp(T)','y = 7.25 + 2.28*10**(-3)*T')#\n",
- "def Cp(T):\n",
- " y = (7.25 + 2.28*10**(-3)*T)/T\n",
- " return y\n",
- "T1 = 273 + 137## [K]\n",
- "T2 = 273 + 877## [K]\n",
- "#************#\n",
- "\n",
- "deltaS = quad(Cp,[T1,T2])## [cal/K]\n",
- "print \"Change in Entropy is %.3f cal/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.18 Page: 170"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.18 - Page: 170\n",
- "\n",
- "\n",
- "Total Entropy Change is 7.68 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.18 - Page: 170\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "m_iron = 40## [kg]\n",
- "T1 = 625## [K]\n",
- "m_water = 160## [kg]\n",
- "T2 = 276## [K]\n",
- "C_iron = 0.45## [kJ/kg K]\n",
- "C_water = 4.185## [kJ/kg K]\n",
- "#**************#\n",
- "\n",
- "#deff('[y] = f(T)','y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)')#\n",
- "def f(T):\n",
- " y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)\n",
- " return y\n",
- "from scipy.optimize import fsolve\n",
- "T = fsolve(f, 7)## [K]\n",
- "# Change in Entropy of the iron casting can be estimated as:\n",
- "deltaS1 = m_iron*C_iron*log(T/T1)## [kJ/K]\n",
- "# Change in Entropy of Water is given by:\n",
- "deltaS2 = m_water*C_water*log(T/T2)## [kJ/K]\n",
- "deltaS = deltaS1 + deltaS2## [kJ/K]\n",
- "print \"Total Entropy Change is %.2f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.19 Page: 172"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 33,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.19 - Page: 172\n",
- "\n",
- "\n",
- "Entropy at 500 K is 160.73 J/kmol\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 5.19 - Page: 172\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "Cp = 21## [J/kmol]\n",
- "T1 = 300## [K]\n",
- "T2 = 500## [K]\n",
- "S1 = 150## [Entropy at T1, J/kmol]\n",
- "#*************#\n",
- "\n",
- "# This is a constant Entropy process. Therefore:\n",
- "deltaS = Cp*log(T2/T1)## [J/kmol]\n",
- "S2 = S1 + deltaS## [J/kmol]\n",
- "print \"Entropy at 500 K is %.2f J/kmol\"%(S2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.20 Page: 173"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 37,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.20 - Page: 173\n",
- "\n",
- "\n",
- "Total Entropy Change is 369.49 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.20 - Page: 173\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T1_oil = 273 + 150## [K]\n",
- "T2_oil = 50 +273## [K]\n",
- "m_water = 4000## [kg]\n",
- "T1_water = 273 + 20## [K]\n",
- "T2_water = 273 + 130## [K]\n",
- "C_water = 4.185## [kJ/kg K]\n",
- "C_oil = 2.5## [kJ/kg K]\n",
- "#***************#\n",
- "\n",
- "# For oil:\n",
- "deltaT_oil = T1_oil - T2_oil## [K]\n",
- "# For water:\n",
- "deltaT_water = T2_water - T1_water## [K]\n",
- "# The mass flow rate of oil can be measured by the enthalpy balance over the process:\n",
- "m_oil = m_water*C_water*deltaT_water/(deltaT_oil*C_oil)## [kg]\n",
- "# Change in the Entropy of oil:\n",
- "deltaS_oil = m_oil*C_oil*log(T2_oil/T1_oil)## [kJ/K]\n",
- "# Change in Entropy of water:\n",
- "deltaS_water = m_water*C_water*log(T2_water/T1_water)## [kJ/K]\n",
- "deltaS = deltaS_oil + deltaS_water## [kJ/K]\n",
- "print \"Total Entropy Change is %.2f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.21 Page: 174"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 38,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.21 - Page: 174\n",
- "\n",
- "\n",
- "Change in Entropy is 1.49 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.21 - Page: 174\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "t = 20*60## [s]\n",
- "P = 650## [W]\n",
- "T = 273 + 250## [K]\n",
- "#*************#\n",
- "\n",
- "Q = P*t/1000## [kJ]\n",
- "deltaS = Q/T## [kJ/K]\n",
- "print \"Change in Entropy is %.2f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.22 Page: 174"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 39,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.22 - Page: 174\n",
- "\n",
- "\n",
- "Change in Entropy of the gas is 0.5199 kJ/K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.22 - Page: 174\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data*****#\n",
- "T1 = 400## [K]\n",
- "P1 = 300## [kPa]\n",
- "V1 = 1## [cubic m]\n",
- "V2 =2## [cubic m]\n",
- "R = 8.314## [kJ/kmol K]\n",
- "#**************#\n",
- "\n",
- "# Since the system is well insulated, there is no scope of transferring heat between system & surrounding.\n",
- "deltaQ = 0## [kJ]\n",
- "deltaW = 0## [kJ]\n",
- "# By first law of thermodynamics:\n",
- "deltaU =deltaQ - deltaW## [kJ]\n",
- "# As the internal energy of the gas depends only on temperature,\n",
- "deltaT = 0## [K]\n",
- "T2 = T1 + deltaT## [K]\n",
- "P2 = (P1*V1/T1)*(T2/V2)## [kPa]\n",
- "n = P1*V1/(R*T1)## [kmol]\n",
- "deltaS_system = n*R*log(P1/P2)## [kJ/K]\n",
- "# Since process is adiabatic:\n",
- "deltaS_surrounding = 0## [kJ/K]\n",
- "deltaS = deltaS_system + deltaS_surrounding## [kJ/K]\n",
- "print \"Change in Entropy of the gas is %.4f kJ/K\"%(deltaS)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.23 Page: 174"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 41,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.23 - Page: 174\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 5.23 on page 174 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.23 - Page: 174\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 5.23 on page number 174 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 5.23 on page 174 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.24 Page: 182"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 44,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.24 - Page: 182\n",
- "\n",
- "\n",
- "Work lost is 2119.67 kJ\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.24 - Page: 182\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# From Example 5.18 (Pg: 170)\n",
- "#*****Data*****#\n",
- "m_iron = 40## [kg]\n",
- "T1 = 625## [K]\n",
- "m_water = 160## [kg]\n",
- "T2 = 276## [K]\n",
- "C_iron = 0.45## [kJ/kg K]\n",
- "C_water = 4.185## [kJ/kg K]\n",
- "#**************#\n",
- "\n",
- "#deff('[y] = f(T)','y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)')#\n",
- "def f(T):\n",
- " y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)\n",
- " return y\n",
- "T = fsolve(f, 7)[0]## [K]\n",
- "# Change in Entropy of the iron casting can be estimated as:\n",
- "deltaS1 = m_iron*C_iron*quad(lambda T:(1/T),[T1,T])## [kJ/K]\n",
- "# Change in Entropy of Water is given by:\n",
- "deltaS2 = m_water*C_water*quad(lambda T:(1/T),[T2,T])## [kJ/K]\n",
- "deltaS = deltaS1 + deltaS2## [kJ/K]\n",
- "# By Eqn. 5.63:\n",
- "W_lost = T2 * deltaS## [kJ]\n",
- "print \"Work lost is %.2f kJ\"%(W_lost)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 5.25 Page: 182"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 45,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 5.25 - Page: 182\n",
- "\n",
- "\n",
- "Total Entropy Change is 1831.74 kJ/K\n",
- "\n",
- "Since deltaS is a positive quantity, process is irreversible\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 5.25 - Page: 182\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "m_oil = 4750## [kg]\n",
- "T1_oil = 515## [K]\n",
- "T2_oil = 315## [K]\n",
- "m_water = 9500## [kg]\n",
- "T1_water = 290## [K]\n",
- "Cp_oil = 3.2## [kJ/kg K]\n",
- "Cp_water = 4.185## [kJ/kg K]\n",
- "#*****************#\n",
- "\n",
- "# From enthalpy Balance:\n",
- "#def('[y] = f(T2_water)','y = m_oil*Cp_oil*(T1_oil - T2_oil) - m_water*Cp_water*(T2_water - T1_water)')#\n",
- "def f(T2_water):\n",
- " y = m_oil*Cp_oil*(T1_oil - T2_oil) - m_water*Cp_water*(T2_water - T1_water)\n",
- " return y\n",
- "T2_water = fsolve(f, 7)[0]## [K]\n",
- "# Change in the Entropy of oil:\n",
- "deltaS_oil = m_oil*Cp_oil*quad(lambda T : (1/T),[T1_oil,T2_oil])## [kJ/K]\n",
- "# Change in Entropy of water:\n",
- "deltaS_water = m_water*Cp_water*quad(lambda T: (1/T),[T1_water,T2_water])## [kJ/K]\n",
- "deltaS = deltaS_oil + deltaS_water## [kJ/K]\n",
- "print \"Total Entropy Change is %.2f kJ/K\\n\"%(deltaS)#\n",
- "if deltaS > 0:\n",
- " print \"Since deltaS is a positive quantity, process is irreversible\\n\"\n",
- "else:\n",
- " print \"Since deltaS is a negative quantity, process is reversible\\n\"\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb
deleted file mode 100755
index 771615f6..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb
+++ /dev/null
@@ -1,945 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 6 - Thermodynamic property relations"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.1 Page: 197"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.1 - Page: 197\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.1 on page 197 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.1 - Page: 197\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.1 on page number 197 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.1 on page 197 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.2 Page: 205"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.2 - Page: 205\n",
- "\n",
- "\n",
- "Increase in pressure of 1 atm lowers the freezing point by 0.0072 K\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 6.2 - Page: 205\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "density_water = 0.998## [g/cubic cm]\n",
- "density_ice = 0.9168## [g/cubic cm]\n",
- "Hf = 335## [J/g]\n",
- "T = 0 + 273## [K]\n",
- "#*****************#\n",
- "\n",
- "V_water = 1/density_water## [cubic cm/g]\n",
- "V_ice = 1/density_ice## [cubic cm/g]\n",
- "# From Eqn. 6.56:\n",
- "# dP/dT = deltaS/(V2 - V1) = deltaH/(T*(V2 - V1))\n",
- "# Substituting these values in Eqn. 6.58\n",
- "deltaP_By_deltaT = (Hf/(T*(V_water - V_ice)))*10## [atm/K]\n",
- "deltaT_By_deltaP = 1/deltaP_By_deltaT## [K/atm]\n",
- "if deltaT_By_deltaP > 0:\n",
- " print \"Increase in pressure of 1 atm increases the freezing point by %.4f K\"%(abs(deltaT_By_deltaP))#\n",
- "else:\n",
- " print \"Increase in pressure of 1 atm lowers the freezing point by %.4f K\"%(abs(deltaT_By_deltaP))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.3 Page: 206"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.3 - Page: 206\n",
- "\n",
- "\n",
- "Enthalpy of Vaporisation is 2125 kJ/kg\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.3 - Page: 206\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "P1 = 361.3## [kPa]\n",
- "T1 = 140 + 273## [K]\n",
- "P2 = 617.8## [kPa]\n",
- "T2 = 160 + 273## [K]\n",
- "T = 150 + 273## [K]\n",
- "Vg = 0.3917## [cubic m/kg]\n",
- "#****************#\n",
- "\n",
- "# From Eqn. 6.56\n",
- "# dP/dT = deltaH/(T*(Vg - V1)) = deltaH/(T*Vg)\n",
- "deltaP = P2 - P1## [kPa]\n",
- "deltaT = T2 - T1## [K]\n",
- "deltaH = T*Vg*deltaP/deltaT## [kJ/kg]\n",
- "print \"Enthalpy of Vaporisation is %d kJ/kg\\n\"%(round(deltaH))#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.4 Page: 206"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.4 - Page: 206\n",
- "\n",
- "\n",
- "Saturation pressure of the refrigerant is 39.48 kPa\n"
- ]
- }
- ],
- "source": [
- "from math import exp\n",
- "print \"Example: 6.4 - Page: 206\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "T1 = -40 + 273## [K]\n",
- "T2 = -45 + 273## [K]\n",
- "P1 = 51.25## [kPa]\n",
- "R = 0.0815## [kJ/kg K]\n",
- "Hv = 225.86## [kJ/kg]\n",
- "#****************#\n",
- "\n",
- "# From Eqn. 6.61:\n",
- "P2 = P1*exp((Hv/R)*((1/T1) - (1/T2)))## [kPa]\n",
- "print \"Saturation pressure of the refrigerant is %.2f kPa\"%(P2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.5 Page: 206"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.5 - Page: 206\n",
- "\n",
- "\n",
- "The enthalpy of vaporisation is 13.85 kJ/mol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import log10, exp\n",
- "print \"Example: 6.5 - Page: 206\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "Tb = -103.9 + 273## [K]\n",
- "def f1(T):\n",
- " P = 10**(-(834.13/T) + 1.75*log10(T) - 8.375*10**(-3)*T + 5.324)\n",
- " return P\n",
- "R = 8.314## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "# From Eqn. 6.60, we get:\n",
- "# d(ln(P))/dT = deltaH/(R*T**2)\n",
- "def f2(T):\n",
- " P = exp(2.303*log10(f1(T)))\n",
- " return P\n",
- "# Differentiating it with respect to T\n",
- "# d(ln(P))/dT = (834.13*2.303/Tb**2 + 1.75/Tb - 2.303*8.375*10**(-3))\n",
- "deltaH = R*Tb**2*(834.13*2.303/Tb**2 + 1.75/Tb - 2.303*8.375*10**(-3))/1000## [kJ/mol]\n",
- "print \"The enthalpy of vaporisation is %.2f kJ/mol\\n\"%(deltaH)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.6 Page: 214"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.6 - Page: 214\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.6 on page 214 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.6 - Page: 214\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.6 on page number 214 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.6 on page 214 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.7 Page: 215"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.7 - Page: 215\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.7 on page 215 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.7 - Page: 215\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.7 on page number 215 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.7 on page 215 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.8 Page: 217"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.8 - Page: 217\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.8 on page 217 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.8 - Page: 217\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.8 on page number 217 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.8 on page 217 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.9 Page: 217"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.9 - Page: 217\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.9 on page 217 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.9 - Page: 217\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.9 on page number 217 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.9 on page 217 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.10 Page: 218"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.10 - Page: 218\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.10 on page 218 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.10 - Page: 218\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.10 on page number 218 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.10 on page 218 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.11 Page: 219"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.11 - Page: 219\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.11 on page 219 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.11 - Page: 219\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.11 on page number 219 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.11 on page 219 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.12 Page: 219"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.12 - Page: 219\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.12 on page 219 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.12 - Page: 219\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 6.12 on page number 219 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.12 on page 219 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.13 Page: 220"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.13 - Page: 220\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.13 on page 220 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.13 - Page: 220\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.13 on page number 220 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.13 on page 220 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.14 Page: 221"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.14 - Page: 221\n",
- "\n",
- "\n",
- "Percentage error is 4.77 %\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.14 - Page: 221\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "alpha = 0.837*10**(-11)## [square m/N]\n",
- "beeta = 54.2*10**(-6)## [1/K]\n",
- "T = 227 + 273## [K]\n",
- "V = 7.115*10**(-3)## [cubic m/kmol]\n",
- "Cp = 26.15## [J/mol K]\n",
- "#*****************#\n",
- "\n",
- "Cv = Cp - (T*V*beeta**2/alpha)/1000## [J/mol K]\n",
- "# Percentage error if Cp is assumed to Cv.\n",
- "err = ((Cp - Cv)/Cp)*100#\n",
- "print \"Percentage error is %.2f %%\"%(err)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.15 Page: 221"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.15 - Page: 221\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.15 on page 221 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.15 - Page: 221\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.15 on page number 221 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.15 on page 221 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.16 Page: 222"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.16 - Page: 222\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.16 on page 222 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.16 - Page: 222\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.16 on page number 222 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.16 on page 222 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.17 Page: 222"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.17 - Page: 222\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.17 on page 222 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.17 - Page: 222\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.17 on page number 222 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.17 on page 222 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.18 Page: 223"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.18 - Page: 223\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.18 on page 223 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.18 - Page: 223\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.18 on page number 223 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.18 on page 223 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.19 Page: 227"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.19 - Page: 227\n",
- "\n",
- "\n",
- "Inversion of temperature is 2036.3 K\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.19 - Page: 227\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "a = 3.59## [square L atm /square mol]\n",
- "b = 0.043## [L/mol]\n",
- "R = 0.082## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "# From Eqn. 6.122:\n",
- "Ti = 2*a/(R*b)## [K]\n",
- "print \"Inversion of temperature is %.1f K\"%(Ti)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.20 Page: 227"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.20 - Page: 227\n",
- "\n",
- "\n",
- " This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 6.20 on page 227 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.20 - Page: 227\\n\\n\"\n",
- "\n",
- "# This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
- "# For prove refer to this example 6.20 on page number 227 of the book.\n",
- "\n",
- "print \" This problem involves proving a relation in which no mathematics and no calculations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 6.20 on page 227 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.23 Page: 239"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.23 - Page: 239\n",
- "\n",
- "\n",
- "Residual Entropy is -0.3116 J/mol K\n",
- "\n",
- "Residual Enthalpy is -108.9010 J/mol K\n",
- "\n",
- "Residual Internal Energy is -56.3290 J/mol K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 6.23 - Page: 239\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "T = 298## [K]\n",
- "P = 10*10**5## [Pa]\n",
- "Tc = 126.2## [K]\n",
- "Pc = 34*10**5## [bar]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************#\n",
- "\n",
- "a = 27*R**2*Tc**2/(64*Pc)## [Pa.m**6/square mol]\n",
- "b = R*Tc/(8*Pc)## [cubic m/mol]\n",
- "V = 2.425*10**(-3)## [cubic m/mol]\n",
- "# From Eqn. 6.173:\n",
- "Sr = R*log(P*(V - b)/(R*T))## [J/mol K]\n",
- "print \"Residual Entropy is %.4f J/mol K\\n\"%(Sr)#\n",
- "# From Eqn. 6.174:\n",
- "Hr = P*V - R*T - (a/V)## [J/mol]\n",
- "print \"Residual Enthalpy is %.4f J/mol K\\n\"%(Hr)#\n",
- "Ur = -(a/V)## [J/mol]\n",
- "print \"Residual Internal Energy is %.4f J/mol K\\n\"%(Ur)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 6.24 Page: 244"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 6.24 - Page: 244\n",
- "\n",
- "\n",
- "Fugacity of iso-butane is 12.10 atm\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 6.24 - Page: 244\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "B = -4.28*10**(-4)## [cubic m/mol]\n",
- "P = 15*10**5## [Pa]\n",
- "T = 273 + 87## [K]\n",
- "R = 8.314## [J/atm K]\n",
- "#****************#\n",
- "\n",
- "# Z = 1 + (B*P/(R*T))\n",
- "# (Z - 1)/P = B/(R*T)\n",
- "# From Eqn. 6.192 (b)\n",
- "# ln(f/P) = integral('(Z - 1)/P','P',0,P) = B*P/(R*T)\n",
- "f = P*exp(B*P/(R*T))## [Pa]\n",
- "print \"Fugacity of iso-butane is %.2f atm\"%(f/10**5)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
deleted file mode 100755
index 6e32feac..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
+++ /dev/null
@@ -1,597 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 7 - Thermodynamics to flow processes"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.1 Page: 256"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.1 - Page: 256\n",
- "\n",
- "\n",
- "Flow rate is 0.1237 m/s\n",
- "\n",
- "Velocity of water at the outlet is 3.938 m/s\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "from math import pi\n",
- "print \"Example: 7.1 - Page: 256\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# *****Data******#\n",
- "d1 = 0.15## [inlet dia, m]\n",
- "d2 = 0.20## [outlet dia, m]\n",
- "U1 = 7## [inlet velocity, m/s]\n",
- "#****************#\n",
- "\n",
- "# From Fig. 7.2 (Pg 256)\n",
- "# At the inlet:\n",
- "A1 = (pi/4)*d1**2## [square m]\n",
- "# At the outlet:\n",
- "A2 = (pi/4)*d2**2## [square m]\n",
- "Q = A1*U1## [cubic m/s]\n",
- "print \"Flow rate is %.4f m/s\\n\"%(Q)#\n",
- "# Using Continuity Eqn.\n",
- "# density1*U1*A1 = Density2*U2*A2\n",
- "# For water: Density1 = Density2. Therefore:\n",
- "U2 = A1*U1/A2#\n",
- "print \"Velocity of water at the outlet is %.3f m/s\"%(U2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.2 Page: 257"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.2 - Page: 257\n",
- "\n",
- "\n",
- "Discharge through the 10 cm pipe is 0.0942 cubic m/sec\n",
- "\n",
- "Average velocity in the 15 cm pipe is 6.38 m/s\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.2 - Page: 257\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "d1 = 0.2## [m]\n",
- "d2 = 0.15## [m]\n",
- "d3 = 0.1## [m]\n",
- "U1 = 3## [m/s]\n",
- "U2 = 2.5## [m/s]\n",
- "#**************#\n",
- "\n",
- "# From Fig. 7.3 (Pg: 257)\n",
- "# For pipe I:\n",
- "A1 = (pi/4)*d1**2## [square m]\n",
- "Q1 = A1*U1## [cubic m/s]\n",
- "# For pipe II:\n",
- "A2 = (pi/4)*d2**2## [square m]\n",
- "Q2 = A2*U2## [cubic m/s]\n",
- "# For pipe III:\n",
- "A3 = (pi/4)*d3**2## [square m]\n",
- "# From continuity Eqn.:\n",
- "Q3 = Q1 - Q2## [cubic m/s]\n",
- "U3 = Q3/A3## [m/s]\n",
- "print \"Discharge through the 10 cm pipe is %.4f cubic m/sec\\n\"%(Q1)#\n",
- "print \"Average velocity in the 15 cm pipe is %.2f m/s\"%(U3)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.3 Page: 262"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.3 - Page: 262\n",
- "\n",
- "\n",
- "Pressure at section 2 is 5.20 bar\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.3 - Page: 262\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "d1 = 0.3## [m]\n",
- "d2 = 0715##[m]\n",
- "Q = 40/1000## [cubic m/s]\n",
- "Z1 = 8## [m]\n",
- "Z2 = 6## [m]\n",
- "P1 = 5*10**5## [Pa]\n",
- "density = 1000## [kg/cubic m]\n",
- "g = 9.81## [m/square s]\n",
- "#*************#\n",
- "\n",
- "# From Fig. 7.3 (Pg: 262)\n",
- "A1 = (pi/4)*d1**2## [square m]\n",
- "A2 = (pi/4)*d2**2## [square m]\n",
- "U1 = Q/A1## [m/s]\n",
- "U2 = Q/A2## [m/s]\n",
- "# Applying Bernoulli's equations at sections 1 & 2:\n",
- "P2 = ((U1**2/(2*g) + Z1 + P1/(density*g)) - (U2**2/(2*g) + Z2))*(density*g)## [Pa]\n",
- "print \"Pressure at section 2 is %.2f bar\"%(P2/10**5)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.4 Page: 268"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.4 - Page: 268\n",
- "\n",
- "\n",
- "Power Requirement of the compressor is 3.79 kW\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.4 - Page: 268\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 100## [kPa]\n",
- "T1 = 320## [K]\n",
- "P2 = 600## [kPa]\n",
- "T2 = 430## [K]\n",
- "m_dot = 0.03## [kg/s]\n",
- "Qout = 15## [kJ/kg]\n",
- "#*************#\n",
- "\n",
- "# The energy balance around the compressor:\n",
- "# dE_System/dt = Ein - Eout\n",
- "# Since it is a steady state process:\n",
- "# dE_Sysytem/dt = 0\n",
- "# Ein = Eout\n",
- "# Win + m_dot*H1 = Qout + m_dot*H2\n",
- "# Since, Qout = Qout/m\n",
- "# Win = m_dot*(Qout + (H2 - H1))\n",
- "# From enthalpy chart of air:\n",
- "H1 = 320.20## [Enthalpy of air at 320 K, kJ/kg]\n",
- "H2 = 431.43## [Enthalpy of air at 430 K, kJ/kg]\n",
- "Win = m_dot*(Qout + (H2 - H1))## [kW]\n",
- "print \"Power Requirement of the compressor is %.2f kW\"%(Win)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.5 Page: 269"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.5 - Page: 269\n",
- "\n",
- "\n",
- "Work done by reversible adiabatic compression when gama = 1.4 is -96.53 J/g\n",
- "\n",
- "Work done by isothermal compression is -76.03 J/g\n",
- "\n",
- "Work done in single stage compression is -19.49 kW\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "print \"Example: 7.5 - Page: 269\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 100## [kPa]\n",
- "T1 = 250## [K]\n",
- "Q = 0.1## [cubic m/s]\n",
- "P2 = 500## [kPa]\n",
- "M = 44## [g/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "#****************#\n",
- "\n",
- "# Solution (a)\n",
- "# Work done by reversible adiabatic compression, gama = 1.4#\n",
- "gama = 1.4#\n",
- "T2 = T1*(P2/P1)**((gama - 1)/gama)## [K]\n",
- "Wad = (gama*R/(gama - 1))*(T1 - T2)## [J/mol]\n",
- "Wad = Wad/M## [J/g]\n",
- "print \"Work done by reversible adiabatic compression when gama = 1.4 is %.2f J/g\\n\"%(Wad)#\n",
- "\n",
- "# Solution (b)\n",
- "# Work done by isothermal compression:\n",
- "Wiso = - (R*T1)*log(P2/P1)## [J/mol]\n",
- "Wiso = Wiso/M## [J/g]\n",
- "print \"Work done by isothermal compression is %.2f J/g\\n\"%(Wiso)#\n",
- "\n",
- "# Solution (c)\n",
- "# Work done in single stage compression, gama = 1.3:\n",
- "gama = 1.3#\n",
- "V1 = Q## [cubic m]\n",
- "Wsingle_stage = (gama*P1*V1/(gama - 1))*(1-(P2/P1)**((gama - 1)/gama))## [kW]\n",
- "print \"Work done in single stage compression is %.2f kW\"%(Wsingle_stage)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.7 Page: 274"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.7 - Page: 274\n",
- "\n",
- "\n",
- "The mass flow rate of water is 448.70 kg/min\n",
- "\n",
- "The rate of heat transfer is 18777.00 kJ/min\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.7 - Page: 274\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "T_steam1 = 50## [OC]\n",
- "T_steam2 = 30## [OC]\n",
- "msteam_dot = 10## [kg/min]\n",
- "T_water1 = 15## [OC]\n",
- "T_water2 = 25## [OC]\n",
- "#***************#\n",
- "\n",
- "# Solution (a)\n",
- "# From the Stem Table:\n",
- "H1 = 2645.9## [kJ/kg, At 50 OC]\n",
- "H2 = 768.2## [kJ/kg, At 30 OC]\n",
- "H3 = 62.982## [kJ/kg, At 15 OC]\n",
- "H4 = 104.83## [kJ/kg, At 25 OC]\n",
- "# The mass & Energy balance of the above flow gives:\n",
- "mwater_dot = msteam_dot*(H1 - H2)/(H4 - H3)## [kg/min]\n",
- "print \"The mass flow rate of water is %.2f kg/min\\n\"%(mwater_dot)#\n",
- "\n",
- "# Solution (b)\n",
- "Qdot = mwater_dot*(H4 - H3)## [kJ/min]\n",
- "print \"The rate of heat transfer is %.2f kJ/min\"%(Qdot)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.8 Page: 279"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.8 - Page: 279\n",
- "\n",
- "\n",
- "Outlrt velocity is 603.3 m/s\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "print \"Example: 7.8 - Page: 279\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 500## [kPa]\n",
- "T1 = 623## [K]\n",
- "mdot = 12## [kg/s]\n",
- "P2 = 500## [kPa]\n",
- "T2 = 523## [K]\n",
- "Qdot = -120## [kW]\n",
- "H1 = 3168## [kJ/kg]\n",
- "H2 = 2976## [kJ/kg]\n",
- "#************#\n",
- "\n",
- "Q = Qdot/mdot## [kJ/kg]\n",
- "# By energy balance:\n",
- "# (deltaU**2/2) + g*deltaZ + deltaH = Q - Ws\n",
- "# Considering negligible change in P.E., deltaZ = 0 & Ws = 0.\n",
- "# (U2**2 - U1**2)/2 + deltaH = Q\n",
- "deltaH = H2 - H1## [kJ/kg]\n",
- "# Neglecting inlet velocity.\n",
- "U2 = sqrt(2*(Q - deltaH)*1000)## [m/s]\n",
- "print \"Outlrt velocity is %.1f m/s\\n\"%(U2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.9 Page: 279"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.9 - Page: 279\n",
- "\n",
- "\n",
- "Critical Ratio is 0.53\n",
- "\n",
- "The discharge velocity is 1174.46 m/s\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.9 - Page: 279\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Pin = 1000## [kPa]\n",
- "Tin = 600## [K]\n",
- "Uin = 50## [m/s]\n",
- "gama = 1.4#\n",
- "M = 17## [g/mol]\n",
- "R = 8314## [kJ/mol K]\n",
- "MachNumber = 2#\n",
- "#***************#\n",
- "\n",
- "# Solution (i)\n",
- "# Using Eqn. (7.36):\n",
- "Critical_Ratio = (2/(gama + 1))**(gama/(gama - 1))#\n",
- "print \"Critical Ratio is %.2f\\n\"%(Critical_Ratio)#\n",
- "\n",
- "# Solution (ii)\n",
- "PV_in = R*Tin/M## [square m]\n",
- "Uthroat = sqrt(Uin**2 + (2*gama*PV_in/(gama - 1))*(1-(Critical_Ratio)**((gama - 1)/gama)))## [m/s]\n",
- "Uout = MachNumber*Uthroat## [m/s]\n",
- "print \"The discharge velocity is %.2f m/s\"%(Uout)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.10 Page: 280"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.10 - Page: 280\n",
- "\n",
- "\n",
- "(a) Final Velocity is 901.11 m/s\n",
- "\n",
- "(b) Final Velocity is 1553.06 m/s\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.10 - Page: 280\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 800## [kPa]\n",
- "T1 = 773## [K]\n",
- "H1 = 3480## [kJ/kg]\n",
- "P2 = 100## [kPa]\n",
- "T2 = 573## [K]\n",
- "H2 = 3074## [kJ/kg]\n",
- "#***************#\n",
- "\n",
- "# Solution (a)\n",
- "# Velocity of the fluid exiting the nozzle:\n",
- "# U2 = sqrt(U1**2 + 2*(H1 - H2))\n",
- "# Neglecting initial velocity:\n",
- "U2 = sqrt(2*(H1 - H2)*1000)## [m/s]\n",
- "print \"(a) Final Velocity is %.2f m/s\\n\"%(U2)#\n",
- "\n",
- "# Solution (b)\n",
- "U1 = 40## [m/s]\n",
- "U2 = sqrt((U1**2 + 2*(H1 - H2))*1000)## [m/s]\n",
- "print \"(b) Final Velocity is %.2f m/s\\n\"%(U2)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 7.11 Page: 281"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 7.11 - Page: 281\n",
- "\n",
- "\n",
- "Mass flow rate of the steam is 17.50 kg/s\n",
- "\n",
- "The temperature of the steam leaving the outlet is 393.38 K\n",
- "\n",
- "Area of diffuser outlet is 0.28 square m\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 7.11 - Page: 281\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 100## [kPa]\n",
- "T1 = 200## [OC]\n",
- "U1 = 190## [m/s]\n",
- "A1 = 2000/10**4## [square m]\n",
- "U2 = 70## [m/s]\n",
- "P2 = 200## [kPa]\n",
- "Qdot = 100## [kW]\n",
- "V1 = 2.172## [cubic m/kg]\n",
- "H1 = 2875.3## [kJ/kg]\n",
- "#***************#\n",
- "\n",
- "# Solution (a)\n",
- "mdot = U1*A1/V1## [kg/s]\n",
- "print \"Mass flow rate of the steam is %.2f kg/s\\n\"%(mdot)#\n",
- "\n",
- "# Solution (b)\n",
- "# Amount of heat transferred to the surrounding per unit steam:\n",
- "Q = Qdot/mdot## [kJ/kg]\n",
- "# The Enthalpy at the diffuser outlet can be estimated as:\n",
- "H2 = Q + H1 + (U1**2 - U2**2)/2## [kJ/kg]\n",
- "# From the steam table:\n",
- "T2 = 393.38## [K]\n",
- "V2 = 1.123## [cubic m/kg]\n",
- "print \"The temperature of the steam leaving the outlet is %.2f K\\n\"%(T2)#\n",
- "\n",
- "# Solution (c)\n",
- "A2 = V2*mdot/U2## [square m]\n",
- "print \"Area of diffuser outlet is %.2f square m\\n\"%(A2)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb
deleted file mode 100755
index c35a6a24..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb
+++ /dev/null
@@ -1,580 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 8 - Refrigeration and liquifaction processes"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.1 Page: 297"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.1 - Page: 297\n",
- "\n",
- "\n",
- "The coeffecient of performance of the cycle is 7.91\n",
- "\n",
- "The power required is 3.79 kW\n",
- "\n",
- "The rate of heat rejection in the room is 33.79 kW\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 8.1 - Page: 297\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Tl = 273 - 4## [K]\n",
- "Th = 273 + 30## [K]\n",
- "Ql = 30## [kW]\n",
- "#*************\n",
- "\n",
- "# Solution (a)\n",
- "COP = Tl/(Th - Tl)#\n",
- "print \"The coeffecient of performance of the cycle is %.2f\\n\"%(COP)\n",
- "\n",
- "# Solution (b)\n",
- "Wnet = Ql/COP## [kW]\n",
- "print \"The power required is %.2f kW\\n\"%(Wnet)\n",
- "\n",
- "# Solution (c)\n",
- "Qh = Wnet + Ql## [kW]\n",
- "print \"The rate of heat rejection in the room is %.2f kW\"%(Qh)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.2 Page: 298"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.2 - Page: 298\n",
- "\n",
- "\n",
- "The power consumption is 0.735 kW\n",
- "\n",
- "Cooling Effect produced is 2.862 kW\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.2 - Page: 298\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Tl = -10 + 273## [K]\n",
- "Th = 45 + 273## [K]\n",
- "Ql = 1## [ton]\n",
- "#*************\n",
- "\n",
- "# Solution (a)\n",
- "COP = Tl/(Th - Tl)#\n",
- "Wnet = Ql*3.516/COP## [kW]\n",
- "print \"The power consumption is %.3f kW\\n\"%(Wnet)\n",
- "\n",
- "# Solution (b)\n",
- "Tl = -20 + 273## [K]\n",
- "Th = 45 + 273## [K]\n",
- "COP = Tl/(Th - Tl)#\n",
- "Ql = Wnet*COP## [kW]\n",
- "print \"Cooling Effect produced is %.3f kW\\n\"%(Ql)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.3 Page: 298"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.3 - Page: 298\n",
- "\n",
- "\n",
- "Increase in percentage of work output is 22.97 %\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.3 - Page: 298\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "# From Example 8.2:\n",
- "\n",
- "# For refrigerated space:\n",
- "# Wnet = Ql/4.78 = 0.209*Ql\n",
- "\n",
- "# For freezer box.\n",
- "# Wnet = Ql/3.89 = 0.257*Ql\n",
- "\n",
- "percent = ((0.257 - 0.209)/0.209)*100#\n",
- "print \"Increase in percentage of work output is %.2f %%\"%(percent)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.4 Page: 299"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.4 - Page: 299\n",
- "\n",
- "\n",
- "Coeffecient of performance of Carnot Heat Pump is 12.38\n",
- "\n",
- "Power input can be estimated as 2.02 kW\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.4 - Page: 299\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Th = 273 + 24## [K]\n",
- "Tl = 0 + 273## [K]\n",
- "Qh = 25## [kW]\n",
- "#*************\n",
- "\n",
- "COP = Th/(Th - Tl)#\n",
- "Wnet = Qh/COP## [kW]\n",
- "print \"Coeffecient of performance of Carnot Heat Pump is %.2f\\n\"%(COP)#\n",
- "print \"Power input can be estimated as %.2f kW\\n\"%(Wnet)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.5 Page: 299"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.5 - Page: 299\n",
- "\n",
- "\n",
- "Minimum Power input required is 1.669 kW\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.5 - Page: 299\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Tl = -2 + 273## [K]\n",
- "Th = 20 + 273## [K]\n",
- "Qh = 80000## [kJ/h]\n",
- "#*************\n",
- "\n",
- "Ql = Qh*Tl/Th## [kJ/h]\n",
- "Wnet = Qh - Ql## [kJ/h]\n",
- "print \"Minimum Power input required is %.3f kW\\n\"%(Wnet/3600)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.6 Page: 303"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.6 - Page: 303\n",
- "\n",
- "\n",
- "Enthalpy of saturated vapour is 6.65\n",
- "\n",
- "Refrigerating Effect is 113 kJ/kg\n",
- "\n",
- "The COP of an ideal Carnot refrigerator is 6.83\n",
- "\n",
- "Work done by the compression is 17.00 kJ/kg\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.6 - Page: 303\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Tl = 273## [K]\n",
- "Th = 313## [K]\n",
- "H1 = 187## [Enthalpy of saturated vapour at 273 K, kJ/kg]\n",
- "H3 = 74## [Enthalpy of saturated liquid at 313 K,kJ/kg]\n",
- "H4 = H3## [kJ/kg]\n",
- "H2 = 204## [Enthalpy of Supersaturated Vapour at 273 K, kJ/kg]\n",
- "#****************\n",
- "\n",
- "# Solution (i)\n",
- "# COP = Ql/Wnet#\n",
- "COP = ((H1 - H4)/(H2 - H1))#\n",
- "print \"Enthalpy of saturated vapour is %.2f\\n\"%(COP)\n",
- "\n",
- "# Solution (ii)\n",
- "Ref_Effect = H1 - H4## [kJ/kg]\n",
- "print \"Refrigerating Effect is %d kJ/kg\\n\"%(Ref_Effect)\n",
- "\n",
- "# Solution (iii)\n",
- "COP = Tl/(Th - Tl)#\n",
- "print \"The COP of an ideal Carnot refrigerator is %.2f\\n\"%(COP)\n",
- "\n",
- "# Solution (iv)\n",
- "W = H2 - H1## [kJ/kg]\n",
- "print \"Work done by the compression is %.2f kJ/kg\\n\"%(W)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.7 Page: 304"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.7 - Page: 304\n",
- "\n",
- "\n",
- "Amount of heat removed from cold space is 9.18 kW\n",
- "\n",
- "THe power input required is 1.92 kW\n",
- "\n",
- "COP of refrigeration of cycle is 4.77\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.7 - Page: 304\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "P1 = 0.18## [MPa]\n",
- "T1 = -10 + 273## [K]\n",
- "mdot = 0.06## [kg/s]\n",
- "P2 = 1## [MPa]\n",
- "T2 = 45 + 273## [K]\n",
- "T = 273 + 29## [K]\n",
- "P = 0.75## [MPa]\n",
- "H1 = 245.16## [Enthalpy of superheated vapour at -10 OC & 0.18 MPa, kJ/kg]\n",
- "H2 = 277.2## [Enthalpy of superheated vapour at 45 OC & 1 MPa, kJ/kg]\n",
- "H3 = 92.22## [Enthalpy of saturated liquid at 29 OC & 0.75 MPa, kJ/kg]\n",
- "H4 = H3## [kJ/kg]\n",
- "#*************\n",
- "\n",
- "# Solution (a)\n",
- "Ql = mdot*(H1 - H4)## [kW]\n",
- "print \"Amount of heat removed from cold space is %.2f kW\\n\"%(Ql)\n",
- "\n",
- "# Solution (b)\n",
- "Wnet = mdot*(H2 - H1)## [kW]\n",
- "print \"THe power input required is %.2f kW\\n\"%(Wnet)\n",
- "\n",
- "# Solution (c)\n",
- "COP = Ql/Wnet#\n",
- "print \"COP of refrigeration of cycle is %.2f\\n\"%(COP)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.8 Page: 305"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.8 - Page: 305\n",
- "\n",
- "\n",
- "Mass flow rate of the refrigerant is 0.1546 kg/s\n",
- "\n",
- "Power consumption in the compression is 4.57 kW\n",
- "\n",
- "The amount of heat rejected in the condenser is 22.15 kW\n",
- "\n",
- "Relative COP is 0.78\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.8 - Page: 305\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Ql = 5## [tons]\n",
- "Tl = -10 + 273## [K]\n",
- "Th = 35 + 273## [K]\n",
- "eta = 0.85#\n",
- "H1 = 183.2## [Enthalpy of saturated vapour at 263 K, kJ/kg]\n",
- "H2 = 208.3## [Enthalpy of superheated vapour, kJ/kg]\n",
- "H3 = 69.5## [Enthalpy of saturated vapour at 308 K, kJ/kg]\n",
- "H4 = H3## [kJ/kg]\n",
- "#***************\n",
- "\n",
- "# Solution (a)\n",
- "# Mass flow rate:\n",
- "Ql = Ql*3.516## [kW]\n",
- "mdot = Ql/(H1 - H4)## [kW]\n",
- "print \"Mass flow rate of the refrigerant is %.4f kg/s\\n\"%(mdot)\n",
- "\n",
- "# Solution (b)\n",
- "W = H2 - H1## [kJ/kg]\n",
- "Wnet = W*mdot/eta## [kW]\n",
- "print \"Power consumption in the compression is %.2f kW\\n\"%(Wnet)\n",
- "\n",
- "# Solution (c)\n",
- "Qh = Ql + Wnet## [kW]\n",
- "print \"The amount of heat rejected in the condenser is %.2f kW\\n\"%(Qh)\n",
- "\n",
- "# Solution (d)\n",
- "COP_VapourCompression = (H1 - H4)/(H2 - H1)#\n",
- "COP_Carnot = Tl/(Th - Tl)#\n",
- "COP_relative = COP_VapourCompression/COP_Carnot#\n",
- "print \"Relative COP is %.2f\\n\"%(COP_relative)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.9 Page: 308"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.9 - Page: 308\n",
- "\n",
- "\n",
- "Claim is Valid and reasonable\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.9 - Page: 308\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Th = 273 + 125## [K]\n",
- "Tl = 273 - 5## [K]\n",
- "Ts = 273 + 28## [K]\n",
- "COP = 2#\n",
- "#*************\n",
- "\n",
- "COP_absorption = (Tl/(Ts - Tl))*((Th - Ts)/Th)#\n",
- "if ((COP - 0.1) < COP_absorption) or ((COP + 0.1) > COP_absorption):\n",
- " print \"Claim is Valid and reasonable\"\n",
- "else:\n",
- " print \"Claim is not Valid\"\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 8.10 Page: 313"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 8.10 - Page: 313\n",
- "\n",
- "\n",
- "COP of Air Refrigeration System is 2.06\n",
- "\n",
- "Mass flow rate of the refrigerant is 1279.07 kg/h\n",
- "\n",
- "The work of Compression is 26.13 kW\n",
- "\n",
- "The work of expansion is 17.58 kW\n",
- "\n",
- "Net work of the system is 8.55 kW\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 8.10 - Page: 313\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Q = 5## [tons]\n",
- "T1 = 253## [Temperature of the working fluid leaving the evaporator, K]\n",
- "T2 = 303## [Temperature of the working fluid leaving the evaporator, K]\n",
- "T3 = 303## [K]\n",
- "Pressure_Ratio = 4#\n",
- "C = 1.008## [kJ/kg]\n",
- "gama = 1.4#\n",
- "#**************\n",
- "\n",
- "# Solution (a)\n",
- "T2 = T1*((Pressure_Ratio)**((gama - 1)/gama))## [K]\n",
- "T2 = T1*(Pressure_Ratio)**((gama - 1)/gama)## [K]\n",
- "T4 = T3/((Pressure_Ratio)**((gama - 1)/gama))## [K]\n",
- "COP = T1/(T2 - T1)#\n",
- "print \"COP of Air Refrigeration System is %.2f\\n\"%(COP)\n",
- "\n",
- "# Solution (b)\n",
- "mdot = Q*12660/(C*(T1 - T4))## [kg/h]\n",
- "print \"Mass flow rate of the refrigerant is %.2f kg/h\\n\"%(mdot)\n",
- "\n",
- "# Solution (c)\n",
- "Wcompression = mdot*C*(T2 - T3)## [kJ/h]\n",
- "print \"The work of Compression is %.2f kW\\n\"%(Wcompression/3600)\n",
- "\n",
- "# Solution (d)\n",
- "Wexpansion = mdot*C*(T1 - T4)## [kJ/h]\n",
- "print \"The work of expansion is %.2f kW\\n\"%(Wexpansion/3600)\n",
- "\n",
- "# Solution (e)\n",
- "Wnet = Wcompression - Wexpansion## [kJ/h]\n",
- "print \"Net work of the system is %.2f kW\\n\"%(Wnet/3600)#"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb
deleted file mode 100755
index 9ed9282e..00000000
--- a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb
+++ /dev/null
@@ -1,1078 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 9 - Solutoin thermodynamic properties"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.1 Page: 338"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.1 - Page: 338\n",
- "\n",
- "\n",
- "Partial molar volume of water is 2.76e-05 cubic m/mol\n",
- "\n"
- ]
- }
- ],
- "source": [
- "from __future__ import division\n",
- "print \"Example: 9.1 - Page: 338\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "V1_bar = 52.37*10**(-6)## [partial molar volume of ethanol, cubic m/mol]\n",
- "y1 = 0.5## [mole fraction of ethanol]\n",
- "Density = 800.21## [kg/cubic m]\n",
- "M1 = 46*10**(-3)## #[Molecular wt. of ethanol,kg/mol]\n",
- "M2 = 18*10**(-3)## [Molecular wt. of water,kg/cmol]\n",
- "#*************#\n",
- "\n",
- "y2 = 1 - y1## [mole fraction of water]\n",
- "M = y1*M1 + y2*M2## [Molecular wt. of mixture, kg/mol]\n",
- "V = M/Density## [Volume of mixture, cubic m/mol]\n",
- "# From Eqn. 9.9:\n",
- "V2_bar = (V - y1*V1_bar)/y2## [partial molar volume of water, cubic m/mol]\n",
- "print \"Partial molar volume of water is %.2e cubic m/mol\\n\"%(V2_bar)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.2 Page: 338"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.2 - Page: 338\n",
- "\n",
- "\n",
- "Volume of alcohol required is 1.223 cubic m while volume of water required is 0.842 cubic m\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.2 - Page: 338\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Vol = 2## [Volume of the mixture, cubic m/mol]\n",
- "y1 = 0.4## [mole fraction of alcohol, cubic m/mol]\n",
- "V1_bar = 38.3*10**(-6)## [partial molar volume of alcohol, cubic m/mol]\n",
- "V2_bar = 17.2*10**(-6)## [partial molar volume of water, cubic m/mol]\n",
- "V1 = 39.21*10**(-6)## [molar volume of alcohol, cubic m/mol]\n",
- "V2 = 18*10**(-6)## [molar volume of water, cubic m/mol]\n",
- "#*************#\n",
- "\n",
- "# From Eqn. 9.9:\n",
- "V = y1*V1_bar + (1 - y1)*V2_bar## [molar volume of the solution]\n",
- "n = Vol/V## [number of moles of solution]\n",
- "n1 = y1*n## [number of moles of alcohol required]\n",
- "n2 = (1 - y1)*n## [number of moles of water required]\n",
- "V_alcohol = V1*n1## [Volume of alcohol required, cubic m]\n",
- "V_water = V2*n2## [Volume of water required, cubic m]\n",
- "print \"Volume of alcohol required is %.3f cubic m while volume of water required is %.3f cubic m\\n\"%(V_alcohol,V_water)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.3 Page: 339"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.3 - Page: 339\n",
- "\n",
- "\n",
- "Mass of water added is 1138 g\n",
- "\n",
- "The volume of vodka obtained after conversion is 3047 cubic cm\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.3 - Page: 339\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Vol = 2000## [cubic cm]\n",
- "y1_1 = 0.96## [mass fraction of ethanol in laboratory alcohol]\n",
- "y2_1 = 0.04## [mass fraction of water in laboratory alcohol]\n",
- "y1_2 = 0.56## [mass fracion of ethanol in vodka]\n",
- "y2_2 = 0.44## [mass fraction of water in vodka]\n",
- "Vbar_water1 = 0.816## [cubic cm/g]\n",
- "Vbar_ethanol1 = 1.273## [cubic cm/g]\n",
- "Vbar_water2 = 0.953## [cubic cm/g]\n",
- "Vbar_ethanol2 = 1.243## [cubic cm/g]\n",
- "Density_water = 0.997## [cubic cm/g]\n",
- "#***************#\n",
- "\n",
- "# Solution (i)\n",
- "# From Eqn 9.9\n",
- "Va = y1_1*Vbar_ethanol1 + y2_1*Vbar_water1## [Volume of laboratory alcohol, cubic cm/g]\n",
- "mass = Vol/Va## [g]\n",
- "# Let Mw be the mass of water added in laboratory alcohol.\n",
- "# Material balance on ethanol:\n",
- "Mw = mass*y1_1/y1_2 - mass## [g]\n",
- "Vw = Mw/Density_water## [Volume of water added, cubic cm]\n",
- "print \"Mass of water added is %d g\\n\"%(Mw)#\n",
- "\n",
- "# Solution (ii)\n",
- "Mv = mass + Mw## [Mass of vodka, g]\n",
- "Vv = y1_2*Vbar_ethanol2 + y2_2*Vbar_water2## [Volume of ethanol, cubic cm/g]\n",
- "V_vodka = Vv*Mv## [Volume of vodka obtained after conversion, cubic cm]\n",
- "print \"The volume of vodka obtained after conversion is %.d cubic cm\\n\"%(V_vodka)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.4 Page: 339"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.4 - Page: 339\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.4 on page 339 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.4 - Page: 339\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.4 on page number 339 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.4 on page 339 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.5 Page: 340"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.5 - Page: 340\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.5 on page 340 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.5 - Page: 340\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.5 on page number 340 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.5 on page 340 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.6 Page: 341"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example - 9.6 and Page number - 341\n",
- "\n",
- "\n",
- "The expression for the partial molar volume of methanol(2) is\n",
- "V2_bar = V2 + a*x_1**(2) [cubic cm/mol]\n",
- "\n",
- "\n",
- "The partial molar volume of methanol at infinite dilution is 37.5 cubic cm/mol\n"
- ]
- }
- ],
- "source": [
- "print \"Example - 9.6 and Page number - 341\\n\\n\"\n",
- "\n",
- "#Given\n",
- "T = 25+273.15## [K]\n",
- "P = 1## [atm]\n",
- "# Component 1 = water\n",
- "# Component 2 = methanol\n",
- "a = -3.2## [cubic cm/mol] A constant\n",
- "V2 = 40.7## [cubic cm/mol] Molar volume of pure component 2 (methanol)\n",
- "# V1_bar = 18.1 + a*x_2**(2)\n",
- "\n",
- "# From Gibbs-Duhem equation at constant temperature and pressure we have\n",
- "# x_1*dV1_bar + x_2*dV2_bar = 0\n",
- "# dV2_bar = -(x_1/x_2)*dV1_bar = -(x_1/x_2)*a*2*x_2*dx_2 = -2*a*x_1*dx_2 = 2*a*x_1*dx_1\n",
- "\n",
- "# At x_1 = 0: x_2 = 1 and thus V2_bar = V2\n",
- "# Integrating the above equation from x_1 = 0 to x_1 in the RHS, and from V2_bar = V2 to V2 in the LHS, we get\n",
- "# V2_bar = V2 + a*x_1**(2) - Molar volume of component 2(methanol) in the mixture \n",
- "\n",
- "print \"The expression for the partial molar volume of methanol(2) is\\nV2_bar = V2 + a*x_1**(2) [cubic cm/mol]\\n\\n\"\n",
- "\n",
- "# At infinite dilution, x_2 approach 0 and thus x_1 approach 1, therefore\n",
- "x_1 = 1## Mole fraction of component 1(water) at infinite dilution\n",
- "V2_bar_infinite = V2 + a*(x_1**(2))##[cubic cm/mol]\n",
- "\n",
- "print \"The partial molar volume of methanol at infinite dilution is %.1f cubic cm/mol\"%(V2_bar_infinite)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.7 Page: 342"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.7 - Page: 342\n",
- "\n",
- "\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe4XFXZ9/Hvj04EDE2QokFfqgKhIzUqECygFIP0UN4H\nlKY0EV4IRSDwUBQUFESCKEiRjiD1RAhNkBNCN2joEFqQQB4I4X7/2PuwN+c5ZzJz5uzZU36f65or\ns2f2zNxzZ86s2eveay1FBGZm1rnmKDsAMzMrlxsCM7MO54bAzKzDuSEwM+twbgjMzDqcGwIzsw7n\nhsBsEEgaLemusuMwGwg3BNb0JE2R9J6kd3KXs8qOa7BIWlrStZLekPS8pH0q7Htkrzy8J2mWpEUa\nGbO1FzcE1goC+HZELJi7HFh2UIPoD8AzwGeAbwEnSRrR144RcVI+D8ApwJ0R8WbDorW244bAWpqk\ncyVdmds+RdJt6fWFJd0gaaqkNyVdL2np3L5dkk6QNCH9dX2dpMUk/VHS25IekPT53P4fSTpA0jOS\nXpN0qiT1E9dKkm5Nf+U/Kel7/ey3ALApcFJEzIqIR4ArgT2reO8Cdgcuqi5bZn1zQ2Ctos8vXOBg\nYFVJu0vamOQLdLfcYy4APpdeZgC/7PX4HYBdgKWBLwL3po9ZBHgCGNNr/+8CawFrAt+hjy9sSZ8C\nbiX5pb848H3gHEkrV3hf+fc3B/Dlft5v3sbp8/+5in3N+uWGwFqBgGskvZW77AUQETOAXYEzgYuB\n/SPipfS+NyPi6oj4n4iYDpxE8uu7RwAXRsS/I+I/wE3A0xFxR0TMAq4A1ugVyykRMS0ingd+DuzY\nR7zfBv4dERdFxEcR0Q1cBfyvo4KIeAeYABwtaV5JawLbAvNXkZfdg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D86XNd\nnO43Pf1Xkv5b0qT0MaPS20ekr3mFpCck/WFwU2hW7qRzZvW6DDhG0g3AqsAFJAt2ABwHPBQR301n\na/09yUIe+RkZfwGcGRET0nmcbgZW6fUaWwE3RMQaAJICmDsi1km3h0bE+un1vYHDgUOBo4G3ImK1\n3H5XSdq/57lSPUco25JMFrcasDjw93QCOYDhaVwvAxMkbRgR7lKyQeOGwFpWREySNIzkaODGXndv\nSPLlSkTcKWlRSQv22mczYOV03iaABSUNiYj3cvv0NcX1Zbnry0q6HFgSmIdskrOvk0yM1hPrtNm8\nnY2ASyKZ82WqpPHAOsB/gAci4iUASd0kq3S5IbBB44bAWt11wGkkE3At3uu+2c3HLmC9iPigxtd8\nN3f9bOC0iLhB0qYkyyX29/qVRB/798T7fu62Wfjv1gaZawTW6n4HHBsRj/W6/S5gZ0j62YHXImJ6\nr31uAQ7s2ZA0vMrXzH9hLwS8lF4fnbv9VmC/3HMPTa/OlNTXF/ldwA6S5pC0OLAJ8AC1NSZmA+KG\nwFpVAETEixHxy9xtPb+ijwXWSqckPgnYvY99DgTWTou5jwH/Vem1+tk+FrhC0oMk6yf33PczYOG0\n+NsNjEhvPw94JHfqa8/7uJpkKumJwO3AYRExtVe8/cVjVhdPQ21m1uF8RGBm1uHcEJiZdTg3BGZm\nHc4NgZlZh3NDYGbW4dwQmJl1ODcEZmYdzg2BmVmH+//j6OBpCcj7ngAAAABJRU5ErkJggg==\n",
- "text/plain": [
- "<matplotlib.figure.Figure at 0x7f9070c5aed0>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "For X1 = 0.5\n",
- "\n",
- "Partial molar volume of component 1 is 3.38e-05 cubic m/mol\n",
- "\n",
- "Partial molar volume of component 2 is 1.70e-05 cubic m/mol\n",
- "\n",
- "\n",
- "\n",
- "For X2 = 0.75\n",
- "\n",
- "Partial molar volume of component 1 is 3.83e-05 cubic m/mol\n",
- "\n",
- "Partial molar volume of component 2 is 1.72e-05 cubic m/mol\n",
- "\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaUAAAEPCAYAAADiVdsmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl0FFX6//H3QyAIiCCK7CgKUUBZVBZRJECQzQEUFRE0\nUX8jXxW3GTUJiERZ4+i44TYOKqis6igqshN0kEVkFWQbRQE1sggisoU8vz9uAW3M0km60p3wvM7p\nQ3X1vVW360B/uFW3bomqYowxxkSCUuFugDHGGHOMhZIxxpiIYaFkjDEmYlgoGWOMiRgWSsYYYyKG\nhZIxxpiI4WsoiUgXEVkvIptEJDGHMs95n68SkeZ51RWRKiIyW0Q2isgsEakc8FmyV369iFyVzb6m\niciagPdlRWSyV2exiJwdum9vjDEmv3wLJRGJAsYAXYBGQF8RaZilTDegvqo2AO4AXgqibhIwW1Vj\ngLnee0SkEdDHK98FeFFESgXs61pgHxB4Y9btwC5v/08DqSE7AMYYY/LNz55SS2Czqm5R1SPAJKBn\nljI9gHEAqroEqCwi1fOoe7yO92cvb7knMFFVj6jqFmCztx1E5FTgAWA4INntH3gX6FjYL22MMabg\n/AylWsDWgPfbvHXBlKmZS91qqpruLacD1bzlml65wDo1veVhwJPA7zntX1UzgL0iUiWvL2aMMcYf\nfoZSsPMXSd5FkOy2p26OpNz2IyLSDDhXVT8Icl/GGGPCpLSP294O1Al4X4c/9mSyK1PbK1Mmm/Xb\nveV0Eamuqj+JSA3g5zy21Rq4VES+xX3fs0Rknqp28OrUBX4QkdJAJVXdnfWLiIhNEGiMMQWgqvnq\nDPjZU1oGNBCRc0QkGjcIYVqWMtOAWwBEpDWwxzs1l1vdaUC8txwPvB+w/kYRiRaRekADYKmqvqyq\ntVS1HnAFsNELpKzbug43cCJbqmovVYYOHRr2NkTKy46FHQs7Frm/CsK3npKqZojIQGAmEAWMVdWv\nRWSA9/krqjpdRLqJyGZgP3BrbnW9T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Aoyz7+Anykqs0BRESBMqrawntfWVVbe8v/D3gYeBAYAvyiqk0C\nyr0nIgOPbctzrOd2LW4i1SZAVeALb3JVgGZeu34EForI5apqp/1MyFgoGRMCqrpGRM7B9ZI+zvLx\n5bgfelR1voicISIVs5SJAxp6cwkCVBSR8qr6e0CZ7B6LMTlguY6ITAGqA9GcmAC0I27S0GNt3ZPH\n17kCmKBuDrKfRWQB0AL4FViqqj8AiMhK3NNXLZRMyFgoGRM604AncRNUVs3yWV7PlBGglaoezuc+\n9wcsPw88qaofiUg73CO5c9p/bjSb8sfaeyhg3VHsN8SEmF1TMiZ0XgNSVHVtlvWfAf3AXZcBdqjq\nb1nKzALuPfZGRJoFuc/A8DgN+MFbTghYPxu4O2Dblb3FIyKSXah8BvQRkVIiUhW4ElhK/oLNmAKx\nUDKm8BRAVber6piAdcd6FynAJd5jDEYC8dmUuRe41BuIsBa4I7d95fA+BZgqIsuAHQGfDQdO9wYu\nrARivfX/AlYHDGc/9j3+g3v8xCpgLvCQqv6cpb05tceYQrFHVxhjjIkY1lMyxhgTMSyUjDHGRAwL\nJWOMMRHDQskYY0zEsFAyxhgTMSyUjDHGRAwLJWOMMRHDQskYY0zE+P/Fu4BdNlHpCgAAAABJRU5E\nrkJggg==\n",
- "text/plain": [
- "<matplotlib.figure.Figure at 0x7f9070ba6bd0>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "print \"Example: 9.7 - Page: 342\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "# Data = [X1 V*10**6(cubic m/mol)]#\n",
- "from numpy import mat\n",
- "Data = mat([[0, 20],[0.2, 21.5],[0.4, 24.0],[0.6, 27.4],[0.8, 32.0],[1, 40]])\n",
- "#************#\n",
- "%matplotlib inline\n",
- "from matplotlib.pyplot import plot, title, xlabel, ylabel, show, grid\n",
- "plot(Data[:,0],Data[:,1])\n",
- "title(\"Example 9.7\")\n",
- "xlabel(\"Mole fraction\")\n",
- "ylabel(\"Molar Volume*10**(6)\")\n",
- "grid()#\n",
- "show()\n",
- "# Solution (i)\n",
- "print \"For X1 = 0.5\\n\"\n",
- "# A tangent is drawn to the curve at X1 = 0.5.\n",
- "# The intercept at X2 = 0 or X1 = 1, gives V1_bar.\n",
- "V1_bar1 = 33.8*10**(-6)## [cubic m/mol]\n",
- "# The intercept at X2 = 1 or X1 = 0, gives V2_bar.\n",
- "V2_bar1 = 17*10**(-6)## [cubic m/mol]\n",
- "print \"Partial molar volume of component 1 is %.2e cubic m/mol\\n\"%(V1_bar1)#\n",
- "print \"Partial molar volume of component 2 is %.2e cubic m/mol\\n\"%(V2_bar1)#\n",
- "print \"\\n\"\n",
- "\n",
- "# Solution (ii)\n",
- "print \"For X2 = 0.75\\n\"\n",
- "# A tangent is drawn to the curve at X1 = 0.75.\n",
- "# The intercept at X2 = 0 or X1 = 1, gives V1_bar.\n",
- "V1_bar2 = 36.6*10**(-6)## [cubic m/mol]\n",
- "# The intercept at X2 = 1 or X1 = 0, gives V2_bar.\n",
- "V2_bar2 = 12.4*10**(-6)## [cubic m/mol]\n",
- "point1 = mat([[0, V1_bar1],[ 1 ,V2_bar1]])\n",
- "point2 = mat([[0, V1_bar2],[1, V2_bar2]])\n",
- "plot(point1[:,0],point1[:,1],point2[:,0],point2[:,1])\n",
- "#legend(\"X1 = 0.5\"%(\"X1 = 0.75\"\n",
- "xlabel(\"Mole fraction\")\n",
- "ylabel(\"Molar Volume\")\n",
- "print \"Partial molar volume of component 1 is %.2e cubic m/mol\\n\"%(V1_bar)#\n",
- "print \"Partial molar volume of component 2 is %.2e cubic m/mol\\n\"%(V2_bar)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.8 Page: 352"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.8 - Page: 352\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.8 on page 352 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.8 - Page: 352\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.8 on page number 352 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.8 on page 352 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.9 Page: 352"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.9 - Page: 352\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.9 on page 352 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.9 - Page: 352\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.9 on page number 352 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.9 on page 352 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.10 Page: 354"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.10 - Page: 354\n",
- "\n",
- "\n",
- "Fugacity of the gaseous mixture is 40.095 bar\n"
- ]
- }
- ],
- "source": [
- "from math import exp, log\n",
- "print \"Example: 9.10 - Page: 354\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "x1 = 0.3## [mole fraction of component 1 in the mixture]\n",
- "x2 = 0.7## [mole fraction of component 2 in the mixture]\n",
- "phi1 = 0.7## [fugacity coeffecient of component 1 in the mixture]\n",
- "phi2 = 0.85## [fugacity coeffecient of component 2 in the mixture]\n",
- "P = 50## [bar]\n",
- "T = 273 + 100## [K]\n",
- "#*************#\n",
- "\n",
- "phi = exp(x1*log(phi1) + x2*log(phi2))## [fugacity coeffecient of the mixture]\n",
- "f = phi*P## [bar]\n",
- "print \"Fugacity of the gaseous mixture is %.3f bar\"%(f)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.11 Page: 354"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.11 - Page: 354\n",
- "\n",
- "\n",
- "Fugacity of the gaseous mixture is 45.479 bar\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.11 - Page: 354\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "x1 = 0.3## [mole fraction of hydrogen in the mixture]\n",
- "x2 = 0.25## [mole fraction of nitrogen in the mixture]\n",
- "x3 = 0.45## [mole fraction of oxygen in the mixture]\n",
- "phi1 = 0.7## [fugacity coeffecient of oxygen in the mixture]\n",
- "phi2 = 0.85## [fugacity coeffecient of nitrogen in the mixture]\n",
- "phi3 = 0.75## [fugacity coeffecient of oxygen in the mixture]\n",
- "P = 60## [bar]\n",
- "T = 273 + 150## [K]\n",
- "#***********#\n",
- "\n",
- "phi = exp(x1*log(phi1) + x2*log(phi2) + x3*log(phi3))## [fugacity coeffecient of the mixture]\n",
- "f = phi*P## [bar]\n",
- "print \"Fugacity of the gaseous mixture is %.3f bar\"%(f)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.12 Page: 356"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.12 - Page: 356\n",
- "\n",
- "\n",
- "Fugacity of liquid water is 1.0012 bar\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.12 - Page: 356\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "T = 372.12## [K]\n",
- "Psat = 100## [kPa]\n",
- "P = 300# #[kPa]\n",
- "Vspecific = 1.043*10**(-3)##[cubic m/kg]\n",
- "M = 18*10**(-3)## [molecular weight of water, kg/mol]\n",
- "R = 8.314## [J/mol K]\n",
- "#***************#\n",
- "\n",
- "Psat = Psat/100## [bar]\n",
- "P = P/100## [bar]\n",
- "Vl = Vspecific*M## [cubic m/mol]\n",
- "# Vapour is assumed to be like an ideal gas.\n",
- "phi = 1#\n",
- "fsat = Psat*phi## [bar]\n",
- "fl = fsat*exp(Vl*(P - Psat)*10**5/(R*T))## [bar]\n",
- "print \"Fugacity of liquid water is %.4f bar\"%(fl)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.13 Page: 357"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.13 - Page: 357\n",
- "\n",
- "\n",
- "The fugacity of the liquid water is 4.2051 bar\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.13 - Page: 357\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Vl = 90.45*10**(-6)## [molar volume of liquid butadiene, cubic m/mol]\n",
- "fsat = 4.12## [bar]\n",
- "P = 10## [bar]\n",
- "Psat = 4.12## [bar]\n",
- "T = 313## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "#************#\n",
- "\n",
- "fl = fsat*exp(Vl*(P - Psat)*10**5/(R*T))## [bar]\n",
- "print \"The fugacity of the liquid water is %.4f bar\"%(fl)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.14 Page: 357"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.14 - Page: 357\n",
- "\n",
- "\n",
- "The fugacity of the gas is 1411 atm \n",
- "\n",
- "The fugacity coeffecient of the gas is 1.411 atm\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.14 - Page: 357\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "b = 0.0391## [cubic dm/mol]\n",
- "P1 = 1000## [atm]\n",
- "T = 1000 + 273## [K]\n",
- "R = 0.0892## [L bar/K mol]\n",
- "#deff('[Vreal] = f1(P)','Vreal = R*T/P + b')#\n",
- "#deff('[Videal] = f2(P)','Videal = R*T/P')#\n",
- "def f1(P):\n",
- " Vreal = R*T/P + b\n",
- " return Vreal\n",
- "\n",
- "def f2(P):\n",
- " Videal = R*T/P\n",
- " return Videal\n",
- "\n",
- "def f(P):\n",
- " f12 = f1(P)-f2(P)\n",
- " return f12\n",
- "\n",
- "#**************#\n",
- "\n",
- "# We know that:\n",
- "# RTlog(f/P) = integral('Vreal - Videal',P,0,P)\n",
- "\n",
- "from sympy.mpmath import quad\n",
- "f = P1*exp((1/(R*T))*quad(f,[0,P1]))## [atm]\n",
- "phi = f/P1#\n",
- "print \"The fugacity of the gas is %d atm \\n\"%(f)#\n",
- "print \"The fugacity coeffecient of the gas is %.3f atm\"%(phi)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.15 Page: 359"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.15 - Page: 359\n",
- "\n",
- "\n",
- "Fugacity of liquid butadiene at 313 K & 10 bar is 8.109 bar\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.15 - Page: 359\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "Vl = 73*10**(-6)## [cubic m/mol]\n",
- "P = 275## [bar]\n",
- "Psat = 4.360## [bar]\n",
- "T = 110 + 273## [K]\n",
- "R = 8.314## [J/mol K]\n",
- "#**************#\n",
- "\n",
- "# Acetone vapour is assumed to behave like ideal gas.\n",
- "phi = 1#\n",
- "fsat = Psat## [bar]\n",
- "fl = fsat*exp(Vl*(P - Psat)*10**5/(R*T))## [bar]\n",
- "print \"Fugacity of liquid butadiene at 313 K & 10 bar is %.3f bar\"%(fl)# "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.16 Page: 362"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.16 - Page: 362\n",
- "\n",
- "\n",
- "The entropy change of mixiong is 0.749 cal/K mol\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.16 - Page: 362\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "V1 = 2.8## [Volume of Oxygen, L]\n",
- "V2 = 19.6## [Volume of hydrogen, L]\n",
- "R = 1.987## [cal/K mol]\n",
- "#**************#\n",
- "\n",
- "n1 = V1/22.4## [moles of Oxygen]\n",
- "n2 = V2/22.4## [moles of Hydrogen]\n",
- "n = n1 + n2## [total number of moles]\n",
- "x1 = n1/n## [mole fraction of Oxygen]\n",
- "x2 = n2/n## [mole fraction of Hydrogen]\n",
- "# From Eqn. 9.88:\n",
- "deltaS_mix = - (R*(x1*log(x1) + x2*log(x2)))## [cal/K mol]\n",
- "print \"The entropy change of mixiong is %.3f cal/K mol\"%(deltaS_mix)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.17 Page: 363"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.17 - Page: 363\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.17 on page 363 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.17 - Page: 363\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.17 on page number 363 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.17 on page 363 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.18 Page: 364"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.18 - Page: 364\n",
- "\n",
- "\n",
- "The free energy change of mixing is -1513.46 J\n",
- "\n",
- "The enthalpy change of mixing is 0 J\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.18 - Page: 364\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "n1 = 0.7## [moles of helium]\n",
- "n2 = 0.3## [moles of argon]\n",
- "R = 8.314## [J/mol K]\n",
- "T = 273 + 25## [K]\n",
- "#******************#\n",
- "\n",
- "n = n1 + n2## [total moles]\n",
- "x1 = n1/n## [mole fraction of helium]\n",
- "x2 = n2/n## [mole fraction of argon]\n",
- "deltaG_mix = n*R*T*(x1*log(x1) + x2*log(x2))## [J]\n",
- "print \"The free energy change of mixing is %.2f J\\n\"%(deltaG_mix)#\n",
- "\n",
- "# Since the gases are ideal:\n",
- "deltaH_mix = 0## [J]\n",
- "print \"The enthalpy change of mixing is %d J\\n\"%(deltaH_mix)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.19 Page: 364"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.19 - Page: 364\n",
- "\n",
- "\n",
- "Free Energy change of mixing is -15.37 J\n",
- "\n",
- "Enthalpy change in mixing is 0.00 J\n",
- "\n",
- "Entropy Change in mixing is 0.052 J/K\n",
- "\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.19 - Page: 364\\n\\n\"\n",
- "\n",
- "# Solution\n",
- "\n",
- "#*****Data******#\n",
- "V = 20## [Volume of vessel, L]\n",
- "V1 = 12## [Volume of Hydrogen, L]\n",
- "V2 = 10## [Volume of Nitrogen, L]\n",
- "P = 1## [atm]\n",
- "T = 298## [K]\n",
- "P1 = 1## [atm]\n",
- "P2 = 1## [atm]\n",
- "R = 0.082## [L atm/K mol]\n",
- "#************#\n",
- "\n",
- "n1 = P1*V1/(R*T)## [number of moles of Hydrogen]\n",
- "n2 = P2*V2/(R*T)## [number of moles of Nitrogen]\n",
- "n = n1 + n2## [total number of moles]\n",
- "Pfinal = n*R*T/V## [atm]\n",
- "p1 = Pfinal*n1## [partial pressure of Hydrogen, atm]\n",
- "p2 = Pfinal*n2## [partial pressure of Nitrogen, atm]\n",
- "deltaG_mix = R*T*(n1*log(p1/P1) + n2*log(p2/P2))## [J]\n",
- "print \"Free Energy change of mixing is %.2f J\\n\"%(deltaG_mix)#\n",
- "\n",
- "# Since mixing is ideal:\n",
- "deltaH_mix = 0## [J]\n",
- "print \"Enthalpy change in mixing is %.2f J\\n\"%(deltaH_mix)#\n",
- "\n",
- "deltaS_mix = - (deltaG_mix/T)## [J/K]\n",
- "print \"Entropy Change in mixing is %.3f J/K\\n\"%(deltaS_mix)#"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.20 Page: 367"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 30,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.20 - Page: 367\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.20 on page 367 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.20 - Page: 367\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.20 on page number 367 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.20 on page 367 of the book.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example: 9.21 Page: 373"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Example: 9.21 - Page: 373\n",
- "\n",
- "\n",
- " Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "\n",
- "\n",
- " For prove refer to this example 9.21 on page 373 of the book.\n"
- ]
- }
- ],
- "source": [
- "print \"Example: 9.21 - Page: 373\\n\\n\"\n",
- "\n",
- "# Mathematics is involved in proving but just that no numerical computations are involved.\n",
- "# For prove refer to this example 9.21 on page number 373 of the book.\n",
- "\n",
- "print \" Mathematics is involved in proving but just that no numerical computations are involved.\\n\\n\"\n",
- "print \" For prove refer to this example 9.21 on page 373 of the book.\""
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}