diff options
Diffstat (limited to 'Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb')
-rw-r--r-- | Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb index a248aa47..9278e05d 100644 --- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb +++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch4.ipynb @@ -27,23 +27,17 @@ "cell_type": "code", "collapsed": false, "input": [ - "# find free energy change of the steam\n", "\n", "import math \n", "\n", - "# Variables\n", "T = 671.7 #[R] Equilibrium temperature\n", "m_steam = 1. #[lbm] Condenmath.sing amount of the steam\n", - "# Using values from the steam table [1], we find that\n", "delta_h_condensation = -970.3 #[Btu/lbm] Enthalpy change of the steam\n", "delta_s_condensation = -1.4446 #[Btu/(lbm*R)] Entropy change of the steam\n", "\n", - "# Calculations\n", - "# Gibb's free energy change of the steam is\n", "delta_g_condensation = delta_h_condensation - T*delta_s_condensation #[Btu/lbm]\n", "\n", "\n", - "# Results\n", "print \"Gibb''s free energy change of the steam is %0.1f Btu/lbm\"%(delta_g_condensation)\n" ], "language": "python", @@ -72,7 +66,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Gibb's free energy-pressure diagram for graphite-diamond system\n", "\n", "from numpy import *\n", "from matplotlib.pyplot import *\n", @@ -80,31 +73,16 @@ "\n", "%pylab inline\n", "\n", - "# Variables\n", - "# let we denote graphite by 'g' and diamond by 'd' \n", - "# Gibb's free energies of graphite and diamond are given by\n", "g_g = 0.00 #[kJ/mol] \n", "g_d = 2.90 #[kJ/mol]\n", "\n", - "# Calculations\n", - "# Specific volumes of graphite and diamond are given by\n", "v_g = 5.31*10**(-1) #[kJ/(mol*kbar)]\n", "v_d = 3.42*10**(-1) #[kJ/(mol*kbar)]\n", "\n", - "# Now from the equation 4.32 ( page 74) given in the book, we have\n", - "# (dg/dP) = v , at consmath.tant temperature\n", - "# where 'v' is specific volume\n", - "# let us denote (dg/dP) by 'D' ,so\n", "\n", "D_g = v_g #[J/(mol*Pa)] For graphite\n", "D_d = v_d #[J/(mol*Pa)] For diamond\n", "\n", - "# Now we can take our plot from P = 0( =1 ), however, total pressure is 1 atm. \n", - "# If we consider specific volumes of the given species to be consmath.tant with changing the pressure then g-P curve will be a straight line\n", - "# So the equation of the line for graphite is \n", - "# g = D_g*P + g_g\n", - "# and that for diamond\n", - "# g = D_d*P + g_d\n", "\n", "P = linspace(0,30,30).T\n", "\n", @@ -115,7 +93,6 @@ "legend(['Diamond, slope = 0.342 (kJ/mol)/kbar','Graphite, slope = 0.532 (kJ/mol)/kbar']);\n", "\n", "show()\n", - "# Results\n", "print \" Gibb's free energy-pressure diagram for graphite-diamond system at 25 degC is as shown in the graphic window. \"\n", "\n", "\n" @@ -168,31 +145,18 @@ "cell_type": "code", "collapsed": false, "input": [ - "# find mole fraction of isobutane isomer in equilibrium\n", "\n", "from scipy.optimize import fsolve \n", "import math \n", "\n", - "# Variables\n", - "# We have the system which consists of isobumath.tane and normal bumath.tane and isomerisaation is taking place between them \n", - "# The equilibrium consmath.tant for this reaction is given by\n", - "# K = (mole fraction of isobumath.tane)/(mole fraction of n-bumath.tane) = x_iso/x_normal\n", "\n", - "# For this reaction, at 25C, \n", "K = 4.52\n", "\n", - "# and\n", - "# x_iso + x_normal = 1\n", - "# so\n", - "# K = x_iso/(1-x_iso)\n", "\n", - "# Calculations\n", - "# solving for x_iso\n", "def f(x_iso): \n", "\t return x_iso/(1-x_iso)-K\n", "x_iso = fsolve(f,0)\n", "\n", - "# Results\n", "print \" Mole fraction of isobumath.tane isomer in equilibrium is %0.2f\"%(x_iso)\n" ], "language": "python", |