diff options
author | debashisdeb | 2014-06-21 00:52:25 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-21 00:52:25 +0530 |
commit | 7c756fcc12d21693818e58f6936cab5b7c112868 (patch) | |
tree | 009cb02ec85f4a75ac7b64239751f15361df2bfe /Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb | |
parent | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (diff) | |
download | Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.gz Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.bz2 Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.zip |
Removed Problem Statements Completely
Diffstat (limited to 'Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb')
-rw-r--r-- | Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb | 115 |
1 files changed, 93 insertions, 22 deletions
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb index 16c57280..ce95f234 100644 --- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb +++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch6.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "" + "name": "", + "signature": "sha256:b5e7bc5aa10585d1f719544046b71d6acecd3da70a2a86327271cc53390af498" }, "nbformat": 3, "nbformat_minor": 0, @@ -27,25 +28,31 @@ "cell_type": "code", "collapsed": false, "input": [ - "'''\n", - "calculate\n", - "Partial molal volume of ethanol in water at zero molality\n", - "Partial molal volume of ethanol in water at unity molality \n", - "'''\n", - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "T = 20. #[C]\n", "m_1 = 0. #[molal]\n", "m_2 = 1. #[molal]\n", "\n", + "# Calculations\n", + "# The data given in the figure 6.2 , as reported in book, can be repersented with excellent accuracy by a simple data fitting equation\n", + "#V = 1.0019+0.054668*m-0.000418*m**(2)\n", + "# Where 'V' is( solution volume, liters per 1000g of water ) and 'm' is the molality of ethanol in water\n", + "#The partial molal volume is obtained by differentiating the expression of the 'V' with respect to 'm'\n", + "# v_ethanol = dV/dm = 0.054668-2*0.000418*m\n", + "# So that at zero molality \n", "m = 0 #[molal]\n", + "# the partial molal volume is \n", "v_1 = 0.054668-2*0.000418*m #[L/mol]\n", + "# and at\n", "m = 1. #[molal]\n", "v_2 = 0.054668-2*0.000418*m #[L/mol]\n", "v_1 = v_1*1000 #[cm**(3)/mol]\n", "v_2 = v_2*1000 #[cm**(3)/mol]\n", "\n", + "# Results\n", "print \"Partial molal volume of ethanol in water at zero molality is %f cm**3/mol\"%(v_1)\n", "print \" Partial molal volume of ethanol in water at unity molality is %f cm**3/mol\"%(v_2)\n" ], @@ -75,24 +82,34 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "n_eth = 1. #[mol]\n", "W_water = 1. #[kg]\n", "Temp = 20. #[C]\n", "\n", + "# For pure ethanol at 20C\n", "v_ethanol = 58.4 #[cm**(3)/mol]\n", "v_ethanol = v_ethanol/1000 # [L/mol]\n", "v_water = 1.0019 #[L/1000g]\n", "\n", + "# Calculations\n", + "# Molality of ethanol in water is\n", "m = n_eth/W_water #[molal]\n", + "# We have the equation used in the previous example as\n", "V_final_mix = 1.0019+0.054668*m-0.000418*m**(2)\n", "\n", + "# Where 'V' is( solution volume, liters per 1000g of water ) and 'm' is the molality of ethanol in water\n", + "# V is the final volume of the solution \n", + "# The volume expansion on moxing is \n", "V_exp = V_final_mix-v_ethanol-v_water #[L]\n", "V_exp = V_exp*1000 #[cm**(3)]\n", "\n", + "# Results\n", "print \"Volume change on mixing emath.tanol and water is %0.3f cubic cm\"%(V_exp)\n", + "# We see that there is a net contraction on mixing of the volume of the ethanol added.\n", "\n" ], "language": "python", @@ -120,17 +137,24 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", + "# All the data are same as in the previous example \n", + "# The equation 6.5 reported in the book is \n", "v_i_average = 0.05425 #[L/mol]\n", + "# and\n", "v_i_0 = 0.0584 #[L/mol]\n", "delta_n = 1.00 #[mol]\n", "\n", + "# Calculations\n", "delta_V_mixing = (v_i_average-v_i_0)*delta_n #[L]\n", "delta_V_mixing = delta_V_mixing*1000 #[cm**(3)]\n", "\n", + "# Results\n", "print \"Volume change on mixing etanol and water is %f cm**3\"%(delta_V_mixing)\n", + "# Which is same as the solution in example 6.2\n" ], "language": "python", "metadata": {}, @@ -157,29 +181,41 @@ "cell_type": "code", "collapsed": false, "input": [ - "'''\n", - "calculate\n", - "Partial molar volume of the ethanol \n", - "Partial molar volume of the water \n", - "'''\n", + " \n", "import math \n", "\n", + "# Variables\n", "m = 1. #[molal] Molality of the solution with respect to ethanol\n", "M_water = 18. #[g/mol] molecular weight of water\n", "\n", + "# Calculations\n", + "# First we convert molality to mole fraction\n", "x_ethanol = m/(m + 1000/M_water)\n", "\n", + "# For the low range of data point on figure 6.5(page 112), we can fit an equation\n", + "# (Specific volume ) = 0.018032 + 0.037002*x_ethanol - 0.039593*x_ethanol**(2) + 0.21787*x_ethanol**(3)\n", + "# This is applicable for (0 < x_ethanol < 0.04 ), which is the case we have\n", "\n", + "# So\n", "v_math_tan = 0.018032 + 0.037002*x_ethanol - \\\n", "0.039593*x_ethanol**(2) + 0.21787*x_ethanol**(3) #[L/mol]\n", "\n", + "# Now we will find the derivative of the specific volume with respect to x_ethanol at the known point x_ethanol\n", + "# (dv/dx_ethanol) = 0.037002 - 2*0.039593*x_ethanol + 3*0.21787*x_ethanol**(2)\n", + "# Hence\n", "v_derv_math_tan = 0.037002 - 2*0.039593*x_ethanol + 3*0.21787*x_ethanol**(2) #[L/mol]\n", "\n", + "# By simple geometry from the figure 6.6(page 113) of the book we find\n", + "# a = v_math_tan + (1-x_math_tan)*(dv/dx_1)_math_tan\n", + "# b = v_math_tan - x_math_tan*(dv/dx_1)_math_tan\n", "\n", + "# We have a = v_ethanol and b = v_water\n", "x_math_tan = x_ethanol\n", + "# So\n", "v_ethanol = v_math_tan + (1-x_math_tan)*(v_derv_math_tan) #[L/mol]\n", "v_water = v_math_tan - x_math_tan*(v_derv_math_tan) #[L/mol]\n", "\n", + "# Results\n", "print \" Partial molar volume of the ethanol in the given solution is %f L/mol\"%(v_ethanol)\n", "print \" Partial molar volume of the water in the given solution is %f L/mol\"%(v_water)\n" ], @@ -209,25 +245,27 @@ "cell_type": "code", "collapsed": false, "input": [ - "'''\n", - "calculate\n", - "Partial molar enthalpy of water in the mixture\n", - "Partial molar enthalpy of H2SO4 in the mixture\n", - "'''\n", + " \n", "\n", "import math \n", "\n", + "# Variables\n", "x_sulph = 0.6\n", "x_water = 0.4\n", "Temp = 200. #[F]\n", + "# In the given figure 6.8 in the book, drawing the math.tangent to the 200F curve at 60 wt% H2SO4, we find that it intersects the 0%(pure water) axis at 25 Btu/lbm, and the 100% H2SO4 axis at -100Btu/lbm. i.e.\n", "h_water_per_pound = 25. #[Btu/lbm]\n", "h_sulph_per_pound = -100. #[Btu/lbm]\n", + "# also molecular weight of water and sulphuric acid are\n", "M_water = 18. #[lbm/lbmol]\n", "M_sulph = 98. #[lbm/lbmol]\n", "\n", + "# Calculations\n", + "# Using equation 6.20 given in the book we have\n", "h_water = h_water_per_pound*M_water #[Btu/lbmol]\n", "h_sulph = h_sulph_per_pound*M_sulph #[Btu/lbmol]\n", "\n", + "# Results\n", "print \"Partial molar enthalpy of water in the mixture is %f Btu/lbmol\"%(h_water)\n", "print \" Partial molar enthalpy of H2SO4 in the mixture is %f Btu/lbmol\"%(h_sulph)\n" ], @@ -257,20 +295,30 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "x_sulph = 0.6\n", "x_water = 0.4\n", "M_i = 18. #[lbm/lbmol]\n", "Temp = 200. #[F]\n", + "# From Equation 6.11 as given in the book, we have \n", + "# dQ/dm_in = h_i-h_in\n", + "# where h_i is partial molal enthalpy which is taken from the example 6.7 and h_in is the pure species molar enthalpy which is read from the figure 6.8.\n", + "# So at 200F we have \n", "h_i = 25. #[Btu/lbm]\n", "h_in = 168. #[Btu/lbm]\n", "\n", + "# Calculations\n", + "# hence\n", "dQ_by_dm_in = h_i-h_in #[Btu/lbm]\n", + "# Now \n", "dQ_by_dn_in = M_i*dQ_by_dm_in #[Btu/lbmol]\n", "\n", + "# Results\n", "print \"The amount of heat removed to keep the temperature consmath.tant is %f Btu/lbm of water added\"%(dQ_by_dm_in)\n", + "# The negative sign shows that this mixing is exothermic we must remove 143 Btu/lbm of water added.\n" ], "language": "python", "metadata": {}, @@ -297,19 +345,28 @@ "cell_type": "code", "collapsed": false, "input": [ + " \n", "import math \n", "\n", + "# Variables\n", "m_sulph = 0.4\n", "m_water = 0.6\n", "m = m_sulph+m_water\n", "Temp = 200. #[F]\n", + "# Here at 200F we can read the solution enthalpy h_solution and pure H2SO4 enthalpy h_sulph such that\n", "h_solution = -43. #[Btu/lbm]\n", "h_sulph = 168. #[Btu/lbm]\n", + "# By energy balance, umath.sing h_0_water from example 6.7 in the book i.e.\n", "h_0_water = 53. #[Btu/lbm]\n", "\n", + "# We find \n", + "# Calculations\n", "delta_Q = m*h_solution-(m_sulph*h_sulph+m_water*h_0_water) #[Btu]\n", "\n", + "# Results\n", "print \"The amount of heat added or removed is %f Btu\"%(delta_Q)\n", + "# We must remove the given amount of to hold the temperature consmath.tant.\n", + "# Note However the book has some mistake in calculation and reporting -172 Btu\n" ], "language": "python", "metadata": {}, @@ -336,17 +393,22 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "x_sulph = 0.6\n", "x_water = 0.4\n", "Temp = 200. #[F]\n", + "# At the 200F we have\n", "h_water = 25. #[Btu/lbm]\n", "h_sulph = -100. #[Btu/lbm]\n", "\n", + "# Calculations\n", + "# From equation 6.16 (as reporated in the book), rewritten for masses instead of moles we have \n", "h_solution = h_water*x_water+h_sulph*x_sulph # [Btu/lbm]\n", "\n", + "# Results\n", "print \"Enthalpy of the solution is %f Btu/lbm\"%(h_solution)\n" ], "language": "python", @@ -374,13 +436,22 @@ "cell_type": "code", "collapsed": false, "input": [ - "\n", + " \n", "import math \n", "\n", + "# Variables\n", "x_b = 0\n", "x_a = 1\n", + "# We have\n", + "#dv_a/dx_a = 3*x_b**(2)+2*x_b\n", + "# We have the equation \n", + "# dv_b/dx_a = -(dv_a/dx_a)/(x_b/x_a)\n", + "# So\n", + "# dv_b/dx_a = -(x_a/x_b)*(3*x_b**(2)+2*x_b) \n", + "# Calculations\n", "dv_b_by_dx_a = x_a*(-3*x_b-2)\n", "\n", + "# Results\n", "print \"Value of the dv_b/dx_a at x_b =0 is %0.0f\"%(dv_b_by_dx_a)\n" ], "language": "python", |