diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb')
-rwxr-xr-x | Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb | 496 |
1 files changed, 496 insertions, 0 deletions
diff --git a/Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb b/Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb new file mode 100755 index 00000000..f1f6c8f4 --- /dev/null +++ b/Thermodynamics_for_Chemists_by_S._Galsstone/ch5.ipynb @@ -0,0 +1,496 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f3e8b42215365cf1bfa3ac9f200471823539f88439d8a1274c785506152bd8d0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Thermochemistry" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Q1 = -1227 \t \t\t#kcal\n", + "R = 2*10**-3 \t\t\t#kcal\n", + "T = 25 \t\t\t#C\n", + "dn = -2\n", + "\n", + "# Calculations\n", + "Qp = Q1+R*(273+T)*dn\n", + "\n", + "# Results\n", + "print 'Heat of reaction = %.1f kcal'%(Qp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat of reaction = -1228.2 kcal\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "H1 = -337.3 \t\t\t#kcal\n", + "H2 = -68.3 \t\t\t#kcal\n", + "H3 = -372.8 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "Ht = H1+H2-H3\n", + "\n", + "# Results\n", + "print 'Heat change of reaction = %.1f kcal'%(Ht)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat change of reaction = -32.8 kcal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dH = -1228.2 \t\t\t#kcal\n", + "n1 = 10\n", + "n2 = 4\n", + "dH1 = -94.05 \t\t\t#kcal\n", + "dH2 = -68.32 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "x = n1*dH1+n2*dH2-dH\n", + "\n", + "# Results\n", + "print 'Heat of formation = %.1f kcal'%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat of formation = 14.4 kcal\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "H1 = -29.6 \t\t\t#kcal\n", + "H2 = -530.6 \t\t\t#kcal\n", + "H3 = -94 \t\t\t#kcal\n", + "H4 = -68.3 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "dH1 = -(H1+H2-3*H3-4*H4)\n", + "dH2 = -dH1+3*H3+3*H4\n", + "\n", + "# Results\n", + "print 'Heat of combustion = %.f kcal'%(dH1)\n", + "print ' Standard heat of formation = %.1f kcal'%(dH2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat of combustion = 5 kcal\n", + " Standard heat of formation = -491.9 kcal\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 25. \t\t\t#C\n", + "T2 = 100. \t\t\t#C\n", + "dH1 = -57.8 \t\t\t#kcal\n", + "Cp1 = 8.03 \t\t\t#cal deg**-1\n", + "Cp2 = 6.92 \t\t\t#cal deg**-1\n", + "Cp3 = 7.04 \t\t\t#cal deg**-1\n", + "\n", + "# Results\n", + "Cp = Cp1-(Cp2+0.5*Cp3)\n", + "dH2 = Cp*10**-3*(T2-T1)+dH1\n", + "\n", + "# Results\n", + "print 'Standard heat of formation = %.2f kcal mole**-1'%(dH2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard heat of formation = -57.98 kcal mole**-1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "a = -2.776\n", + "b = 0.947*10**-3\n", + "c = 0.295*10**-6\n", + "T1 = 373 \t\t\t#K\n", + "T2 = 298 \t \t\t#K\n", + "dH1 = -57.8 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "dH = a*(T1-T2)+0.5*b*(T1**2-T2**2)+0.33*c*(T1**3-T2**3)\n", + "dH2 = dH1+(dH/1000)\n", + "\n", + "# Results\n", + "print 'Heat obtained = %.f cal '%(dH)\n", + "print ' Smath.tanadard heat of formation = %.2f kcal mole**-1'%(dH2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat obtained = -182 cal \n", + " Smath.tanadard heat of formation = -57.98 kcal mole**-1\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "a1 = 6.189 \n", + "a2 = 3.225\n", + "a3 = 10.421\n", + "b1 = 7.787*10**-3\n", + "b2 = 0.707*10**-3\n", + "b3 = -0.3*10**-3\n", + "c1 = -0.728*10**-6\n", + "c2 = -0.04014*10**-6\n", + "c3 = 0.7212*10**-6\n", + "dH = -9.13 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "a = -(a2+a3-a1)*10**-3\n", + "b = -0.5*(b2+b3-b1)*10**-3\n", + "c = -0.33*(c2+c3-c1)*10**-3\n", + "\n", + "# Results\n", + "print 'a = %.2e kcal mole**-1'%(a)\n", + "print ' b = %.2e kcal mole**-1'%(b)\n", + "print ' c = %.2e kcal mole**-1'%(c)\n", + "print ' dH = %.2f kcal mole**-1'%(dH)\n", + "\n", + "# note : rounding off error.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = -7.46e-03 kcal mole**-1\n", + " b = 3.69e-06 kcal mole**-1\n", + " c = -4.65e-10 kcal mole**-1\n", + " dH = -9.13 kcal mole**-1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dH = 31.39 \t\t\t#kcal\n", + "k1 = 3.397*10**-3 \t\t\t#kcal K**-1\n", + "k2 = -1.68*10**-6 \t\t\t#kcal K**-2\n", + "k3 = -0.022*10**-9 \t\t\t#kcal K**-3\n", + "k4 = 1.17*10**2 \t\t\t#kcal K\n", + "T = 25 \t\t\t#C\n", + "#CALCULTIONS\n", + "H = dH-(k1*(273+T)+k2*(273+T)**2+k3*(273+T)**3+k4*(273+T)**-1)\n", + "\n", + "# Results\n", + "print 'Change in enthalpy = %.2f kcal'%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in enthalpy = 30.13 kcal\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Variables\n", + "dH = 214470 \t\t\t#kcal mole**-1\n", + "a = 72.43 \t \t\t#calmole**-1deg**-1\n", + "b = 13.08*10**-3 \t\t\t#kcalmole**-1\n", + "c = -1.172*10**-6 \t\t\t#kcalmole**-1\n", + "\n", + "# Calculations\n", + "vec =roots([c,b,a,-dH])\n", + "T = vec[2]\n", + "\n", + "# Results\n", + "print 'Temperature = %.f C'%(T+15)\n", + "\n", + "# note : rounding off error because of roots()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 2253 C\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "c1 = 9.3 \t\t\t#cal deg**-1\n", + "c2 = 6.3 \t\t\t#cal deg**-1\n", + "n = 2.\n", + "dH = -57500. \t\t\t#cal\n", + "V = 3. \t\t \t#cc\n", + "v1 = 3.5 \t\t\t#cc\n", + "T1 = 25. \t\t\t#C\n", + "p1 = 1. \t\t\t #atm\n", + "\n", + "# Calculations\n", + "T2 = (-dH/(c1+n*c2))+298\n", + "p2 = p1*V*T2/(v1*(273+T1))\n", + "\n", + "# Results\n", + "print 'Temperature final = %.f K'%(round(T2,-1))\n", + "print ' pressure final = %.1f atm'%(p2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature final = 2920 K\n", + " pressure final = 8.4 atm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Hc = 234.4 \t\t\t#kcal\n", + "Hdc = 300 \t\t\t#kcal\n", + "Hch = 436.5 \t\t\t#kcal\n", + "Hco = 152 \t\t\t#kcal\n", + "Hsco = 70 \t\t\t#kcal\n", + "Hoh = 110.2 \t\t\t#kcal\n", + "Hoo = 885 \t\t\t#kcal\n", + "Hb = 38 \t\t\t#kcal\n", + "Hc = 28 \t\t\t#kcal\n", + "Ha = 206 \t\t\t#kcal\n", + "H1co = 2128 \t\t\t#kcal\n", + "H1oh = 661 \t\t\t#kcal\n", + "H1c = 231 \t\t\t#kcal\n", + "\n", + "# Calculations\n", + "dH = Hc+Hdc+Hch+Hco+Hsco+Hoh+Hoo+Ha+Hb+Hc-H1co-H1oh-H1c\n", + "\n", + "# Results\n", + "print 'Heat of combustion = %.f kcal'%(dH)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat of combustion = -766 kcal\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |