diff options
author | Trupti Kini | 2016-12-31 23:30:44 +0600 |
---|---|---|
committer | Trupti Kini | 2016-12-31 23:30:44 +0600 |
commit | 572889bfa4539150ef23cd89cbc888b2696b3d0a (patch) | |
tree | 2df0930dc7f6d157e131e5b2f881b42fc1153886 | |
parent | 8826fb0a35de320edd7a4c35fe6fc08b1ea67470 (diff) | |
download | Python-Textbook-Companions-572889bfa4539150ef23cd89cbc888b2696b3d0a.tar.gz Python-Textbook-Companions-572889bfa4539150ef23cd89cbc888b2696b3d0a.tar.bz2 Python-Textbook-Companions-572889bfa4539150ef23cd89cbc888b2696b3d0a.zip |
Added(A)/Deleted(D) following books
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_0XMpH6D.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_1bYvsqm.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2FzgemP.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2wnGzgB.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3D0WenJ.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3Qk3YZ9.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3RZopIG.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3oVSGJI.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3z34ofU.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_47uzEPc.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_4wLOrg1.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_5y05ccc.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_6abjRKa.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_7YykOlL.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ArpsUYU.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_CaxDA59.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cg9aASj.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cmjo0dZ.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cyc7Mmj.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_D3h4rOH.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_DX44zmR.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_EDdenY2.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Gn8Ls8Q.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_H2F1LxB.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_HQ89OkI.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Hl9us6l.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_KWcC9YQ.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_L0LVinK.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Lf8vdtw.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MPQmYM0.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MS7AyON.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_OjcoXgK.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PE5hkZJ.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoMDUmn.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoWqLvV.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_QHlxeI4.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_SRvof3X.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_T5WJU5x.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TRgyMmv.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TyFMWWo.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UE2LpyX.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_URNYBHc.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UpRo20c.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_XbL429a.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Xc77DNt.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2GPb6S.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2ay0Yh.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_YCfgqux.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dUCVVeV.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dr124eb.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_fGocR0T.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_gZhr0WW.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_hEpVYUR.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_id1VlbC.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_imWpKyi.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ipvWUNm.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_itFEv6b.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_iujxmeR.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_l7idTmT.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_lzYYAbC.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_n1PODAI.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_nYm4CuE.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_oGvJtYD.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_p39uorO.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pDWrAlY.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pFmGzk0.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pYROsHW.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pmrshQK.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_rZBRh0H.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_uhvyTbu.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_wQuh21z.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xaYpfMh.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xseHUNW.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_yCvUz4t.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zG1ujSS.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zKb7eGR.ipynb
76 files changed, 25352 insertions, 0 deletions
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_0XMpH6D.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_0XMpH6D.ipynb new file mode 100644 index 00000000..bfc29594 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_0XMpH6D.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Statistical Thermodyanamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.2:pg-374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Internal energy to be 1000.0 J temperature will be 449.0 K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "U = 1.00e3 #Total internal energy, J\n", + "hnu = 1.00e-20 #Energy level separation, J\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1 #Number of moles, mol\n", + "\n", + "#Calcualtions\n", + "T = hnu/(k*log(n*NA*hnu/U-1.))\n", + "\n", + "#Results\n", + "print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.3:pg-378" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of excited state is 1.57e-19 J\n", + "Electronic partition function qE is 3.000e+00\n", + "Electronic contribution to internal enrgy is 3.921e-06 J\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "g0 = 3.0 #Ground State partition function\n", + "labda = 1263e-9 #Wave length in nm\n", + "T = 500. #Temperature, K\n", + "c = 3.00e8 #Speed of light, m/s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1.0 #Number of moles, mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "\n", + "#Calcualtions\n", + "beta = 1./(k*T)\n", + "eps = h*c/labda\n", + "qE = g0 + exp(-beta*eps)\n", + "UE = n*NA*eps*exp(-beta*eps)/qE\n", + "\n", + "#Results\n", + "print 'Energy of excited state is %4.2e J'%eps\n", + "print 'Electronic partition function qE is %4.3e'%qE\n", + "print 'Electronic contribution to internal enrgy is %4.3e J'%UE" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.5:pg-387" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 2.25e-11 m3\n", + "Std. Molar entropy for Ne is 145.46 J/(mol.K)\n", + "Thermal wave lengths for Kr is 1.11e-11 m3\n", + "Std. Molar entropy for Kr is 163.18 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log, pi, sqrt\n", + "\n", + "#Variable Declaration\n", + "Mne = 0.0201797 #Molecular wt of ne, kg/mol \n", + "Mkr = 0.0837980 #Molecular wt of kr, kg/mol\n", + "Vmne = 0.0224 #Std. state molar volume of ne, m3\n", + "Vmkr = 0.0223 #Std. state molar volume of kr, m3\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298 #Std. state temeprature,K \n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "mne = Mne/NA\n", + "mkr = Mkr/NA\n", + "Labdane = sqrt(h**2/(2*pi*mne*k*T))\n", + "Labdakr = sqrt(h**2/(2*pi*mkr*k*T))\n", + "Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)\n", + "Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane\n", + "print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne\n", + "print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr\n", + "print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.8:pg-392" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 4.09e-33 m3\n", + "The Gibbs energy for 1 mol of Ar is -39.97 kJ\n" + ] + } + ], + "source": [ + "from math import log, pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Moleculat wt of Ar, kg/mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298.15 #Std. state temeprature,K \n", + "P = 1e5 #Std. state pressure, Pa\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "m = M/NA\n", + "Labda3 = (h**2/(2*pi*m*k*T))**(3./2)\n", + "G0 = -n*R*T*log(k*T/(P*Labda3))\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3\n", + "print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_1bYvsqm.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_1bYvsqm.ipynb new file mode 100644 index 00000000..81a699eb --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_1bYvsqm.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Complex Reaction Mechanism " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.1:pg-511" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEQCAYAAACTEVJTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1VW9//HXGxQvGKaVKKg4oih4Q8Jbao6kqJ3yUh5F\nK6VDHhUUL13E+hF4SFPLJDW7mIXXSK28pCEYZywTFAQEARERFAYBFcXEGzCf3x/rC2w5Mzgz7D3f\nPTPv5+MxD/as+X73fu8B5jNrre93LUUEZmZmxdIm7wBmZtayuLCYmVlRubCYmVlRubCYmVlRubCY\nmVlRubCYmVlRbZZ3gHIgyddcm5k1UESotnb3WDIRUZYfw4YNyz1Dc8xW7vmcrWXmK+dsxc63MS4s\nZmZWVC4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cAu2eZskX39\nY/fWiIhlEfG1iHBRsaJxYTFrmBrSdrnrSNpC0tHZ430lnS7pKEnflbS3pP0kHSupt6TzsuN6Z8d8\nr64XiogngK4RMSnbzOz1SNtDH0I22S6pA7CcVFi6AIdmw1sHU/oNr8xq5cJi1jB/Aw7doO10oEpS\nZ9KE/h8j4nFgAfA28B8RMS7SdrttJe0HfBaYCHw628URSbsVPqmkLYH3sk97s34O5z+AxyUdkLU/\nE2mL4d2Bd7JjXFgsNy4sZg0QEXOAX0i6TtIASWeQdogMYCBp1761x94LnAOMLniKCuCdiPg1sApo\nGxErs4n1xzZ4uX2Bf2SP9wP+N3u8gLQV87bAj4EvZ+1PRMS07PLjnsCRxXjPZg3lHSTNikTSlcBV\nWaFoC+xF2mP8hxHxgaTts8cXZ8efQdoqdkVErJZ0VNbTMWvWXFjMiiQbCjuBtH84EfGvbHjrYOBl\nUqH5Y1Zkzib1KGqA8yKiRlLfiBibS3izInJhMTOzovIci5mZFZULi5mZFZULi5mZFZULi5mZFZUL\ni5mZFZULi5mZFZULi5mZFZULi5mZFZULi5mZFdX/B8J/v5b87GuOAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9aa4048>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Km and k2 are 10.0 mM and 1.1e+05 s-1\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from numpy import arange,array,ones,linalg,size\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ce = 2.3e-9 #Initial value of enzyme concentration, M\n", + "r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])\n", + "CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])\n", + "\n", + "#Calculations\n", + "rinv = 1./r\n", + "CCO2inv = 1./CCO2\n", + "xlim(0,850)\n", + "ylim(0,38000)\n", + "xi = CCO2inv\n", + "A = array([ CCO2inv, ones(size(CCO2inv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters\n", + "slope = w[0]\n", + "intercept = w[1]\n", + "\n", + "line = w[0]*CCO2inv+w[1] # regression line\n", + "plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')\n", + "xlabel('$ {C_{CO}}_2, mM^{-1} $')\n", + "ylabel('$ Rate^{-1}, s/M^{-1} $')\n", + "show()\n", + "rmax = 1./intercept\n", + "k2 = rmax/Ce\n", + "Km = slope*rmax\n", + "\n", + "#Results\n", + "print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.2:pg-517" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH11JREFUeJzt3Xl4VdW5x/HvGwQH2jrUOhCEplEBrViqRlqnoFKnKk6t\nxaJFRa0KVXHAKQ3ctF5HtIqtYq3cXrXcVm8pV8WSWtMWKYooqJgwpigJ1aJCBSdM3vvHOsghJuTk\nZOfsM/w+z5MnZ5+z98mbTcIve6291jJ3R0REJApFcRcgIiL5Q6EiIiKRUaiIiEhkFCoiIhIZhYqI\niERGoSIiIpGJLVTM7FgzqzOzxWY2rpXXzzSzBYmPWWY2MNVjRUQkHhbHOBUzKwIWA0cBjcBc4Hvu\nXpe0z2Cg1t3XmtmxwHh3H5zKsSIiEo+4rlTKgCXuvsLdNwBTgWHJO7j7HHdfm9icAxSneqyIiMQj\nrlApBt5I2l7JptBozShgRprHiohIhmwVdwHtMbMhwDnAoXHXIiIiWxZXqDQAfZK2eyee20yic34y\ncKy7v9uRYxPHa2IzEZE0uLulc1xczV9zgT3NrK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OhItJCYgr8O8zsxDZ2aWqxfTDwYtJ2b2BR0vbixOp6\nAHu7++LE47p0a0wsJrUfYdJDA9a6+xx0lSIxU6iIdEBiCvC5LZ4uA/6QeH03wgp6Uze+6O7zE6/t\nSVgXfOPzC8zsBGDnxMeTwBeBbwM7ANsD9yR23+y5xJonjS1q24WwiNKRwEOd/25FOk6hItIxBySW\nmk02CChNhMbngeNbrPm+URnw/MYNM9sbGOHuwxNLtV4M3A28B/wZ+Iu7f5S4KWCz51orzN3fAr7f\nuW9PpHMUKiIds1nzkpl9BVjh7o+lcGwZ8HTS9g+ARxKP+wDvJvpaDiT0u2wAcPdFLZ8TyVa6+0uk\nbS0DpB+b95VA6E959jMHmn25lfc7iKQrFaAHsCLx+DuEdeEBerQSHq09J5J1FCoiLZhZTzO7DOhv\nZpeZ2XaJl8qBmqT9DgcuAHZJ9GdsfL4X8Kek7f3N7EpgIHCqmX0p8dL9wDGJFRcfdfclZtaXzTv9\nae05kWyllR9FUmRmo919Uvt7gpkd4e5/6eqaRLKNrlREUpAYpd7QgUO27qpaRLKZrlREUmBm3wUe\nb+OuLhFJUKiIiEhk1PwlIiKRUaiIiEhkFCoiIhIZhYqIiERGoSIiIpFRqIiISGQUKiIiEhmFioiI\nREahIiIikfl//rBLh3QxZCwAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9acd4a8>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3\n", + "K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K\n", + "P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr\n", + "\n", + "#Calculations\n", + "Vinv = 1./Vads\n", + "Pinv =1./P\n", + "xlim(0,0.5)\n", + "ylim(0,0.2)\n", + "A = array([ Pinv, ones(size(Pinv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters\n", + "m = w[0]\n", + "c = w[1]\n", + "line = m*Pinv+c # regression line\n", + "plot(Pinv,line,'r-',Pinv,Vinv,'o')\n", + "xlabel('$ 1/P, Torr^{-1} $')\n", + "ylabel('$ 1/V_{abs}, cm^{-1}g $')\n", + "show()\n", + "Vm = 1./c\n", + "K = 1./(m*Vm)\n", + "\n", + "#Results\n", + "print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)\n", + "print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.4:pg-533" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFRJREFUeJzt3XuUXHWV6PHvjvgMDioIToKGJoBwQURACIjQqIwEVBjH\npaKo8UGiCPhARLm0CZO7RgGvIg9FBUVwIjg+eCgK4dFABBQTwiOIkNiGkEBUEJBGckOy7x+nmhSh\n0+mudNWpx/ezVi+qq86p2j/S6Z39+/3O2ZGZSJJUizFlByBJal0mEUlSzUwikqSamUQkSTUziUiS\namYSkSTVrKWTSEScGxHLI+L2YRz7tYi4NSLmRcQfI+LhRsQoSe0sWvk6kYjYB3gcOD8zdx7BeUcB\nu2Tmx+oWnCR1gJauRDJzDvD36uciYuuI+FVE3BIR10XEdoOcehjwo4YEKUltbKOyA6iD7wDTMnNR\nROwBfA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JCJJqplJRJJUM5OIJKlmJhFJUs1MIpKkmplEJEk1a4Z7Z0mli4jPU9wx\n+FSKW0IcBByTmfcN8/xXAJ+kuEfbo8A/gBdn5vnDPP8TFLfq6cqqexRFxEXAE8DJmXn38EckNYZJ\nRCr8DtgkM88FiIiJFP0VzljfiRGxNfBt4D2Z+XDlubOo3MRumG6huBHjBOChynu8DtgYOCEzF43g\nvaSGcTpLKuwJzAGIiM2AvYFLh3nuBRTdFx+uem4eRWIYrgnADTzzzqobU9xXywSipmUlIhVeDyyM\niMnA4cDHgVdWppleAmwCnJWZc6pPioi9KKatrlnr/S7MzP4RfH5Q3IJ7QtX79lFeCwNpWEwiUmHT\nzPwpQET8EfghRdfBf1D0sb8uM1dExEuBtwErMvPHwF7AdWu/WWb2D3Ls+iwB9omIjSiaqO1CMc0m\nNS2ns9TxImIcz/wX/9+AHTPzHmB34NrMXFF57ViKftQvqHy/GnhGxRERz4+IN1Ud+8L1fP6/AA9T\nJJEJwKTMvJmiD7ZJRE3NJCIVv6znVX1/BEXPD4DnZ+bKqte2A15LsV4BRf/3SWu937uB3qpjxw68\nEBFbDfL5uwNzs+iYtzXweFVcJhE1NZOIOlpEdFOsf2wXEUdGxJcofpEfFRETgLlrnfJAZv4eeEVE\nbJyZfwTOioj/GxEfjYjDgMsyc/Xax1YqnqvW+vw3AF8G3l55ak5mzq+sxewCvLE+I5dGh02ppBGI\niD0pqpDx67sGZLBjI2K/zHzWGorUqlxYl0YgM3+7gcc+fxTDkUpnJSJJqplrIpKkmplEJEk1M4lI\nkmpmEpEk1cwkIkmqmUlEklQzk4gkqWYmEUlSzf4/9Fa7EFJttIoAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0xa641f28>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M\n", + "tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s\n", + "\n", + "#Calculations\n", + "Tfinv = 1./tf\n", + "xlim(0,0.006)\n", + "ylim(0,2.e7)\n", + "A = array([ CBr, ones(size(CBr))])\n", + "# linearly generated sequence\n", + "[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters\n", + "\n", + "line = m*CBr+c # regression line\n", + "plot(CBr,line,'r-',CBr,Tfinv,'o')\n", + "xlabel('$ Br_6C_6, M $')\n", + "ylabel('$ tau_f $')\n", + "show()\n", + "\n", + "#Results\n", + "print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.5:pg-536" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Separation Distance at decreased efficiency 11.53\n" + ] + } + ], + "source": [ + "from scipy.optimize import root\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = 11. #Distance of residue separation, °A\n", + "r0 = 9. #Initial Distance of residue separation, °A\n", + "EffD = 0.2 #Fraction decrease in eff\n", + "\n", + "#Calculations\n", + "Effi = r0**6/(r0**6+r**6)\n", + "Eff = Effi*(1-EffD)\n", + "f = lambda r: r0**6/(r0**6+r**6) - Eff\n", + "sol = root(f, 12)\n", + "rn = sol.x[0]\n", + "\n", + "#Results\n", + "print 'Separation Distance at decreased efficiency %4.2f'%rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.6:pg-538" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total photon energy absorbed by sample 2.7e+03 J\n", + "Photon energy absorbed at 280 nm is 7.1e-19 J\n", + "Total number of photon absorbed by sample 3.8e+21 photones\n", + "Overall quantum yield 0.40\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "mr = 2.5e-3 #Moles reacted, mol\n", + "P = 100.0 #Irradiation Power, J/s\n", + "t = 27 #Time of irradiation, s\n", + "h = 6.626e-34 #Planks constant, Js\n", + "c = 3.0e8 #Speed of light, m/s\n", + "labda = 280e-9 #Wavelength of light, m\n", + "\n", + "#Calculation\n", + "Eabs = P*t\n", + "Eph = h*c/labda\n", + "nph = Eabs/Eph #moles of photone\n", + "phi = mr/6.31e-3\n", + "\n", + "#Results\n", + "print 'Total photon energy absorbed by sample %3.1e J'%Eabs\n", + "print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph\n", + "print 'Total number of photon absorbed by sample %3.1e photones'%nph\n", + "print 'Overall quantum yield %4.2f'%phi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.7:pg-542" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DGS = 0.111 eV\n", + "Rate constant with barrier to electron transfer 2.66e+07 per s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "#Variable Declarations\n", + "r = 2.0e9 #Rate constant for electron transfer, per s\n", + "labda = 1.2 #Gibss energy change, eV\n", + "DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "T = 298.0 #Temeprature, K\n", + "#Calculation\n", + "DGS = (DG+labda)**2/(4*labda)\n", + "k193 = r*exp(-DGS*1.6e-19/(k*T))\n", + "#Results\n", + "print 'DGS = %5.3f eV'%DGS\n", + "print 'Rate constant with barrier to electron transfer %3.2e per s'%k193" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2FzgemP.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2FzgemP.ipynb new file mode 100644 index 00000000..504b170b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2FzgemP.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 09: Ideal and Real Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.2:pg-212" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gibbs energy change of mixing is -1.371e+04 J\n", + "Gibbs energy change of mixing is < 0, hence the mixing is spontaneous\n", + "Entropy change of mixing is 45.99 J/K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "dGmix = n*R*T*(xb*log(xb)+xt*log(xt))\n", + "dSmix = -n*R*(xb*log(xb)+xt*log(xt))\n", + "\n", + "#Results\n", + "print 'Gibbs energy change of mixing is %4.3e J'%dGmix\n", + "print 'Gibbs energy change of mixing is < 0, hence the mixing is spontaneous'\n", + "print 'Entropy change of mixing is %4.2f J/K'%dSmix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.3:pg-214" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total pressure of the vapor is 69.8 torr\n", + "Benzene fraction in vapor is 0.837 \n", + "Toulene fraction in vapor is 0.163 \n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "P = xb*P0b + xt*P0t\n", + "y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "yt = 1.-y\n", + "\n", + "#Results\n", + "print 'Total pressure of the vapor is %4.1f torr'%P\n", + "print 'Benzene fraction in vapor is %4.3f '%y\n", + "print 'Toulene fraction in vapor is %4.3f '%yt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.4:pg-215" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass Balance: 6.75*x + 1.5*y - 5.0\n", + "Pressure and x: P - 67.5*x - 28.9\n", + "Pressure and y: y - 0.0148148148148148*(96.4*P - 2785.96)/P\n", + "Pressure is 66.8 torr\n", + "Mole fraction of benzene in liquid phase 0.561\n", + "Mole fraction of benzene in vapor phase 0.810\n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "nv = 1.5 #moles vaporized, mol\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "nl = n - nv\n", + "zb = nb/n\n", + "\n", + "x,y, P = symbols('x y P')\n", + "e1 = nv*(y-zb)-nl*(zb-x)\n", + "print 'Mass Balance:', e1\n", + "e2 = P - (x*P0b + (1-x)*P0t)\n", + "print 'Pressure and x:',e2\n", + "e3 = y - (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "print 'Pressure and y:', e3\n", + "equations = [e1,e2,e3]\n", + "sol = solve(equations)\n", + "\n", + "#Results\n", + "for i in sol:\n", + " if ((i[x] > 0.0 and i[x] <1.0) and (i[P] > 0.0) and (i[y]>zb and i[y]<1.0)):\n", + " print 'Pressure is %4.1f torr' %i[P]\n", + " print 'Mole fraction of benzene in liquid phase %4.3f' %i[x]\n", + " print 'Mole fraction of benzene in vapor phase %4.3f' %i[y]\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.6:pg-222" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Freezing point depression -3.94 K\n", + "Molecualr wt of solute 274.2 g/mol\n", + "Vapor pressure of solvent is reduced by a factor of 0.980\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 4.50 #Mass of substance dissolved, g\n", + "ms = 125.0 #Mass of slovent (CCl4), g\n", + "TbE = 0.65 #Boiling point elevation, °C\n", + "Kf, Kb = 30.0, 4.95 #Constants for freezing point elevation \n", + " # and boiling point depression for CCl4, K kg/mol\n", + "Msolvent = 153.8 #Molecualr wt of solvent, g/mol\n", + "#Calculations\n", + "DTf = -Kf*TbE/Kb\n", + "Msolute = Kb*m/(ms*1e-3*TbE)\n", + "nsolute = m/Msolute\n", + "nsolvent = ms/Msolvent \n", + "x = 1.0 - nsolute/(nsolute + nsolvent)\n", + "\n", + "#Results\n", + "print 'Freezing point depression %5.2f K'%DTf\n", + "print 'Molecualr wt of solute %4.1f g/mol'%Msolute\n", + "print 'Vapor pressure of solvent is reduced by a factor of %4.3f'%x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.7:pg-223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Osmotic pressure 12.23 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "csolute = 0.500 #Concentration of solute, g/L\n", + "R = 8.206e-2 #Gas constant L.atm/(mol.K)\n", + "T = 298.15 #Temperature of the solution, K\n", + "\n", + "#Calculations\n", + "pii = csolute*R*T\n", + "\n", + "#Results\n", + "print 'Osmotic pressure %4.2f atm'%pii\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.8:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.6994 atm\n", + "Activity coefficinet of CS2 1.9971 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "p0CS2 = 512.3 #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/p0CS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.9:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.1783 atm\n", + "Activity coefficinet of CS2 0.5090 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "kHCS2 = 2010. #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/kHCS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.10:pg-231" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Henrys constant = 143.38 torr\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "rho = 789.9 #Density of acetone, g/L\n", + "n = 1.0 #moles of acetone, mol\n", + "M = 58.08 #Molecular wt of acetone, g/mol\n", + "kHacetone = 1950 #Henrys law constant, torr\n", + "#Calculations\n", + "H = n*M*kHacetone/rho\n", + "\n", + "#Results\n", + "print 'Henrys constant = %5.2f torr'%H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.11:pg-232" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity coefficient = 0.969\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 0.5 #Mass of water, kg\n", + "ms = 24.0 #Mass of solute, g\n", + "Ms = 241.0 #Molecular wt of solute, g/mol\n", + "Tfd = 0.359 #Freezinf point depression, °C or K\n", + "kf = 1.86 #Constants for freezing point depression for water, K kg/mol\n", + "\n", + "#Calculations\n", + "msolute = ms/(Ms*m)\n", + "gama = Tfd/(kf*msolute)\n", + "\n", + "#Results\n", + "print 'Activity coefficient = %4.3f'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.12:pg-233" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of moles of nitrogen in blood at 1 and 50 bar are 2.46e-03,0.123 mol\n", + "Volume of nitrogen released from blood at reduced pressure 2.981 L\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 70.0 #Mass of human body, kg\n", + "V = 5.00 #Volume of blood, L\n", + "HN2 = 9.04e4 #Henry law constant for N2 solubility in blood, bar\n", + "T = 298.0 #Temperature, K\n", + "rho = 1.00 #density of blood, kg/L\n", + "Mw = 18.02 #Molecualr wt of water, g/mol\n", + "X = 80 #Percent of N2 at sea level\n", + "p1, p2 = 1.0, 50.0 #Pressures, bar\n", + "R = 8.314e-2 #Ideal Gas constant, L.bar/(mol.K)\n", + "#Calculations\n", + "nN21 = (V*rho*1e3/Mw)*(p1*X/100)/HN2\n", + "nN22 = (V*rho*1e3/Mw)*(p2*X/100)/HN2\n", + "V = (nN22-nN21)*R*T/p1\n", + "#Results\n", + "print 'Number of moles of nitrogen in blood at 1 and 50 bar are %3.2e,%3.3f mol'%(nN21,nN22)\n", + "print 'Volume of nitrogen released from blood at reduced pressure %4.3f L'%V" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2wnGzgB.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2wnGzgB.ipynb new file mode 100644 index 00000000..887d09f2 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_2wnGzgB.ipynb @@ -0,0 +1,419 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Elementary Chemical Kinetics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.2:pg-461" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Order of reaction with respect to reactant A: 2.00\n", + "Order of reaction with respect to reactant A: 1.00\n", + "Rate constant of the reaction: 3.201e+08 1./(M.s)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "Ca0 = [2.3e-4,4.6e-4,9.2e-4] #Initial Concentration of A, M\n", + "Cb0 = [3.1e-5,6.2e-5,6.2e-5] #Initial Concentration of B, M\n", + "Ri = [5.25e-4,4.2e-3,1.68e-2] #Initial rate of reaction, M\n", + "\n", + "#Calculations\n", + "alp = log(Ri[1]/Ri[2])/log(Ca0[1]/Ca0[2])\n", + "beta = (log(Ri[0]/Ri[1]) - 2*log((Ca0[0]/Ca0[1])))/(log(Cb0[0]/Cb0[1]))\n", + "k = Ri[2]/(Ca0[2]**2*Cb0[2]**beta)\n", + "\n", + "#REsults\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%alp\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%beta\n", + "print 'Rate constant of the reaction: %4.3e 1./(M.s)'%k" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.3:pg-466" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 3.381e-05 1/s\n", + "Timerequire for 60 percent decay of N2O5: 1.511e+04 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 2.05e4 #Half life for first order decomposition of N2O5, s\n", + "x = 60. #percentage decay of N2O5\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.4:pg-467 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 1.203e-04 1/s\n", + "Timerequire for 60 percent decay of N2O5: 4.245e+03 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 5760 #Half life for C14, years\n", + "\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.5:pg-472" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time required for maximum concentration of A: 13.86 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "kAbykI = 2.0 #Ratio of rate constants\n", + "kA = 0.1 #First order rate constant for rxn 1, 1/s \n", + "kI = 0.05 #First order rate constant for rxn 2, 1/s \n", + "#Calculations\n", + "tmax = 1/(kA-kI)*log(kA/kI)\n", + "\n", + "#Results\n", + "print 'Time required for maximum concentration of A: %4.2f s'%tmax" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.7:pg-476" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: 6.67 \n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "T = 22.0 #Temperature of the reaction,°C\n", + "k1 = 7.0e-4 #Rate constants for rxn 1, 1/s\n", + "k2 = 4.1e-3 #Rate constant for rxn 2, 1/s \n", + "k3 = 5.7e-3 #Rate constant for rxn 3, 1/s \n", + "#Calculations\n", + "phiP1 = k1/(k1+k2+k3)\n", + "\n", + "#Results\n", + "print 'Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: %4.2f '%(phiP1*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.8:pg-477" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEWCAYAAADLkvgyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVNW1x/HvhgZnjIIKNCqTKCKCiIAYsCQhIlFQE0fU\naIyKs4JTjEjHNgkaRY04GzEOUaMhMWL02UZb4oAiCLYgogQ1gsPDCXwOiOz3xymkabuaBqrq3Kr6\nfdaqRdWtc+/dfVe5tufcc/cxd0dERCSmJrEDEBERUTISEZHolIxERCQ6JSMREYlOyUhERKJTMhIR\nkegSmYzM7HQze9XMasxsXIY2Q8xsrpnNM7Pz8x2jiIhkT1nsAOoysxRwANDd3ZebWat62jQBJgA/\nABYB08zsQXefm9dgRUQkK5LYMzoZGOfuywHcfXE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tNvb3Z/KR0wi\nhUI9I5EsSFdAWNjI5hvkMhaRQqSekUgWpB9wnezun8eORaQQKRmJiEh0GqYTEZHolIxERCQ6JSMR\nEYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR6P4ffTyAN3dtCVsAAAAASUVORK5C\nYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9358710>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are, -6419.8 and 14.45\n", + "Pre-exponential factor and Activation energy are 53.37 kJ/mol and 1.88e+06 1/s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot, show, xlabel, ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "T = array([22.7,27.2,33.7,38.0])\n", + "k1 = array([7.e-4,9.8e-4,1.6e-3,2.e-3])\n", + "R = 8.314 \n", + "\n", + "#Calculations\n", + "T = T +273.15\n", + "x = 1./T\n", + "y = log(k1)\n", + "A = array([ x, ones(size(x))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,y)[0] # obtaining the parameters\n", + "\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*x+intercept # regression line\n", + "#Results\n", + "plot(x,line,'-',x,y,'o')\n", + "xlabel('$ 1/T, K^{-1} $')\n", + "ylabel('$ log(k) $')\n", + "show()\n", + "Ea = -slope*R\n", + "A = exp(intercept)\n", + "print 'Slope and intercept are, %6.1f and %4.2f'%(slope, intercept)\n", + "print 'Pre-exponential factor and Activation energy are %4.2f kJ/mol and %4.2e 1/s'%(Ea/1e3, A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.9:pg-482" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 4.34e+08 1/s\n", + "Backward Rate constant is 4.34e+04 1/s\n", + "Apperent Rate constant is 4.34e+08 1/s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "Ea = 42.e3 #Activation energy for reaction, J/mol\n", + "A = 1.e12 #Pre-exponential factor for reaction, 1/s\n", + "T = 298.0 #Temeprature, K\n", + "Kc = 1.0e4 #Equilibrium constant for reaction\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "#Calculations\n", + "kB = A*exp(-Ea/(R*T))\n", + "kA = kB*Kc\n", + "kApp = kA + kB\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%kA\n", + "print 'Backward Rate constant is %4.2e 1/s'%kB\n", + "print 'Apperent Rate constant is %4.2e 1/s'%kApp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.10:pg-492" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated rate 6.4e+13 1/(M.s) is far grater than experimental value of 4.0e+07 1/(M.s), \n", + "hence the reaction is not diffusion controlled\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Variable Declaration\n", + "Dh = 7.6e-7 #Diffusion coefficient of Hemoglobin, cm2/s\n", + "Do2 = 2.2e-5 #Diffusion coefficient of oxygen, cm2/s\n", + "rh = 35. #Radius of Hemoglobin, °A\n", + "ro2 = 2.0 #Radius of Oxygen, °A\n", + "k = 4e7 #Rate constant for binding of O2 to Hemoglobin, 1/(M.s)\n", + "NA =6.022e23 #Avagadro Number\n", + "#Calculations\n", + "DA = Dh + Do2\n", + "kd = 4*pi*NA*(rh+ro2)*1e-8*DA\n", + "\n", + "#Results\n", + "print 'Estimated rate %4.1e 1/(M.s) is far grater than experimental value of %4.1e 1/(M.s), \\nhence the reaction is not diffusion controlled'%(kd,k)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.11:pg-494" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 9.90e+04 1/s\n", + "Backward Rate constant is -12.72 1/s\n" + ] + } + ], + "source": [ + "from math import log, e\n", + "#Variable Declaration\n", + "Ea = 104e3 #Activation energy for reaction, J/mol\n", + "A = 1.e13 #Pre-exponential factor for reaction, 1/s\n", + "T = 300.0 #Temeprature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "h = 6.626e-34 #Plnak constant, Js\n", + "c = 1.0 #Std. State concentration, M\n", + "k = 1.38e-23 #,J/K\n", + "\n", + "#Calculations\n", + "dH = Ea - 2*R*T\n", + "dS = R*log(A*h*c/(k*T*e**2))\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%dH\n", + "print 'Backward Rate constant is %4.2f 1/s'%dS" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3D0WenJ.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3D0WenJ.ipynb new file mode 100644 index 00000000..6d251294 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3D0WenJ.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Transport Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.1:pg-427" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion coefficient of Argon 1.1e-05 m2/s\n" + ] + } + ], + "source": [ + "from scipy import constants\n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Molecualar wt of Argon, kh/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "DAr = (1./3)*sqrt(8*R*T/(pi*M))*(R*T/(P*N_A*sqrt(2)*sigm))\n", + "\n", + "#Results\n", + "print 'Diffusion coefficient of Argon %3.1e m2/s'%DAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.2:pg-428" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of collision cross sections of Helium to Argon 0.790\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "DHebyAr = 4.0 \n", + "MAr, MHe = 39.9, 4.0 #Molecualar wt of Argon and Neon, kg/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "sigHebyAr = (1./DHebyAr)*sqrt(MAr/MHe)\n", + "\n", + "#Results\n", + "print 'Ratio of collision cross sections of Helium to Argon %4.3f'%sigHebyAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.3:pg-430" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rms displacement at 1000 and 10000 is 0.141 and 0.447 m respectively\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "D = 1.0e-5 #Diffusion coefficient, m2/s \n", + "t1 = 1000 #Time, s\n", + "t10 = 10000 #Time, s\n", + "\n", + "#Calculations\n", + "xrms1 = sqrt(2*D*t1)\n", + "xrms10 = sqrt(2*D*t10)\n", + "\n", + "#Results\n", + "print 'rms displacement at %4d and %4d is %4.3f and %4.3f m respectively'%(t1,t10,xrms1,xrms10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.4:pg-432" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time per random walk is 2.045e-11 s or 20.45 ps\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "D = 2.2e-5 #Diffusion coefficient of benzene, cm2/s \n", + "x0 = 0.3 #molecular diameter of benzene, nm\n", + "\n", + "#Calculations\n", + "t = (x0*1e-9)**2/(2*D*1e-4)\n", + "\n", + "#Results\n", + "print 'Time per random walk is %4.3e s or %4.2f ps'%(t,t/1e-12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.5:pg-434" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean free path 2.627e-07 m and collisional cross section 1.10e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "CvmbyNA = 3.*k/2\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "labda = 3*kt/(CvmbyNA*nuavg*N)\n", + "sigm = 1/(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Mean free path %4.3e m and collisional cross section %4.2e m2'%(labda, sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.6:pg-437" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional cross section 2.74e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 227. #Viscosity of Ar, muP\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "m = M*1e-3/NA\n", + "labda = 3.*eta*1e-7/(nuavg*N*m) #viscosity in kg m s units\n", + "sigm = 1./(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Collisional cross section %4.2e m2'%(sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.7:pg-439" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Flow rate is 2.762e-06 m3/s\n", + "Cylinder can be used for 4.381e+06 s nearly 50.7 days\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "m = 22.7 #Mass of CO2, kg\n", + "T = 293.0 #Temperature, K\n", + "L = 1.0 #length of the tube, m\n", + "d = 0.75 #Diameter of the tube, mm\n", + "eta = 146 #Viscosity of CO2, muP\n", + "p1 = 1.05 #Inlet pressure, atm\n", + "p2 = 1.00 #Outlet pressure, atm\n", + "atm2pa = 101325 #Conversion for pressure from atm to Pa \n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "R = 8.314 #Molar Gas constant, J mol^-1 K^-1\n", + "\n", + "#Calculations\n", + "p1 = p1*atm2pa\n", + "p2 = p2*atm2pa\n", + "F = pi*(d*1e-3/2)**4*(p1**2-p2**2)/(16.*eta/1.e7*L*p2)\n", + "nCO2 = m/M\n", + "v = nCO2*R*T/((p1+p2)/2)\n", + "t = v/F\n", + "\n", + "#Results\n", + "print 'Flow rate is %4.3e m3/s'%(F)\n", + "print 'Cylinder can be used for %4.3e s nearly %3.1f days'%(t, t/(24*3600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.8:pg-441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of protein is 3.550 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 0.891 #Viscosity of hemoglobin in water, cP\n", + "T = 298.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "D = 6.9e-11 #Diffusion coefficient, m2/s \n", + "\n", + "#Calculations\n", + "r = k*T/(6*pi*eta*1e-3*D)\n", + "\n", + "#Results\n", + "print 'Radius of protein is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.9:pg-442" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of Lysozyme particle is 1.937 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "s = 1.91e-13 #Sedimentation constant, s\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 14100.0 #Molecualr wt of lysozyme, g/mol\n", + "rho = 0.998 #Density of water, kg/m3\n", + "eta = 1.002 #Viscosity lysozyme in water, cP\n", + "T = 293.15 #Temperature, K\n", + "vbar = 0.703 #Specific volume of cm3/g\n", + "\n", + "#Calculations\n", + "m = M/NA\n", + "f = m*(1.-vbar*rho)/s\n", + "r = f/(6*pi*eta)\n", + "\n", + "#Results\n", + "print 'Radius of Lysozyme particle is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.10:pg-443" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAETCAYAAAAVhSD9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4lOW9//H3F2lcqlCXU5SAEINbUVBQREGJCwrYymnP\nUq22im3FBVFxrb3yKz2prfZYXIqniFKXqgWXKlTREsW4YNkKAWQRiIFCIigqm1YCyff3x/0g0ymB\nkEzyzPJ5XZeXM8/cM/OZXMZvvnM/z32buyMiIpIqreIOICIi2UWFRUREUkqFRUREUkqFRUREUkqF\nRUREUkqFRUREUiq2wmJmA8xsiZktNbNb6xlzv5ktM7NyMzsh4XhbM3vGzBab2UIzO6XlkouIyK7E\nUljMrBUwGjgP6ApcZGbHJI0ZCBS6+5HAUGBMwsP3AZPd/VigO7C4RYKLiMhuxdWx9AKWuftKd98K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LCIiklIq\nLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklL/H8qUwV6V+bCZAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9adf8d0>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope is 3.78e-04 1/min or 6.299e-06 1/s \n", + "Sedimentation factor is 1.899e-13 s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot,show,xlabel,ylabel\n", + "import math\n", + "%matplotlib inline\n", + "\n", + "#Variable Declaration\n", + "t = array([0.0,30.0,60.0,90.0,120.0,150.0]) #Time, min\n", + "xb = array([6.00,6.07,6.14,6.21,6.28,6.35]) #Location of boundary layer, cm\n", + "rpm = 55000. #RPM of centrifuge \n", + "\n", + "#Calculations\n", + "nx = xb/xb[0]\n", + "lnx = log(nx)\n", + "A = array([ t, ones(size(t))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,lnx)[0] # obtaining the parameters\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*t+intercept # regression line\n", + "\n", + "#Results\n", + "plot(t,line,'-',t,lnx,'o')\n", + "xlabel('$ Time, min $')\n", + "ylabel('$ \\log(x_b/x_{b0}) $')\n", + "show()\n", + "sbar = (slope/60)/(rpm*2*pi/60)**2\n", + "print 'Slope is %6.2e 1/min or %4.3e 1/s '%(slope, slope/60)\n", + "print 'Sedimentation factor is %4.3e s'%(sbar)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.11:pg-449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar conductivity of MgCl2 on infinite dilution is 0.0258 S.m2/mol\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "LMg = 0.0106 #Ionic conductance for Mg, S.m2/mol\n", + "LCl = 0.0076 #Ionic conductance for Cl, S.m2/mol\n", + "nMg, nCl = 1, 2 #Coefficients of Mg and Cl \n", + "\n", + "#Calculations\n", + "LMgCl2 = nMg*LMg + nCl*LCl\n", + "\n", + "#Results\n", + "print 'Molar conductivity of MgCl2 on infinite dilution is %5.4f S.m2/mol'%(LMgCl2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3Qk3YZ9.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3Qk3YZ9.ipynb new file mode 100644 index 00000000..bfc29594 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3Qk3YZ9.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Statistical Thermodyanamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.2:pg-374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Internal energy to be 1000.0 J temperature will be 449.0 K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "U = 1.00e3 #Total internal energy, J\n", + "hnu = 1.00e-20 #Energy level separation, J\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1 #Number of moles, mol\n", + "\n", + "#Calcualtions\n", + "T = hnu/(k*log(n*NA*hnu/U-1.))\n", + "\n", + "#Results\n", + "print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.3:pg-378" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of excited state is 1.57e-19 J\n", + "Electronic partition function qE is 3.000e+00\n", + "Electronic contribution to internal enrgy is 3.921e-06 J\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "g0 = 3.0 #Ground State partition function\n", + "labda = 1263e-9 #Wave length in nm\n", + "T = 500. #Temperature, K\n", + "c = 3.00e8 #Speed of light, m/s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1.0 #Number of moles, mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "\n", + "#Calcualtions\n", + "beta = 1./(k*T)\n", + "eps = h*c/labda\n", + "qE = g0 + exp(-beta*eps)\n", + "UE = n*NA*eps*exp(-beta*eps)/qE\n", + "\n", + "#Results\n", + "print 'Energy of excited state is %4.2e J'%eps\n", + "print 'Electronic partition function qE is %4.3e'%qE\n", + "print 'Electronic contribution to internal enrgy is %4.3e J'%UE" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.5:pg-387" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 2.25e-11 m3\n", + "Std. Molar entropy for Ne is 145.46 J/(mol.K)\n", + "Thermal wave lengths for Kr is 1.11e-11 m3\n", + "Std. Molar entropy for Kr is 163.18 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log, pi, sqrt\n", + "\n", + "#Variable Declaration\n", + "Mne = 0.0201797 #Molecular wt of ne, kg/mol \n", + "Mkr = 0.0837980 #Molecular wt of kr, kg/mol\n", + "Vmne = 0.0224 #Std. state molar volume of ne, m3\n", + "Vmkr = 0.0223 #Std. state molar volume of kr, m3\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298 #Std. state temeprature,K \n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "mne = Mne/NA\n", + "mkr = Mkr/NA\n", + "Labdane = sqrt(h**2/(2*pi*mne*k*T))\n", + "Labdakr = sqrt(h**2/(2*pi*mkr*k*T))\n", + "Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)\n", + "Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane\n", + "print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne\n", + "print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr\n", + "print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.8:pg-392" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 4.09e-33 m3\n", + "The Gibbs energy for 1 mol of Ar is -39.97 kJ\n" + ] + } + ], + "source": [ + "from math import log, pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Moleculat wt of Ar, kg/mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298.15 #Std. state temeprature,K \n", + "P = 1e5 #Std. state pressure, Pa\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "m = M/NA\n", + "Labda3 = (h**2/(2*pi*m*k*T))**(3./2)\n", + "G0 = -n*R*T*log(k*T/(P*Labda3))\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3\n", + "print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3RZopIG.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3RZopIG.ipynb new file mode 100644 index 00000000..076c1413 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3RZopIG.ipynb @@ -0,0 +1,700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 06: Chemical Equilibrium" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.1:pg-126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Available work through combustion of CH4 -813.6 kJ/mol\n", + "Maximum Available work through combustion of C8H18 -5320.9 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dACH4 = dHcCH4*1e3 - dnCH4*R*T - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dAC8H18 = dHcC8H18*1e3 - dnC8H18*R*T - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum Available work through combustion of CH4 %4.1f kJ/mol'%(dACH4/1000)\n", + "print 'Maximum Available work through combustion of C8H18 %4.1f kJ/mol'%(dAC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.2:pg-128" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum nonexapnasion work through combustion of CH4 -818.6 kJ/mol\n", + "Maximum nonexapnasion work through combustion of C8H18 -5309.8 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dGCH4 = dHcCH4*1e3 - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dGC8H18 = dHcC8H18*1e3 - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum nonexapnasion work through combustion of CH4 %4.1f kJ/mol'%(dGCH4/1000)\n", + "print 'Maximum nonexapnasion work through combustion of C8H18 %4.1f kJ/mol'%(dGC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.4:pg-133" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy of formation for Fe(g) at 400 K is 355.1 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGf298 = 370.7 #Std. free energy of formation for Fe (g), kJ/mol\n", + "dHf298 = 416.3 #Std. Enthalpy of formation for Fe (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 400. #Temperature in K\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "\n", + "dGf = T*(dGf298*1e3/T0 + dHf298*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. free energy of formation for Fe(g) at 400 K is %4.1f kJ/mol'%(dGf/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.5:pg-137" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy Change on mixing is -2.8e+04 J\n", + "Std. entropy Change on mixing is -93.3 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "nHe = 1.0 #Number of moles of He\n", + "nNe = 3.0 #Number of moles of Ne\n", + "nAr = 2.0 #Number of moles of Ar\n", + "nXe = 2.5 #Number of moles of Xe\n", + "T = 298.15 #Temperature in K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "n = nHe + nNe + nAr + nXe\n", + "dGmix = n*R*T*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "dSmix = n*R*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "\n", + "#Results \n", + "print 'Std. free energy Change on mixing is %3.1e J'%(dGmix)\n", + "print 'Std. entropy Change on mixing is %4.1f J'%(dSmix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.6:pg-138" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 67.00 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGfFe = 0.0 #Std. Gibbs energy of formation for Fe (S), kJ/mol\n", + "dGfH2O = -237.1 #Std. Gibbs energy of formation for Water (g), kJ/mol\n", + "dGfFe2O3 = -1015.4 #Std. Gibbs energy of formation for Fe2O3 (s), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dGR = nFe*dGfFe + nH2O*dGfH2O + nFe2O3*dGfFe2O3 + nH2*dGfH2 \n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.2f kJ/mol'%(dGR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.7:pg-139" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Enthalpy change for reactionat 525.0 is -24.80 kJ/mol\n", + "Std. Gibbs energy change for reactionat 525.0 is 137 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGR = 67.0 #Std. Gibbs energy of formation for reaction, kJ, from previous problem\n", + "dHfFe = 0.0 #Enthalpy of formation for Fe (S), kJ/mol\n", + "dHfH2O = -285.8 #Enthalpy of formation for Water (g), kJ/mol\n", + "dHfFe2O3 = -1118.4 #Enthalpy of formation for Fe2O3 (s), kJ/mol\n", + "dHfH2 = 0.0 #Enthalpy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 525. #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dHR = nFe*dHfFe + nH2O*dHfH2O + nFe2O3*dHfFe2O3 + nH2*dHfH2 \n", + "dGR2 = T*(dGR*1e3/T0 + dHR*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. Enthalpy change for reactionat %4.1f is %4.2f kJ/mol'%(T, dHR)\n", + "print 'Std. Gibbs energy change for reactionat %4.1f is %4.0f kJ/mol'%(T, dGR2/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.8:pg-140" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 1.337 kJ/mol\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "dGfNO2 = 51.3 #Std. Gibbs energy of formation for NO2 (g), kJ/mol\n", + "dGfN2O4 = 99.8 #Std. Gibbs energy of formation for N2O4 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "pNO2 = 0.350 #Partial pressure of NO2, bar\n", + "pN2O4 = 0.650 #Partial pressure of N2O4, bar\n", + "R = 8.314\n", + "nNO2, nN2O4 = -2, 1 #Stoichiomentric coeff of NO2 and N2O4 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nN2O4*dGfN2O4*1e3 + nNO2*dGfNO2*1e3 + R*T0*log(pN2O4/(pNO2)**2)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.9:pg-141" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is -0.020 kJ/mol\n", + "Equilibrium constant for reaction is 3323.254 \n", + "Kp >> 1. hence, mixture will consists of product CO2 and H2\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dGfCO = 237.1 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dGfH2O = 137.2 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCO2, nH2, nCO, nH2O = 1,1,1,1 #Stoichiomentric coeff of CO2,H2,CO,H2O respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCO2*dGfCO2 + nH2*dGfH2 + nCO*dGfCO + nH2O*dGfH2O\n", + "Kp = exp(-dGR*1e3/(R*T0))\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)\n", + "print 'Equilibrium constant for reaction is %5.3f '%(Kp)\n", + "if Kp > 1: print 'Kp >> 1. hence, mixture will consists of product CO2 and H2'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.11:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part A\n", + "Std. Gibbs energy change for reaction is 211.400 kJ/mol\n", + "Std. Enthalpy change for reaction is 242.600 kJ/mol\n", + "Equilibrium constants at 800, 1500, and 2000 K are 4.223e-11, 1.042e-03, and 1.349e-01\n", + "Part B\n", + "Degree of dissociation at 800, 1500, and 2000 K are 3.249e-05, 1.593e-01, and 8.782e-01\n" + ] + } + ], + "source": [ + "from math import exp, sqrt\n", + "\n", + "dGfCl2 = 0.0 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfCl = 105.7 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dHfCl2 = 0.0 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dHfCl = 121.3 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCl2, nCl= -1,2 #Stoichiomentric coeff of Cl2,Cl respectively in reaction\n", + "PbyP0 = 0.01\n", + "#Calculations\n", + "dGR = nCl*dGfCl + nCl2*dGfCl2 \n", + "dHR = nCl*dHfCl + nCl2*dHfCl2 \n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "Kp8 = func(800)\n", + "Kp15 = func(1500)\n", + "Kp20 = func(2000)\n", + "DDiss = lambda K: sqrt(K/(K+4*PbyP0))\n", + "alp8 = DDiss(Kp8)\n", + "alp15 = DDiss(Kp15)\n", + "alp20 = DDiss(Kp20)\n", + "\n", + "#Results \n", + "print 'Part A'\n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %5.3f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(Kp8,Kp15,Kp20)\n", + "\n", + "print 'Part B'\n", + "print 'Degree of dissociation at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(alp8,alp15,alp20)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.12:pg-145" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 131.1 kJ/mol\n", + "Std. Enthalpy change for reaction is 178.5 kJ/mol\n", + "Equilibrium constants at 1000, 1100, and 1200 K are 0.0956, 0.673e, and 3.423\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCaCO3 = -1128.8 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCaO = -603.3 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for O2 (g), kJ/mol\n", + "dHfCaCO3 = -1206.9 #Std. Enthalpy Change of formation for CaCO3 (s), kJ/mol\n", + "dHfCaO = -634.9 #Std. Enthalpy Change of formation for CaO (s), kJ/mol\n", + "dHfCO2 = -393.5 #Std. Enthalpy Change of formation for O2 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCaCO3, nCaO, nO2 = -1,1,1 #Stoichiomentric coeff of CaCO3, CaO, O2 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCaO*dGfCaO + nO2*dGfCO2 + nCaCO3*dGfCaCO3\n", + "dHR = nCaO*dHfCaO + nO2*dHfCO2 + nCaCO3*dHfCaCO3\n", + "\n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "\n", + "Kp10 = func(1000)\n", + "Kp11 = func(1100)\n", + "Kp12 = func(1200)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.1f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %4.1f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 1000, 1100, and 1200 K are %4.4f, %4.3fe, and %4.3f'%(Kp10,Kp11,Kp12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.13:pg-146" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at which graphite and dimond will be in equilibrium is 1.51e+04 bar\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCG = 0.0 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCD = 2.90 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "rhoG = 2.25e3 #Density of Graphite, kg/m3\n", + "rhoD = 3.52e3 #Density of dimond, kg/m3\n", + "T0 = 298.15 #Std. Temperature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K) \n", + "P0 = 1.0 #Pressure, bar\n", + "M = 12.01 #Molceular wt of Carbon\n", + "#Calculations\n", + "P = P0*1e5 + dGfCD*1e3/((1./rhoG-1./rhoD)*M*1e-3)\n", + "\n", + "#Results \n", + "print 'Pressure at which graphite and dimond will be in equilibrium is %4.2e bar'%(P/1e5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.14:pg-154" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUbydV = 1.42e+03 bar\n", + "dVbyV = 6.519 percent\n", + "dUbydVm = 9e+02 atm\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "\n", + "beta = 2.04e-4 #Thermal exapansion coefficient, /K\n", + "kapa = 45.9e-6 #Isothermal compressibility, /bar\n", + "T = 298.15 #Std. Temperature, K\n", + "R = 8.206e-2 #Ideal gas constant, atm.L/(mol.K) \n", + "T1 = 320.0 #Temperature, K\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "V = 1.00 #Volume, m3\n", + "a = 1.35 #van der Waals constant a for nitrogen, atm.L2/mol2\n", + "\n", + "#Calculations\n", + "dUbydV = Pf = (beta*T1-kapa*P0)/kapa\n", + "dVT = V*kapa*(Pf-Pi)\n", + "dVbyV = dVT*100/V\n", + "Vm = Pi/(R*T1)\n", + "dUbydVm = a/(Vm**2)\n", + "\n", + "#Results \n", + "print 'dUbydV = %4.2e bar'%(dUbydV)\n", + "print 'dVbyV = %4.3f percent'%(dVbyV)\n", + "print 'dUbydVm = %4.0e atm'%(dUbydVm)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.15:pg-155" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Internal energy change is 4.06e+04 J/mol in which \n", + "contribution of temeprature dependent term 99.9999 percent\n", + "Enthalpy change is 4.185e+04 J/mol in which \n", + "contribution of temeprature dependent term 100.0 percent\n" + ] + } + ], + "source": [ + "from math import exp, log\n", + "\n", + "m = 1000.0 #mass of mercury, g\n", + "Pi, Ti = 1.00, 300.0 #Intial pressure and temperature, bar, K\n", + "Pf, Tf = 300., 600.0 #Final pressure and temperature, bar, K\n", + "rho = 13534. #Density of mercury, kg/m3\n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "Cpm = 27.98 #Molar Specific heat at constant pressure, J/(mol.K) \n", + "M = 200.59 #Molecular wt of Hg, g/mol\n", + "\n", + "#Calculations\n", + "Vi = m*1e-3/rho\n", + "Vf = Vi*exp(-kapa*(Pf-Pi))\n", + "Ut = m*Cpm*(Tf-Ti)/M \n", + "Up = (beta*Ti/kapa-Pi)*1e5*(Vf-Vi) + (Vi-Vf+Vf*log(Vf/Vi))*1e5/kapa\n", + "dU = Ut + Up\n", + "Ht = m*Cpm*(Tf-Ti)/M\n", + "Hp = ((1 + beta*(Tf-Ti))*Vi*exp(-kapa*Pi)/kapa)*(exp(-kapa*Pi)-exp(-kapa*Pf))\n", + "dH = Ht + Hp\n", + "#Results\n", + "print 'Internal energy change is %6.2e J/mol in which \\ncontribution of temeprature dependent term %6.4f percent'%(dU,Ut*100/dH)\n", + "print 'Enthalpy change is %4.3e J/mol in which \\ncontribution of temeprature dependent term %4.1f percent'%(dH,Ht*100/dH)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.16:pg-156" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in molar specific heats \n", + "at constant volume and constant pressure 3.73e-03 J/(mol.K)\n", + "Molar Specific heat of Hg at const. volume is 27.98 J/(mol.K)\n" + ] + } + ], + "source": [ + "import math\n", + "T = 300.0 #Temperature of Hg, K \n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "M = 0.20059 #Molecular wt of Hg, kg/mol \n", + "rho = 13534 #Density of mercury, kg/m3\n", + "Cpm = 27.98 #Experimental Molar specif heat at const pressure for mercury, J/(mol.K)\n", + "\n", + "#Calculations\n", + "Vm = M/rho\n", + "DCpmCv = T*Vm*beta**2/kapa\n", + "Cvm = Cpm - DCpmCv\n", + "#Results\n", + "print 'Difference in molar specific heats \\nat constant volume and constant pressure %4.2e J/(mol.K)'%DCpmCv\n", + "print 'Molar Specific heat of Hg at const. volume is %4.2f J/(mol.K)'%Cvm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.17:pg-158" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar Gibbs energy of Ar -46.154 kJ/mol\n", + "Molar Gibbs energy of Water -306.658 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "T = 298.15 #Std. Temperature, K \n", + "P = 1.0 #Initial Pressure, bar\n", + "Hm0, Sm0 = 0.0,154.8 #Std. molar enthalpy and entropy of Ar(g), kJ, mol, K units\n", + "Sm0H2, Sm0O2 = 130.7,205.2 #Std. molar entropy of O2 and H2 (g), kJ/(mol.K)\n", + "dGfH2O = -237.1 #Gibbs energy of formation for H2O(l), kJ/mol \n", + "nH2, nO2 = 1, 1./2 #Stoichiomentric coefficients for H2 and O2 in water formation reaction \n", + "\n", + "#Calculations\n", + "Gm0 = Hm0 - T*Sm0\n", + "dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)\n", + "#Results\n", + "print 'Molar Gibbs energy of Ar %4.3f kJ/mol'%(Gm0/1e3)\n", + "print 'Molar Gibbs energy of Water %4.3f kJ/mol'%(dGmH2O/1e3)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3oVSGJI.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3oVSGJI.ipynb new file mode 100644 index 00000000..058c9da8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3oVSGJI.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Boltzmann Distribution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.1:pg-321" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The observed weight 1.37e+28 compared to 1.01e+29\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "\n", + "aH = 40 #Number of heads\n", + "N = 100 #Total events\n", + "\n", + "#Calculations\n", + "aT = 100 - aH\n", + "We = factorial(N)/(factorial(aT)*factorial(aH))\n", + "Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))\n", + "\n", + "#Results\n", + "print 'The observed weight %5.2e compared to %5.2e'%(We,Wexpected)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.2:pg-322" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At maximum value of ln(W)\n", + "Values of N1 : 6162, N2: 2676 and N3: 1162 \n", + "Maximum value of ln(W)= 9012\n" + ] + } + ], + "source": [ + "from sympy import symbols, diff, log\n", + "\n", + "#Varialbe declaration\n", + "n = 10000 #Total number of particles\n", + "\n", + "\n", + "#Calcualtions\n", + "def ster(i):\n", + " return i*log(i)-i\n", + "\n", + "n1, n2, n3, W = symbols('n1 n2 n3 W',positive=True)\n", + "\n", + "n2 = 5000 - 2*n3\n", + "n1 = 10000 - n2 -n3\n", + "logW = ster(n) - ster(n1) - ster(n2) - ster(n3) \n", + "fun = diff(logW, n3)\n", + "dfun = diff(fun, n3)\n", + "x0 = 10.0\n", + "err = 1.0\n", + "while err>0.001:\n", + " f = fun.subs(n3,x0)\n", + " df = dfun.subs(n3,x0)\n", + " xnew = x0 - f/df\n", + " err = abs(x0-xnew)/x0\n", + " x0 = xnew\n", + "\n", + "x0 = int(x0)\n", + "N2 = n2.subs(n3,x0)\n", + "N3 = x0\n", + "n1 = n1.subs(n3,x0)\n", + "N1 = n1.subs(n2,N2)\n", + "lnW = logW.subs(n3,N3)\n", + "\n", + "#Results\n", + "print 'At maximum value of ln(W)'\n", + "print 'Values of N1 : %4d, N2: %4d and N3: %4d '%(N1, N2,N3)\n", + "print 'Maximum value of ln(W)= %6d'%lnW" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.3:pg-326" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.048 i.e. 4.8 percent\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.633 #Probabilities of Energy level 1,2,3 \n", + "p1 = 0.233\n", + "p2 = 0.086\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f i.e.%4.1f percent'%(p4,p4*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.4:pg-327" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.222\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.394 #Probabilities of Energy level 1,2,3 \n", + "p1by2 = 0.239\n", + "p2 = 0.145\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1by2+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f'%(p4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.5:pg-333" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Partition function is 1.577\n", + "Probability of occupying the second vibrational state n=2 is 0.085\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "I2 = 208 #Vibrational frequency, cm-1 \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "#Calculation\n", + "q = 1./(1.-exp(-h*c*I2/(k*T)))\n", + "p2 = exp(-2*h*c*I2/(k*T))/q\n", + "\n", + "#Results\n", + "print 'Partition function is %4.3f'%(q)\n", + "print 'Probability of occupying the second vibrational state n=2 is %4.3f'%(p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.6:pg-334" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Occupation Number is 0.999990\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "B = 1.45 #Magnetic field streangth, Teslas \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K \n", + "gnbn = 2.82e-26 #J/T\n", + "#Calculation\n", + "ahpbyahm = math.exp(-gnbn*B/(k*T))\n", + "\n", + "#Results\n", + "print 'Occupation Number is %7.6f'%(ahpbyahm)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3z34ofU.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3z34ofU.ipynb new file mode 100644 index 00000000..cfc07351 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_3z34ofU.ipynb @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Kinetic Theory of Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.1:pg-407" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Most probable speed of Ne and Krypton at 298 K are 498, 244 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "MNe = 0.020 #Molecular wt of Ne, kg/mol\n", + "MKr = 0.083 #Molecular wt of Kr, kg/mol\n", + "\n", + "#Calculations\n", + "vmpNe = sqrt(2*R*T/MNe)\n", + "vmpKr = sqrt(2*R*T/MKr)\n", + "\n", + "#Results\n", + "print 'Most probable speed of Ne and Krypton at 298 K are %4.0f, %4.0f m/s'%(vmpNe,vmpKr)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.2:pg-411" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum, average, root mean square speed of Ar\n", + "at 298 K are 352, 397, 431 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "\n", + "\n", + "#Calculations\n", + "vmp = sqrt(2*R*T/M)\n", + "vave = sqrt(8*R*T/(M*pi))\n", + "vrms = sqrt(3*R*T/M)\n", + "\n", + "#Results\n", + "print 'Maximum, average, root mean square speed of Ar\\nat 298 K are %4.0f, %4.0f, %4.0f m/s'%(vmp,vave,vrms)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.4, Page Numbe 413" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Collisions 2.45e+27 per s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "\n", + "#Calculations\n", + "Zc = P*NA/sqrt(2*pi*R*T*M)\n", + "Nc = Zc*V \n", + "#Results\n", + "print 'Number of Collisions %4.2e per s'%(Nc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.5:pg-414" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure after 1 hr of effusion is 9.996e-03 Pa\n" + ] + } + ], + "source": [ + "from math import sqrt, pi,exp\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P0 = 1013.25 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "t = 3600 #time of effusion, s\n", + "A = 0.01 #Area, um2\n", + "\n", + "#Calculations\n", + "A = A*1e-12\n", + "V = V*1e-3\n", + "expo = (A*t/V)*(k*T/(2*pi*M/NA))\n", + "P = P0*exp(-expo)\n", + "#Results\n", + "print 'Pressure after 1 hr of effusion is %4.3e Pa'%(P/101325)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.6:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Single particle collisional frequency is 6.9e+09 per s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "sigm = 5.2e-19 #m2\n", + "\n", + "#Calculations\n", + "zCO2 = (P*NA/(R*T))*sigm*sqrt(2)*sqrt(8*R*T/(pi*M)) \n", + "#Results\n", + "print 'Single particle collisional frequency is %4.1e per s'%(zCO2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.7:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional frequency is 3.14e+34 m-3s-1\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "MAr = 0.04 #Molecular wt of Ar, kg/mol\n", + "MKr = 0.084 #Molecular wt of Kr, kg/mol\n", + "pAr = 360 #Partial Pressure Ar, torr\n", + "pKr = 400 #Partial Pressure Kr, torr\n", + "rAr = 0.17e-9 #Hard sphere radius of Ar, m\n", + "rKr = 0.20e-9 #Hard sphere radius of Kr, m\n", + "NA = 6.022e23 #Number of particles per mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "\n", + "#Calculations\n", + "pAr = pAr*101325/760\n", + "pKr = pKr*101325/760\n", + "p1 = pAr*NA/(R*T)\n", + "p2 = pKr*NA/(R*T)\n", + "sigm = pi*(rAr+rKr)**2\n", + "mu = MAr*MKr/((MAr+MKr)*NA)\n", + "p3 = sqrt(8*k*T/(pi*mu)) \n", + "zArKr = p1*p2*sigm*p3\n", + "\n", + "#Results\n", + "print 'Collisional frequency is %4.2e m-3s-1'%(zArKr)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_47uzEPc.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_47uzEPc.ipynb new file mode 100644 index 00000000..382b0ea4 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_47uzEPc.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ensemble and Molecular Partition Function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.1:pg-344" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in energy levels is 3.10e-38 J or 1.56e-15 1/cm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "l = 0.01 #Box length, m \n", + "n1,n2 = 2,1 #Energy levels states\n", + "m = 5.31e-26 #mass of oxygen molecule, kg\n", + "\n", + "#Calculations \n", + "dE = (n1+n2)*h**2/(8*m*l**2)\n", + "dEcm = dE/(h*c*1e2)\n", + "#Results\n", + "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.2:pg-345" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave length is 1.60e-11 m and\n", + "Translational partition function is 2.44e+29\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "v = 1.0 #Volume, L\n", + "T = 298.0 #Temeprature of Ar, K\n", + "m = 6.63e-26 #Mass of Argon molecule, kg \n", + "\n", + "#Calculations \n", + "GAMA = h/sqrt(2*pi*m*k*T)\n", + "v = v*1e-3\n", + "qT3D = v/GAMA**3\n", + "\n", + "#Results\n", + "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.4:pg-350" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Spectrum will be observed at 494 K\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "J = 4 #Rotational energy level\n", + "B = 8.46 #Spectrum, 1/cm\n", + "\n", + "#Calculations \n", + "T = (2*J+1)**2*h*c*100*B/(2*k)\n", + "#Results\n", + "print 'Spectrum will be observed at %4.0f K'%(T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.5:pg-352" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 1000 is 5.729\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "B = 60.589 #Spectrum for H2, 1/cm\n", + "T = 1000 #Temperture of Hydrogen, K\n", + "#Calculations \n", + "qR = k*T/(2*h*c*100*B)\n", + "qRs = 0.0\n", + "#for J in range(101):\n", + "# print J\n", + "# if (J%2 == 0):\n", + "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n", + "# else:\n", + "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n", + "#print qRs/4\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.6:pg-353" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 100 K is 928.121\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "B = 0.0374 #Spectrum for H2, 1/cm\n", + "T = 100.0 #Temperture of Hydrogen, K\n", + "sigma = 2.\n", + "\n", + "#Calculations\n", + "ThetaR = h*c*100*B/k\n", + "qR = T/(sigma*ThetaR)\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.7:pg-354" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "Ba = 1.48 #Spectrum for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n", + "T = 298.0 #Temperture of Hydrogen, K\n", + "sigmab = 1\n", + "sigmac = 2\n", + "\n", + "#Calculations\n", + "qRa = k*T/(h*c*100*Ba)\n", + "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n", + "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n", + "\n", + "#Results\n", + "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.8:pg-356" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n" + ] + } + ], + "source": [ + "from math import pi, exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "Ba = 1.48 #Frequency for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n", + "T298 = 298.0 #Temperture of Hydrogen, K\n", + "T1000 = 1000 #Temperture of Hydrogen, K\n", + "nubar = 208\n", + "\n", + "#Calculations\n", + "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n", + "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.9:pg-357" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 450 1/cm the q = 1.128\n", + "At 945 1/cm the q = 1.010\n", + "At 1100 1/cm the q = 1.005\n", + "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "T = 298 #Temeprature, K\n", + "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.10:pg-359" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for F2 at 298.0 K is 10.508\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298 #Temeprature, K\n", + "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n", + "\n", + "#Calculations\n", + "ThetaV = h*c*100*nubar/k\n", + "Th = 10*ThetaV\n", + "qv = 1/(1.-exp(-ThetaV/Th))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.11:pg-360" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 1388 1/cm the q = 1.157\n", + "At 667 1/cm the q = 1.619\n", + "At 667 1/cm the q = 1.619\n", + "At 2349 1/cm the q = 1.035\n", + "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 1000 #Temeprature, K\n", + "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.12:pg-363" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electronic partition function for F2 at 298.0 K is 9.45\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298. #Temeprature, K\n", + "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n", + "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n", + "g0 = [4,6,8,10,2,4,6,8,10]\n", + "\n", + "#Calculations\n", + "qE = 0.0\n", + "for i in range(9):\n", + " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n", + " qE = qE + a\n", + "\n", + "#Results\n", + "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_4wLOrg1.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_4wLOrg1.ipynb new file mode 100644 index 00000000..7f1b328b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_4wLOrg1.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Electrochemical Cells, Batteries, and Fuel Cells" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.1:pg-265" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The potential of H+/H2 half cell 0.0083 V\n" + ] + } + ], + "source": [ + "from math import log, sqrt\n", + "\n", + "#Variable Declaration\n", + "aH = 0.770 #Activity of \n", + "fH2 = 1.13 #Fugacity of Hydrogen gas\n", + "E0 = 0.0 #Std. electrode potential, V\n", + "n = 1.0 #Number of electrons transfered\n", + "\n", + "#Calculations\n", + "E = E0 - (0.05916/n)*log(aH/sqrt(fH2),10)\n", + "\n", + "#Results\n", + "print 'The potential of H+/H2 half cell %5.4f V'%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.2:pg-266" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.689 1.019\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E0r1 = -0.877 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s) \n", + "E0r2 = -1.660 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s)\n", + "E0r3 = +0.071 #Std Electrod potential for Rx3 : AgBr (s) + e- ------> Ag(s) +Br- (aq.)\n", + "\n", + "#Calculations\n", + "#3Fe(OH)2 (s)+ 2Al (s) <---------> 3Fe (s) + 6(OH-) + 2Al3+\n", + "E0a = 3*E0r1 + (-2)*E0r2\n", + "#Fe (s) + 2OH- + 2AgBr (s) -------> Fe(OH)2 (s) + 2Ag(s) + 2Br- (aq.)\n", + "E0b = -E0r1 + (2)*E0r3\n", + "\n", + "#Results\n", + "print '%5.3f %5.3f'%(E0a,E0b)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.3:pg-267" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E0 for overall reaction is -0.041 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = 0.771 #Rx1 : Fe3+ + e- -----> Fe2+\n", + "E02 = -0.447 #Rx2 : Fe2+ + 2e- -----> Fe\n", + "F = 96485 #Faraday constant, C/mol\n", + "n1,n2,n3 = 1.,2.,3.\n", + "\n", + "#Calculations\n", + "dG01 = -n1*F*E01\n", + "dG02 = -n2*F*E02\n", + " #For overall reaction\n", + "dG0 = dG01 + dG02\n", + "E0Fe3byFe = -dG0/(n3*F)\n", + "\n", + "#Results\n", + "print 'E0 for overall reaction is %5.3f V'%(E0Fe3byFe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.4:pg-268" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. entropy change of reaction from dE0bydT is -2.32e+02 and\n", + "Std entropy values is -2.41e+02 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = +1.36 #Std. electrode potential for Cl2/Cl\n", + "dE0bydT = -1.20e-3 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "S0H = 0.0 #Std. entropy J/(K.mol) for H+ ,Cl-,H2, Cl2 \n", + "S0Cl = 56.5\n", + "S0H2 = 130.7\n", + "S0Cl2 = 223.1\n", + "nH, nCl, nH2, nCl2 = 2, 2, -1,-1\n", + "#Calculations\n", + "dS01 = n*F*dE0bydT\n", + "dS02 =nH*S0H + nCl*S0Cl + nH2*S0H2 + nCl2*S0Cl2\n", + "\n", + "#Results\n", + "print 'Std. entropy change of reaction from dE0bydT is %4.2e and\\nStd entropy values is %4.2e V'%(dS01,dS02)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.5:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.55e+37\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "E0 = +1.10 #Std. electrode potential for Danniel cell, V\n", + " #Zn(s) + Cu++ -----> Zn2+ + Cu\n", + "T = 298.15 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "R = 8.314 #Gas constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "K = exp(n*F*E0/(R*T))\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(K)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.6:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.57e-10\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +0.29 #Cell emf, V\n", + "n = 2.\n", + "\n", + "#Calculations\n", + "Ksp = 10**(-n*E/0.05916)\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(Ksp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.8:pg-272" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cell potentials for Zn, Ag, Au are 2.27 V, 0.71 V, and -0.18 V\n", + "Zn has positive cell potential of 2.272 V and Can be oxidized bypermangnate ion\n", + "Ag has positive cell potential of 0.710 V and Can be oxidized bypermangnate ion\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +1.51 #EMF for reduction of permangnet, V\n", + "E01 = -0.7618 #Zn2+ + 2e- --------> Zn (s)\n", + "E02 = +0.7996 #Ag+ + e- --------> Ag (s)\n", + "E03 = +1.6920 #Au+ + e- --------> Au (s) \n", + "\n", + "#Calculations\n", + "EZn = E - E01\n", + "EAg = E - E02\n", + "EAu = E - E03\n", + "animals = {\"parrot\": 2, \"fish\": 6}\n", + "Er = {\"Zn\":EZn,\"Ag\":EAg,\"Au\":EAu}\n", + "#Results\n", + "print 'Cell potentials for Zn, Ag, Au are %4.2f V, %4.2f V, and %4.2f V'%(EZn, EAg,EAu)\n", + "for i in Er:\n", + " if Er[i] >0.0:\n", + " print '%s has positive cell potential of %4.3f V and Can be oxidized bypermangnate ion' %(i,Er[i])\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_5y05ccc.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_5y05ccc.ipynb new file mode 100644 index 00000000..29d2cd41 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_5y05ccc.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Enthalpy and the Second and Third Laws of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.1:pg-90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of heat engine is 0.600\n", + "Work done by heat engine is 600.0 J\n" + ] + } + ], + "source": [ + "import math\n", + "Th, Tc = 500.,200. #Temeperatures IN Which reversible heat engine works, K\n", + "q = 1000. #Heat absorbed by heat engine, J\n", + "\n", + "#Calcualtions\n", + "eps = 1.-Tc/Th\n", + "w = eps*q\n", + "\n", + "#Results\n", + "print 'Efficiency of heat engine is %4.3f'%eps\n", + "print 'Work done by heat engine is %4.1f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.4:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 24.43 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "Ti, Tf = 320.,650. #Initial and final state Temeperatures of CO2, K\n", + "vi, vf = 80.,120. #Initial and final state volume of CO2, K\n", + "A, B, C, D = 31.08,-0.01452,3.1415e-5,-1.4973e-8\n", + " #Constants in constant volume Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(vf/vi)\n", + "dS = dS1 + dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.5:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 48.55 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 2.5 #Number of moles of CO2\n", + "Ti, Tf = 450.,800. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "A, B, C, D = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(pf/pi)\n", + "dS = dS1 - dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.6:pg-95" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 58.2 J/(mol.K)\n", + "Ratio of pressure to temperature dependent term 2.8e-05\n", + "hence effect of pressure dependent term isvery less\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 3.0 #Number of moles of CO2\n", + "Ti, Tf = 300.,600. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.00,3.00 #Initial and final state pressure of CO2, K\n", + "cpm = 27.98 #Specific heat of mercury, J/(mol.K)\n", + "M = 200.59 #Molecualr wt of mercury, g/(mol)\n", + "beta = 1.81e-4 #per K\n", + "rho = 13.54 #Density of mercury, g/cm3\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "dS1 = n*cpm*log(Tf/Ti)\n", + "dS2 = n*(M/(rho*1e6))*beta*(pf-pi)*1e5\n", + "dS = dS1 - dS2\n", + "\n", + "#Results\n", + "print 'Entropy change of process is %4.1f J/(mol.K)'%dS\n", + "print 'Ratio of pressure to temperature dependent term %3.1e\\nhence effect of pressure dependent term isvery less'%(dS2/dS1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.7:pg-99" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of surrounding is 7.6 J/(mol.K)\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Total Entropy changeis 0.0 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -qrev\n", + "dSsys = qrev/T\n", + "dSsur = -dSsys\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Entropy change of surrounding is %4.1f J/(mol.K)'%dSsur\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Total Entropy changeis %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.8:pg-100" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Constant external pressure and initial pressure are 2.494e+05 J,and 9.977e+04 J respectively\n", + "Heat in reverssible and irreversible processes are -2285.4 J,and -3741.3 J respectively\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Entropy change of surrounding is 12.47 J/(mol.K)\n", + "Total Entropy changeis 4.85 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "pext = n*R*T/(vf/1e3)\n", + "pi = n*R*T/(vi/1e3)\n", + "q = pext*(vf-vi)/1e3\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -q\n", + "dSsur = -q/T\n", + "dSsys = qrev/T\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Constant external pressure and initial pressure are %4.3e J,and %4.3e J respectively'%(pext,pi)\n", + "print 'Heat in reverssible and irreversible processes are %4.1f J,and %4.1f J respectively'%(qrev,q)\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Entropy change of surrounding is %4.2f J/(mol.K)'%dSsur\n", + "print 'Total Entropy changeis %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.9:pg-103" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change Sm0 for O2 is 204.8 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "D1 = 2.11e-3 #Constants in constant pressure Heat capacity equation for K<T<12.97K, in J, mol, K units\n", + "A2, B2, C2, D2 = -5.666,0.6927,-5.191e-3,9.943e-4\n", + " #Constants in constant pressure Heat capacity equation for 12.97<T<23.66, J, mol, K units\n", + "A3, B3, C3, D3 = 31.70,-2.038,0.08384,-6.685e-4\n", + " #Constants in constant pressure Heat capacity equation for 23.66<T<43.76, J, mol, K units\n", + "A4 = 46.094 #Constants in constant pressure Heat capacity equation for 43.76<T<54.39, J/(mol.K)\n", + "A5, B5, C5, D5 = 81.268,-1.1467,0.01516,-6.407e-5\n", + " #Constants in constant pressure Heat capacity equation for 54.39<T<90.20K, J, mol, K units\n", + "A6, B6, C6, D6 = 32.71,-0.04093,1.545e-4,-1.819e-7\n", + " #Constants in constant pressure Heat capacity equation for 90.20<T<298.15 KJ, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "Ltrans1 = 93.80 #Entalpy of transition at 23.66K, J/mol\n", + "Ltrans2 = 743.0 #Entalpy of transition at 43.76K, J/mol\n", + "Ltrans3 = 445.0 #Entalpy of transition at 54.39K, J/mol\n", + "Ltrans4 = 6815. #Entalpy of transition at 90.20K, J/mol\n", + "T1 = 12.97 #Maximum applicabliltiy temeprature for first heat capacity equation, K\n", + "T12 = 23.66 #Phase Change temperature from Solid III--II, K\n", + "T23 = 43.76 #Phase Change temperature from Solid II--I, K\n", + "T34 = 54.39 #Phase Change temperature from Solid I--liquid, K\n", + "T45 = 90.20 #Phase Change temperature from liquid--gas, K\n", + "Ts = 298.15 #Std. Temeprature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (D1*T**3)/T, (T,0,T1)) \n", + "dS2 = n*integrate( (A2 + B2*T + C2*T**2 + D2*T**3)/T, (T,T1,T12)) \n", + "dS21 = Ltrans1/T12\n", + "dS3 = n*integrate( (A3 + B3*T + C3*T**2 + D3*T**3)/T, (T,T12,T23)) \n", + "dS31 = Ltrans2/T23\n", + "dS4 = n*integrate( (A4)/T, (T,T23,T34)) \n", + "dS41 = Ltrans3/T34\n", + "dS5 = n*integrate( (A5 + B5*T + C5*T**2 + D5*T**3)/T, (T,T34,T45)) \n", + "dS51 = Ltrans4/T45\n", + "dS6 = n*integrate( (A6 + B6*T + C6*T**2 + D6*T**3)/T, (T,T45,Ts))\n", + "#print dS1+dS2,dS21\n", + "#print dS3, dS31\n", + "#print dS4, dS41\n", + "#print dS5, dS51\n", + "#print dS6\n", + "dS = dS1+dS2+dS21+dS3+dS31+dS4+dS41+dS5+dS51+dS6\n", + "\n", + "#Results\n", + "print 'Entropy change Sm0 for O2 is %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.10:pg-105" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change for reaction at 475 K is -88.26 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "n = 1.0 #Number of moles of CO2 formed, mol\n", + "p = 1. #Pressure of CO2, K\n", + "\n", + "A1, B1, C1, D1 = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation for CO2, J/(mol.K)\n", + "A2, B2, C2, D2 = 30.81,-1.187e-2,2.3968e-5, 0.0\n", + " #Constants in constant pressure Heat capacity equation for O2, J/(mol.K)\n", + "A3, B3, C3, D3 = 31.08,-1.452e-2,3.1415e-5 ,-1.4793e-8 \n", + " #Constants in constant pressure Heat capacity equation for CO, J/(mol.K)\n", + "DSr298CO = 197.67 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298CO2 = 213.74 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298O2 = 205.138 #Std. Entropy change for CO, J/(mol.K)\n", + "Tr = 475. #Reaction temperature, K\n", + "Ts = 298.15 #Std. temperature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "v1,v2,v3 = 1.,1./2,1.\n", + "DSr = DSr298CO2*v1 - DSr298CO*v1 - DSr298O2*v2\n", + "DA = v1*A1-v2*A2-v3*A3\n", + "DB = v1*B1-v2*B2-v3*B3\n", + "DC = v1*C1-v2*C2-v3*C3\n", + "DD = v1*D1-v2*D2-v3*D3\n", + "dS = DSr + n*integrate( (DA + DB*T + DC*T**2 + DD*T**3)/T, (T,Ts,Tr)) \n", + "\n", + "#Results\n", + "print 'Entropy change for reaction at %4d K is %4.2f J/(mol.K)'%(Tr,dS)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_6abjRKa.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_6abjRKa.ipynb new file mode 100644 index 00000000..1fc19029 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_6abjRKa.ipynb @@ -0,0 +1,171 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1. Fundamental Concepts of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.1:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final Tyre pressure is 3.61e+05 Pa\n" + ] + } + ], + "source": [ + "import math \n", + "Pi = 3.21e5 #Recommended tyre pressure, Pa\n", + "Ti = -5.00 #Initial Tyre temperature, °C\n", + "Tf = 28.00 #Final Tyre temperature, °C\n", + "\n", + "#Calculations\n", + "Ti = 273.16 + Ti\n", + "Tf = 273.16 + Tf\n", + "pf = Pi*Tf/Ti #Final tyre pressure, Pa\n", + "\n", + "#Results\n", + "print 'Final Tyre pressure is %6.2e Pa'%pf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.2:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Moles of He=0.121, Ne=0.303 and, Xe=0.040 in mol\n", + "Mole fraction of xHe=0.261, xNe=0.652 and, xXe=0.087\n", + "Final pressure is 1.917 bar\n", + "Partial pressure of pHe=0.500, pNe=1.250 and, pXe=0.167 in bar\n" + ] + } + ], + "source": [ + "import math \n", + "phe = 1.5 #Pressure in Helium chamber, bar\n", + "vhe = 2.0 #Volume of Helium chamber, L\n", + "pne = 2.5 #Pressure in Neon chamber, bar\n", + "vne = 3.0 #Volume of Neon chamber, L\n", + "pxe = 1.0 #Pressure in Xenon chamber, bar\n", + "vxe = 1.0 #Volume of Xenon chamber, L\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "#Calculations\n", + "\n", + "nhe = phe*vhe/(R*T) #Number of moles of Helium, mol\n", + "nne = pne*vne/(R*T) #Number of moles of Neon, mol\n", + "nxe = pxe*vxe/(R*T) #Number of moles of Xenon, mol\n", + "n = nhe + nne + nxe #Total number of moles, mol\n", + "V = vhe + vne + vxe #Total volume of system, L\n", + "xhe = nhe/n\n", + "xne = nne/n\n", + "xxe = nxe/n\n", + "P = n*R*T/(V)\n", + "phe = P*xhe #Partial pressure of Helium, bar\n", + "pne = P*xne #Partial pressure of Neon, bar\n", + "pxe = P*xxe #Partial pressure of Xenon, bar\n", + "\n", + "#Results\n", + "print 'Moles of He=%4.3f, Ne=%4.3f and, Xe=%4.3f in mol'%(nhe,nne,nxe) \n", + "print 'Mole fraction of xHe=%4.3f, xNe=%4.3f and, xXe=%4.3f'%(xhe,xne,xxe)\n", + "print 'Final pressure is %4.3f bar'%P\n", + "print 'Partial pressure of pHe=%4.3f, pNe=%4.3f and, pXe=%4.3f in bar'%(phe,pne,pxe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.4:pg-12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure from ideal gas law = 9.98e-02 bar nad from Van der Waals equation = 9.98e-02 bar \n", + "Pressure from ideal gas law = 249.4 bar nad from Van der Waals equation = 269.9 bar \n" + ] + } + ], + "source": [ + "\n", + "import math \n", + "T = 300.0 #Nitrogen temperature, K\n", + "v1 = 250.00 #Molar volume, L\n", + "v2 = 0.1 #Molar volume, L\n", + "a = 1.37 #Van der Waals parameter a, bar.dm6/mol2 \n", + "b = 0.0387 #Van der Waals parameter b, dm3/mol\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "n = 1.\n", + "#Calculations\n", + "\n", + "p1 = n*R*T/v1 \n", + "p2 = n*R*T/v2\n", + "pv1 = n*R*T/(v1-n*b)- n**2*a/v1**2\n", + "pv2 = n*R*T/(v2-n*b)- n**2*a/v2**2\n", + "\n", + "#Results\n", + "print 'Pressure from ideal gas law = %4.2e bar nad from Van der Waals equation = %4.2e bar '%(p1, pv1)\n", + "print 'Pressure from ideal gas law = %4.1f bar nad from Van der Waals equation = %4.1f bar '%(p2, pv2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_7YykOlL.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_7YykOlL.ipynb new file mode 100644 index 00000000..430c21a8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_7YykOlL.ipynb @@ -0,0 +1,484 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Probability" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.1:pg-295" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of picking up any one ball is 1.0\n" + ] + } + ], + "source": [ + "import math\n", + "#Varible declaration\n", + "n = range(1,51,1)\n", + "Prob = 0\n", + "for x in n:\n", + " Prob = 1./len(n) + Prob\n", + "\n", + "#Results\n", + "print 'Probability of picking up any one ball is %3.1f'%Prob" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.2:pg-296" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of one (heart)card picked from a std. stack of 52 cards is 1/4\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "import math\n", + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "nheart = 13 #Number of cards with hearts\n", + "\n", + "#Calculations\n", + "Pe = Fraction(nheart,n)\n", + "\n", + "#Results\n", + "print 'Probability of one (heart)card picked from a std. stack of %d cards is'%n,Pe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.3:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of Five card arrangment from a deck of 52 cards is 311875200\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "import math\n", + "#Calculations\n", + "TotalM = n*(n-1)*(n-2)*(n-3)*(n-4)\n", + "#Results\n", + "print 'Total number of Five card arrangment from a deck of 52 cards is %d'%TotalM" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.4:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Possible spin states for excited state are 4\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "n1 = 2 #Two spin states for 1st electron in orbit 1\n", + "n2 = 2 #Two spin states for 2nd electron in orbit 2\n", + "\n", + "#Calculation\n", + "M = n1*n1\n", + "\n", + "#Results\n", + "print 'Possible spin states for excited state are %2d'%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.5:pg-298" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible permutations for 5 player to play are 95040\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 12 #Total Number of players \n", + "j = 5 #Number player those can play match\n", + "\n", + "#Calculation\n", + "P = factorial(n)/factorial(n-j)\n", + "\n", + "#Results\n", + "print 'Maximum Possible permutations for 5 player to play are %8d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.6:pg-299" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible 5-card combinations are 2598960\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 52 #Number of cards in std . pack\n", + "j = 5 #Number of cards in subset\n", + "\n", + "#Calculation\n", + "C = factorial(n)/(factorial(j)*factorial(n-j))\n", + "\n", + "#Results\n", + "print 'Maximum Possible 5-card combinations are %8d'%C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.7:pg-300" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of quantum states are 15\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "x = 6 #Number of electrons\n", + "n = 2 #Number of states\n", + "\n", + "#Calculation\n", + "P = factorial(x)/(factorial(n)*factorial(x-n))\n", + "\n", + "#Results\n", + "print 'Total number of quantum states are %3d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.8:pg-301" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of getting 25 head out of 50 tossing is 0.112\n", + "Probability of getting 10 head out of 50 tossing is 9.124e-06\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "n = 50 #Number of separate experiments\n", + "j1 = 25 #Number of sucessful expt with heads up\n", + "j2 = 10 #Number of sucessful expt with heads up\n", + "\n", + "#Calculation\n", + "C25 = factorial(n)/(factorial(j1)*factorial(n-j1))\n", + "PE25 = Fraction(1,2)**j1\n", + "PEC25 = (1-Fraction(1,2))**(n-j1)\n", + "P25 = C25*PE25*PEC25\n", + "\n", + "C10 = factorial(n)/(factorial(j2)*factorial(n-j2))\n", + "PE10 = Fraction(1,2)**j2\n", + "PEC10 = (1-Fraction(1,2))**(n-j2)\n", + "P10 = C10*PE10*PEC10\n", + "\n", + "#Results\n", + "print 'Probability of getting 25 head out of 50 tossing is %4.3f'%(float(P25))\n", + "print 'Probability of getting 10 head out of 50 tossing is %4.3e'%(float(P10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.9:pg-302" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " N ln(N!) ln(N!)sterling Error\n", + " 10 15.10 13.03 2.08\n", + " 50 148.48 145.60 2.88\n", + "100 363.74 360.52 3.22\n" + ] + } + ], + "source": [ + "from math import factorial, log\n", + "#Variable Declaration\n", + "N = [10,50,100] #Valures for N\n", + "\n", + "#Calculations\n", + "print ' N ln(N!) ln(N!)sterling Error'\n", + "for i in N:\n", + " lnN = log(factorial(i))\n", + " lnNs = i*log(i)-i\n", + " err = abs(lnN-lnNs)\n", + " print '%3d %5.2f %5.2f %4.2f'%(i,lnN,lnNs, err)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.10:pg-305" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of receiving any card 1/52\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "fi = 1 #Probability of receiving any card\n", + "n = 52 #Number od Cards\n", + "\n", + "#Calculations\n", + "sum = 0\n", + "for i in range(52):\n", + " sum = sum + fi\n", + "\n", + "Pxi = Fraction(fi,sum)\n", + "\n", + "#Results\n", + "print 'Probability of receiving any card', Pxi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.11:pg-307" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of Px considering it as discrete function 20.4\n", + "Sum of Px considering it as contineous function 19.9\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from scipy import integrate\n", + "#Variable Declaration\n", + "\n", + "#Calculations\n", + "fun = lambda x: exp(-0.05*x)\n", + "Pt = 0\n", + "for i in range(0,101):\n", + " Pt = Pt + fun(i)\n", + " \n", + "Ptot = integrate.quad(fun, 0.0, 100.)\n", + "\n", + "#Results\n", + "print 'Sum of Px considering it as discrete function %4.1f'%Pt\n", + "print 'Sum of Px considering it as contineous function %4.1f'%Ptot[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.12:pg-308" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from sympy import Symbol\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = Symbol('r') #Radius of inner circle\n", + "C = [5,2,0]\n", + "#Calculations\n", + "A1 = pi*r**2\n", + "A2 = pi*(2*r)**2 - A1\n", + "A3 = pi*(3*r)**2 - (A1 + A2)\n", + "At = A1 + A2 + A3\n", + "f1 = A1/At\n", + "f2 = A2/At\n", + "f3 = A3/At\n", + "sf = f1 + f2 + f3\n", + "\n", + "ns = (f1*C[0]+f2*C[1]+f3*C[2])/sf\n", + "\n", + "#Results\n", + "print 'A1, A2, A3: ', A1,', ', A2,', ', A3\n", + "print 'f1, f2, f3: ', f1,f2,f3\n", + "print 'Average payout $', round(float(ns),2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ArpsUYU.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ArpsUYU.ipynb new file mode 100644 index 00000000..04d54ef7 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ArpsUYU.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 02: Heat, Work, Internal Energy, Enthalpy, and The First Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.1:pg-20" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part a: Work done in expansion is -16.2 kJ\n", + "Part b: Work done in expansion of bubble is -1.73 J\n", + "Part c: Work done in paasing the cuurent through coil is 1.39 kJ\n", + "Part d: Work done stretching th fiber is -1.12 J\n" + ] + } + ], + "source": [ + "import math #Part a\n", + "vi = 20.0 #Initial volume of ideal gas, L\n", + "vf = 85.0 #final volume of ideal gas, L\n", + "Pext = 2.5 #External Pressure against which work is done, bar\n", + "\n", + "#Calculations\n", + "w = -Pext*1e5*(vf-vi)*1e-3\n", + "\n", + "#Results\n", + "print 'Part a: Work done in expansion is %6.1f kJ'%(w/1000)\n", + "\n", + "import math #Part b\n", + "ri = 1.00 #Initial diameter of bubble, cm\n", + "rf = 3.25 #final diameter of bubble, cm\n", + "sigm = 71.99 #Surface tension, N/m\n", + "\n", + "#Calculations\n", + "w = -2*sigm*4*math.pi*(rf**2-ri**2)*1e-4\n", + "\n", + "#Results\n", + "print 'Part b: Work done in expansion of bubble is %4.2f J'%w\n", + "\n", + "import math #Part c\n", + "i = 3.20 #Current through heating coil, A \n", + "v = 14.5 #fVoltage applied across coil, volts\n", + "t = 30.0 #time for which current is applied,s\n", + "\n", + "#Calculations\n", + "w = v*i*t\n", + "\n", + "#Results\n", + "print 'Part c: Work done in pasing the cuurent through coil is %4.2f kJ'%(w/1000)\n", + "\n", + "import math #Part d\n", + "k = 100.0 #Constant in F = -kx, N/cm \n", + "dl = -0.15 #stretch , cm\n", + "\n", + "#Calculations\n", + "w = -k*(dl**2-0)/2\n", + "\n", + "#Results\n", + "print 'Part d: Work done stretching th fiber is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.2:pg-22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat added to the water 24.00 kJ\n", + "Work done in vaporizing liquid is -1703.84 J\n" + ] + } + ], + "source": [ + "import math \n", + "m = 100.0 #Mass of water, g \n", + "T = 100.0 #Temperature of water, °C\n", + "Pext = 1.0 #External Pressure on assembly, bar\n", + "x = 10.0 #percent of water vaporised at 1 bar,-\n", + "i = 2.00 #current through heating coil, A\n", + "v = 12.0 #Voltage applied, v\n", + "t = 1.0e3 #time for which current applied, s \n", + "rhol = 997 #Density of liquid, kg/m3\n", + "rhog = 0.59 #Density of vapor, kg/m3\n", + "\n", + "#Calculations\n", + "q = i*v*t\n", + "vi = m/(rhol*100)*1e-3\n", + "vf = m*(100-x)*1e-3/(rhol*100) + m*x*1e-3/(rhog*100)\n", + "w = -Pext*(vf-vi)*1e5\n", + "#Results\n", + "print 'Heat added to the water %4.2f kJ'%(q/1000)\n", + "print 'Work done in vaporizing liquid is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.3:pg-27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat removed by water at constant pressure 89.03 kJ\n" + ] + } + ], + "source": [ + "import math #Part d\n", + "m = 1.5 #mass of water in surrounding, kg \n", + "dT = 14.2 #Change in temperature of water, °C or K\n", + "cp = 4.18 #Specific heat of water at constant pressure, J/(g.K)\n", + "\n", + "#Calculations\n", + "qp = m*cp*dT\n", + "\n", + "#Results\n", + "print 'Heat removed by water at constant pressure %4.2f kJ'%qp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.4:pg-32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For reverssible Isothermal expansion\n", + "Work done = -1.93e+02 J\n", + "For Single step reverssible expansion\n", + "Work done = -9.22e+03 J\n", + "For Two step reverssible expansion\n", + "Work done = -1.29e+04 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "import math \n", + "n = 2.0 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, bar.L/(mol.K)\n", + "#For reverssible Isothermal expansion \n", + "Pi1 = 25.0 #Initial Pressure of ideal gas, bar\n", + "Vi1 = 4.50 #Initial volume of ideal gas, L\n", + "Pf1 = 4.50 #Fianl Pressure of ideal gas, bar\n", + "Pext = 4.50 #External pressure, bar \n", + "Pint = 11.0 #Intermediate pressure, bar\n", + "\n", + "#Calcualtions reverssible Isothermal expansion \n", + "T1 = Pi1*Vi1/(n*R)\n", + "Vf1 = n*R*T1/Pf1\n", + "w = -n*R*T1*log(Vf1/Vi1)\n", + "\n", + "#Results\n", + "print 'For reverssible Isothermal expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Single step irreverssible expansion \n", + "\n", + "w = -Pext*1e5*(Vf1-Vi1)*1e-3\n", + "\n", + "#Results\n", + "print 'For Single step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Two step irreverssible expansion \n", + "Vint = n*R*T1/(Pint)\n", + "w = -Pint*1e5*(Vint-Vi1)*1e-3 - Pf1*1e5*(Vf1-Vint)*1e-3\n", + "\n", + "#Results\n", + "print 'For Two step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.5:pg-37" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Path q w DU DH \n", + "1-2 139463.96 -39840.00 99623.96 139463.96\n", + "2-3 -99623.96 0.00 -99623.96 -139463.96\n", + "3-1 -5343.33 5343.33 0.00 0.00\n", + "Overall 34496.67 -34496.67 0.00 0.00\n", + "all values are in J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 2.5 #moles of ideal gas\n", + "R = 0.08314 #Ideal gas constant, bar.L/(mol.K)\n", + "cvm = 20.79 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "p1 = 16.6 #Pressure at point 1, bar\n", + "v1 = 1.00 #Volume at point 1, L\n", + "p2 = 16.6 #Pressure at point 2, bar\n", + "v2 = 25.0 #Volume at point 2, L \n", + "v3 = 25.0 #Volume at point 3, L\n", + "\n", + "#Calculations\n", + "T1 = p1*v1/(n*R)\n", + "T2 = p2*v2/(n*R)\n", + "T3 = T1 #from problem statement\n", + " #for path 1-2\n", + "DU12 = n*cvm*(T2-T1)\n", + "w12 = -p1*1e5*(v2-v1)*1e-3\n", + "q12 = DU12 - w12\n", + "DH12 = DU12 + n*R*(T2-T1)*1e2\n", + "\n", + " #for path 2-3\n", + "w23 = 0.0\n", + "DU23 = q23 = n*cvm*(T3-T2)\n", + "DH23 = -DH12\n", + "\n", + "\n", + " #for path 3-1\n", + "DU31 = 0.0 #Isothemal process\n", + "DH31 = 0.0\n", + "w31 = -n*R*1e2*T1*log(v1/v3)\n", + "q31 = -w31\n", + "\n", + "DU = DU12+DU23+DU31\n", + "w = w12+w23+w31\n", + "q = q12+q23+q31\n", + "DH = DH12+DH23+DH31\n", + "\n", + "#Results\n", + "print 'For Path q w DU DH '\n", + "print '1-2 %7.2f %7.2f %7.2f %7.2f'%(q12,w12,DU12,DH12)\n", + "print '2-3 %7.2f %7.2f %7.2f %7.2f'%(q23,w23,DU23,DH23)\n", + "print '3-1 %7.2f %7.2f %7.2f %7.2f'%(q31,w31,DU31,DH31)\n", + "print 'Overall %7.2f %7.2f %7.2f %7.2f'%(q,w,DU,DH)\n", + "print 'all values are in J'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.6:pg-38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The final temperature at end of adiabatic procees is 268.5 K\n", + "The enthalpy change of adiabatic procees is -2937.0 J\n", + "The Internal energy change of adiabatic procees is -1762.2 J\n", + "The work done in expansion of adiabatic procees is -1762.2 J\n" + ] + } + ], + "source": [ + "\n", + "import math #Part d\n", + "n = 2.5 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "cvm = 12.47 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "pext = 1.00 #External Pressure, bar\n", + "Ti = 325. #Initial Temeprature, K\n", + "pi = 2.50 #Initial Pressure, bar\n", + "pf = 1.25 #Final pressure, bar \n", + "\n", + "#Calculations Adiabatic process q = 0; DU = w\n", + "q = 0.0 \n", + "Tf = Ti*(cvm + R*pext/pi)/(cvm + R*pext/pf )\n", + "DU = w = n*cvm*(Tf-Ti)\n", + "DH = DU + n*R*(Tf-Ti)\n", + "\n", + "#Results\n", + "print 'The final temperature at end of adiabatic procees is %4.1f K'%Tf\n", + "print 'The enthalpy change of adiabatic procees is %4.1f J'%DH\n", + "print 'The Internal energy change of adiabatic procees is %4.1f J'%DU\n", + "print 'The work done in expansion of adiabatic procees is %4.1f J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.7:pg-40" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature of cloud 265.2 K\n", + "You can expect cloud\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + " #Part d\n", + "h1 = 1000.0 #initial Altitude of cloud, m \n", + "hf = 3500.0 #Final Altitude of cloud, m \n", + "p1 = 0.802 #Pressure at h1, atm \n", + "pf = 0.602 #Pressure at hf, atm\n", + "T1 = 288.0 #Initial temperature of cloud, K\n", + "cp = 28.86 #Specific heat of air, J/mol.K\n", + "R = 8.314 #Gas constant, J/mol.K\n", + "\n", + "#Calculations\n", + "Tf = exp(-(cp/(cp-R)-1)/(cp/(cp-R))*log(p1/pf))*T1\n", + "#Results\n", + "print 'Final temperature of cloud %4.1f K'%Tf\n", + "if Tf < 273:\n", + " print 'You can expect cloud'\n", + "else:\n", + " print 'You can not expect cloud'" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_CaxDA59.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_CaxDA59.ipynb new file mode 100644 index 00000000..351d347c --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_CaxDA59.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Importance of State Functions: Internal Energy and Enthalpy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.2:pg-49" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure increase in capillary 100.0 bar\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "betaOH = 11.2e-4 #Thermal exapnasion coefficient of ethanol, °C\n", + "betagl = 2.00e-5 #Thermal exapnasion coefficient of glass, °C\n", + "kOH = 11.0e-5 #Isothermal compressibility of ethanol, /bar\n", + "dT = 10.0 #Increase in Temperature, °C\n", + "\n", + "#Calcualtions\n", + "vfbyvi = (1+ betagl*dT)\n", + "dP = betaOH*dT/kOH-(1./kOH)*log(vfbyvi)\n", + "\n", + "#Results\n", + "print 'Pressure increase in capillary %4.1f bar'%dP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.4:pg-53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum detectable temperature change of gas +- 6.0 °C\n" + ] + } + ], + "source": [ + "import math\n", + "cpsubysy = 1000 #Specific heat ration of surrounding and system\n", + "Tpreci = 0.006 #Precision in Temperature measurement, °C\n", + "\n", + "#Calcualtions\n", + "dtgas = -cpsubysy*(-Tpreci)\n", + "\n", + "#Results\n", + "print 'Minimum detectable temperature change of gas +-%4.1f °C'%dtgas" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.6:pg-54" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUT = 24.4 J: This is wrongly reported in book\n", + "dUV = 4174.1 J\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "\n", + "n = 1.0 #number of mole of N2, mol \n", + "Ti = 200.0 #Intial Temperature, K\n", + "Pi = 5.00 #Initial pressure, bar\n", + "Tf = 400.0 #Intial Temperature, K\n", + "Pf = 20.0 #Initial pressure, bar\n", + "a = 0.137 #van der Waals constant a, Pa.m3/(mol2)\n", + "b = 3.87e-5 #van der Waals constant b, m3/(mol)\n", + "A, B, C, D = 22.5, -1.187e-2,2.3968e-5, -1.0176e-8\n", + " #Constants in Cvm equation J, K and mol\n", + "vi = 3.28e-3 #initial volume, m3/mol\n", + "vf = 7.88e-3 #Final volume, m3/mol\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "dUT = n**2*a*(1./vi-1./vf)\n", + "dUV = integrate( A + B*T + C*T**2 + D*T**3, (T,Ti,Tf))\n", + "\n", + "#Results\n", + "print 'dUT = %4.1f J: This is wrongly reported in book'%dUT\n", + "print 'dUV = %4.1f J'%dUV" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.7:pg-57" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dH = 46.8 kJ\n", + "qp = 30.8 kJ\n", + "Error in calculations 34.3\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "import math\n", + "m = 143.0 #Mass of graphite, g \n", + "Ti = 300.0 #Intial Temperature, K\n", + "Tf = 600.0 #Intial Temperature, K\n", + "A, B, C, D, E = -12.19,0.1126,-1.947e-4,1.919e-7,-7.8e-11\n", + " #Constants in Cvm equation J, K and mol\n", + "M = 12.01\n", + "\n", + "#Calculations\n", + "\n", + "T = symbols('T')\n", + "dH = (m/M)*integrate( A + B*T + C*T**2 + D*T**3 + E*T**4, (T,Ti,Tf))\n", + "expr = A + B*T + C*T**2 + D*T**3 + E*T**4\n", + "cpm = expr.subs(T,300.)\n", + "qp = (m/M)*cpm*(Tf-Ti)\n", + "err = abs(dH-qp)/dH\n", + "#Results\n", + "print 'dH = %6.1f kJ'%(dH/1000)\n", + "print 'qp = %6.1f kJ'%(qp/1000)\n", + "print 'Error in calculations %4.1f'%(err*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.9:pg-59" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy change for change in state of methanol is 39.9 kJ\n" + ] + } + ], + "source": [ + "import math\n", + "m = 124.0 #Mass of liquid methanol, g\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "Ti = 298.0 #Intial Temperature, K\n", + "Pf = 2.5 #Final Pressure, bar\n", + "Tf = 425.0 #Intial Temperature, K\n", + "rho = 0.791 #Density, g/cc\n", + "Cpm = 81.1 #Specifi heat, J/(K.mol)\n", + "M = 32.04\n", + "\n", + "#Calculations\n", + "n = m/M\n", + "DH = n*Cpm*(Tf-Ti)+ m*(Pf-Pi)*1e-6/rho\n", + "\n", + "#Results\n", + "print 'Enthalpy change for change in state of methanol is %4.1f kJ'%(DH/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cg9aASj.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cg9aASj.ipynb new file mode 100644 index 00000000..860afddf --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cg9aASj.ipynb @@ -0,0 +1,172 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 08: Phase Diagrams and the Relative Stability of Solids, Liquids, and Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.2:Pg.No-195" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Latent heat of vaporization of benzene at 20°C 30.7 kJ/mol\n", + "Entropy Change of vaporization of benzene at 20°C 86.9 J/mol\n", + "Triple point temperature = 267.3 K for benzene\n", + "Triple point pressure = 3.53e+03 Pa for benzene\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + "\n", + "import math\n", + "Tn = 353.24 #normal boiling point of Benzene, K\n", + "pi = 1.19e4 #Vapor pressure of benzene at 20°C, Pa\n", + "DHf = 9.95 #Latent heat of fusion, kJ/mol\n", + "pv443 = 137. #Vapor pressure of benzene at -44.3°C, Pa\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "Pf = 101325 #Std. atmospheric pressure, Pa\n", + "T20 = 293.15 #Temperature in K\n", + "P0 = 1.\n", + "Pl = 10000.\n", + "Ts = -44.3 #Temperature of solid benzene, °C\n", + "\n", + "#Calculations\n", + "Ts = Ts + 273.15\n", + "#Part a\n", + "\n", + "DHv = -(R*math.log(Pf/pi))/(1./Tn-1./T20)\n", + "#Part b\n", + "\n", + "DSv = DHv/Tn\n", + "DHf = DHf*1e3\n", + "#Part c\n", + "\n", + "Ttp = -DHf/(R*(math.log(Pl/P0)-math.log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))\n", + "Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325\n", + "\n", + "#Results\n", + "print 'Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol'%(DHv/1000)\n", + "print 'Entropy Change of vaporization of benzene at 20°C %3.1f J/mol'%DSv\n", + "print 'Triple point temperature = %4.1f K for benzene'%Ttp\n", + "print 'Triple point pressure = %4.2e Pa for benzene'%Ptp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.3:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted by one leg 5.428e-05 N\n" + ] + } + ], + "source": [ + "from math import cos, pi\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 1.2e-4 #Radius of hemisphere, m\n", + "theta = 0.0 #Contact angle, rad\n", + "\n", + "#Calculations\n", + "DP = 2*gama*cos(theta)/r\n", + "F = DP*pi*r**2\n", + "\n", + "#Results\n", + "print 'Force exerted by one leg %5.3e N'%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.4:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height to which water can rise by capillary action is 0.74 m\n", + "This is very less than 100.0 n, hence water can not reach top of tree\n" + ] + } + ], + "source": [ + "from math import cos\n", + "\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 2e-5 #Radius of xylem, m\n", + "theta = 0.0 #Contact angle, rad\n", + "rho = 997.0 #Density of water, kg/m3\n", + "g = 9.81 #gravitational acceleration, m/s2\n", + "H = 100 #Height at top of redwood tree, m\n", + "\n", + "#Calculations\n", + "h = 2*gama/(rho*g*r*cos(theta))\n", + "\n", + "#Results\n", + "print 'Height to which water can rise by capillary action is %3.2f m'%h\n", + "print 'This is very less than %4.1f n, hence water can not reach top of tree'%H" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cmjo0dZ.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cmjo0dZ.ipynb new file mode 100644 index 00000000..6d251294 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cmjo0dZ.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Transport Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.1:pg-427" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion coefficient of Argon 1.1e-05 m2/s\n" + ] + } + ], + "source": [ + "from scipy import constants\n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Molecualar wt of Argon, kh/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "DAr = (1./3)*sqrt(8*R*T/(pi*M))*(R*T/(P*N_A*sqrt(2)*sigm))\n", + "\n", + "#Results\n", + "print 'Diffusion coefficient of Argon %3.1e m2/s'%DAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.2:pg-428" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of collision cross sections of Helium to Argon 0.790\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "DHebyAr = 4.0 \n", + "MAr, MHe = 39.9, 4.0 #Molecualar wt of Argon and Neon, kg/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "sigHebyAr = (1./DHebyAr)*sqrt(MAr/MHe)\n", + "\n", + "#Results\n", + "print 'Ratio of collision cross sections of Helium to Argon %4.3f'%sigHebyAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.3:pg-430" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rms displacement at 1000 and 10000 is 0.141 and 0.447 m respectively\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "D = 1.0e-5 #Diffusion coefficient, m2/s \n", + "t1 = 1000 #Time, s\n", + "t10 = 10000 #Time, s\n", + "\n", + "#Calculations\n", + "xrms1 = sqrt(2*D*t1)\n", + "xrms10 = sqrt(2*D*t10)\n", + "\n", + "#Results\n", + "print 'rms displacement at %4d and %4d is %4.3f and %4.3f m respectively'%(t1,t10,xrms1,xrms10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.4:pg-432" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time per random walk is 2.045e-11 s or 20.45 ps\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "D = 2.2e-5 #Diffusion coefficient of benzene, cm2/s \n", + "x0 = 0.3 #molecular diameter of benzene, nm\n", + "\n", + "#Calculations\n", + "t = (x0*1e-9)**2/(2*D*1e-4)\n", + "\n", + "#Results\n", + "print 'Time per random walk is %4.3e s or %4.2f ps'%(t,t/1e-12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.5:pg-434" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean free path 2.627e-07 m and collisional cross section 1.10e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "CvmbyNA = 3.*k/2\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "labda = 3*kt/(CvmbyNA*nuavg*N)\n", + "sigm = 1/(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Mean free path %4.3e m and collisional cross section %4.2e m2'%(labda, sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.6:pg-437" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional cross section 2.74e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 227. #Viscosity of Ar, muP\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "m = M*1e-3/NA\n", + "labda = 3.*eta*1e-7/(nuavg*N*m) #viscosity in kg m s units\n", + "sigm = 1./(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Collisional cross section %4.2e m2'%(sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.7:pg-439" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Flow rate is 2.762e-06 m3/s\n", + "Cylinder can be used for 4.381e+06 s nearly 50.7 days\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "m = 22.7 #Mass of CO2, kg\n", + "T = 293.0 #Temperature, K\n", + "L = 1.0 #length of the tube, m\n", + "d = 0.75 #Diameter of the tube, mm\n", + "eta = 146 #Viscosity of CO2, muP\n", + "p1 = 1.05 #Inlet pressure, atm\n", + "p2 = 1.00 #Outlet pressure, atm\n", + "atm2pa = 101325 #Conversion for pressure from atm to Pa \n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "R = 8.314 #Molar Gas constant, J mol^-1 K^-1\n", + "\n", + "#Calculations\n", + "p1 = p1*atm2pa\n", + "p2 = p2*atm2pa\n", + "F = pi*(d*1e-3/2)**4*(p1**2-p2**2)/(16.*eta/1.e7*L*p2)\n", + "nCO2 = m/M\n", + "v = nCO2*R*T/((p1+p2)/2)\n", + "t = v/F\n", + "\n", + "#Results\n", + "print 'Flow rate is %4.3e m3/s'%(F)\n", + "print 'Cylinder can be used for %4.3e s nearly %3.1f days'%(t, t/(24*3600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.8:pg-441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of protein is 3.550 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 0.891 #Viscosity of hemoglobin in water, cP\n", + "T = 298.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "D = 6.9e-11 #Diffusion coefficient, m2/s \n", + "\n", + "#Calculations\n", + "r = k*T/(6*pi*eta*1e-3*D)\n", + "\n", + "#Results\n", + "print 'Radius of protein is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.9:pg-442" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of Lysozyme particle is 1.937 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "s = 1.91e-13 #Sedimentation constant, s\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 14100.0 #Molecualr wt of lysozyme, g/mol\n", + "rho = 0.998 #Density of water, kg/m3\n", + "eta = 1.002 #Viscosity lysozyme in water, cP\n", + "T = 293.15 #Temperature, K\n", + "vbar = 0.703 #Specific volume of cm3/g\n", + "\n", + "#Calculations\n", + "m = M/NA\n", + "f = m*(1.-vbar*rho)/s\n", + "r = f/(6*pi*eta)\n", + "\n", + "#Results\n", + "print 'Radius of Lysozyme particle is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.10:pg-443" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw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ne+5uEBQTXJIw3oKu7/yLlPwSRRlDHIrJ7vdixVPihwMfA3kljqtz9T0A34C3gRcIO\noZjZ4cBP3f0eYAmw/y7eq97XSXjvvKTxzxOWMxdJCyosIrvXC5gB4O7vEPYBnxTdfxsodPdZ0Y6B\n6zzsCnoKYflxCPvGL4t256xz94rkN2jI6yS+d9L4NsDnzfXhRfaUCovI7p1M1LGY2QGE7XqPi+7v\nA/wjGncSYW8YgPOBN8yse/T4RHd/CXjLzA41s86Jb9CA1+mW+N5J4wcBk83stJR9YpEmUGERqYeZ\ndTezmwhfS33HzP6NMC+5hh1fhR0HvBndPh54Pbq9AuhP2NzraaCbmQ0i7MrZirCZVqLdvc6CpPdO\nHL+ZsH1sdVM+r0iqaKMvkRiYWT93fyPuHCLNQR2LSDySJ/9FsoY6FhERSSl1LCIiklIqLCIiklIq\nLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklL/H8qUwV6V+bCZAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9adf8d0>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope is 3.78e-04 1/min or 6.299e-06 1/s \n", + "Sedimentation factor is 1.899e-13 s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot,show,xlabel,ylabel\n", + "import math\n", + "%matplotlib inline\n", + "\n", + "#Variable Declaration\n", + "t = array([0.0,30.0,60.0,90.0,120.0,150.0]) #Time, min\n", + "xb = array([6.00,6.07,6.14,6.21,6.28,6.35]) #Location of boundary layer, cm\n", + "rpm = 55000. #RPM of centrifuge \n", + "\n", + "#Calculations\n", + "nx = xb/xb[0]\n", + "lnx = log(nx)\n", + "A = array([ t, ones(size(t))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,lnx)[0] # obtaining the parameters\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*t+intercept # regression line\n", + "\n", + "#Results\n", + "plot(t,line,'-',t,lnx,'o')\n", + "xlabel('$ Time, min $')\n", + "ylabel('$ \\log(x_b/x_{b0}) $')\n", + "show()\n", + "sbar = (slope/60)/(rpm*2*pi/60)**2\n", + "print 'Slope is %6.2e 1/min or %4.3e 1/s '%(slope, slope/60)\n", + "print 'Sedimentation factor is %4.3e s'%(sbar)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.11:pg-449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar conductivity of MgCl2 on infinite dilution is 0.0258 S.m2/mol\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "LMg = 0.0106 #Ionic conductance for Mg, S.m2/mol\n", + "LCl = 0.0076 #Ionic conductance for Cl, S.m2/mol\n", + "nMg, nCl = 1, 2 #Coefficients of Mg and Cl \n", + "\n", + "#Calculations\n", + "LMgCl2 = nMg*LMg + nCl*LCl\n", + "\n", + "#Results\n", + "print 'Molar conductivity of MgCl2 on infinite dilution is %5.4f S.m2/mol'%(LMgCl2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cyc7Mmj.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cyc7Mmj.ipynb new file mode 100644 index 00000000..2b5ef632 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Cyc7Mmj.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Electrolyte Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex10.2:Pg-252" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ionic streangth for NaCl solution is 0.050 and for Na2SO4 solution is 0.150, mol/kg\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "M = 0.050 #Molarity for NaCl and Na2SO4 solution, mol/kg\n", + "npa, zpa = 1, 1\n", + "nma, zma = 1, 1\n", + "npb, zpb = 2, 1\n", + "nmb, zmb = 1, 2\n", + "\n", + "#Calculations\n", + "Ia = M*(npa*zpa**2 + nma*zma**2)/2\n", + "Ib = M*(npb*zpb**2 + nmb*zmb**2)/2\n", + "\n", + "#Results\n", + "print 'Ionic streangth for NaCl solution is %4.3f and for Na2SO4 solution is %4.3f, mol/kg'%(Ia,Ib)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_D3h4rOH.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_D3h4rOH.ipynb new file mode 100644 index 00000000..cfc07351 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_D3h4rOH.ipynb @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Kinetic Theory of Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.1:pg-407" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Most probable speed of Ne and Krypton at 298 K are 498, 244 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "MNe = 0.020 #Molecular wt of Ne, kg/mol\n", + "MKr = 0.083 #Molecular wt of Kr, kg/mol\n", + "\n", + "#Calculations\n", + "vmpNe = sqrt(2*R*T/MNe)\n", + "vmpKr = sqrt(2*R*T/MKr)\n", + "\n", + "#Results\n", + "print 'Most probable speed of Ne and Krypton at 298 K are %4.0f, %4.0f m/s'%(vmpNe,vmpKr)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.2:pg-411" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum, average, root mean square speed of Ar\n", + "at 298 K are 352, 397, 431 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "\n", + "\n", + "#Calculations\n", + "vmp = sqrt(2*R*T/M)\n", + "vave = sqrt(8*R*T/(M*pi))\n", + "vrms = sqrt(3*R*T/M)\n", + "\n", + "#Results\n", + "print 'Maximum, average, root mean square speed of Ar\\nat 298 K are %4.0f, %4.0f, %4.0f m/s'%(vmp,vave,vrms)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.4, Page Numbe 413" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Collisions 2.45e+27 per s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "\n", + "#Calculations\n", + "Zc = P*NA/sqrt(2*pi*R*T*M)\n", + "Nc = Zc*V \n", + "#Results\n", + "print 'Number of Collisions %4.2e per s'%(Nc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.5:pg-414" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure after 1 hr of effusion is 9.996e-03 Pa\n" + ] + } + ], + "source": [ + "from math import sqrt, pi,exp\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P0 = 1013.25 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "t = 3600 #time of effusion, s\n", + "A = 0.01 #Area, um2\n", + "\n", + "#Calculations\n", + "A = A*1e-12\n", + "V = V*1e-3\n", + "expo = (A*t/V)*(k*T/(2*pi*M/NA))\n", + "P = P0*exp(-expo)\n", + "#Results\n", + "print 'Pressure after 1 hr of effusion is %4.3e Pa'%(P/101325)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.6:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Single particle collisional frequency is 6.9e+09 per s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "sigm = 5.2e-19 #m2\n", + "\n", + "#Calculations\n", + "zCO2 = (P*NA/(R*T))*sigm*sqrt(2)*sqrt(8*R*T/(pi*M)) \n", + "#Results\n", + "print 'Single particle collisional frequency is %4.1e per s'%(zCO2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.7:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional frequency is 3.14e+34 m-3s-1\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "MAr = 0.04 #Molecular wt of Ar, kg/mol\n", + "MKr = 0.084 #Molecular wt of Kr, kg/mol\n", + "pAr = 360 #Partial Pressure Ar, torr\n", + "pKr = 400 #Partial Pressure Kr, torr\n", + "rAr = 0.17e-9 #Hard sphere radius of Ar, m\n", + "rKr = 0.20e-9 #Hard sphere radius of Kr, m\n", + "NA = 6.022e23 #Number of particles per mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "\n", + "#Calculations\n", + "pAr = pAr*101325/760\n", + "pKr = pKr*101325/760\n", + "p1 = pAr*NA/(R*T)\n", + "p2 = pKr*NA/(R*T)\n", + "sigm = pi*(rAr+rKr)**2\n", + "mu = MAr*MKr/((MAr+MKr)*NA)\n", + "p3 = sqrt(8*k*T/(pi*mu)) \n", + "zArKr = p1*p2*sigm*p3\n", + "\n", + "#Results\n", + "print 'Collisional frequency is %4.2e m-3s-1'%(zArKr)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_DX44zmR.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_DX44zmR.ipynb new file mode 100644 index 00000000..7d42ed97 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_DX44zmR.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 04: Thermochemistry" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.1:pg-72" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Avergae Enthalpy change required for breaking both OH bonds 927.0 kJ/mol\n", + "Average bond energy required for breaking both OH bonds 461.0 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "DH0_H2O = 241.8 #Std Enthalpy of reaxtion of Water Fomation backward rxn, kJ/mol\n", + "DH0_2H = 2*218.0 #Std Enthalpy of formation of Hydrogen atom, kJ/mol\n", + "DH0_O = 249.2 #Std Enthalpy of formation of Oxygen atom, kJ/mol\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "Dn = 2.0\n", + "T = 298.15 #Std. Temperature, K\n", + "#Calculation\n", + "DH0_2HO = DH0_H2O + DH0_2H + DH0_O\n", + "DU0 = (DH0_2HO - Dn*R*T*1e-3)/2\n", + "\n", + "#Results\n", + "print 'Avergae Enthalpy change required for breaking both OH bonds %4.1f kJ/mol'%DH0_2HO\n", + "print 'Average bond energy required for breaking both OH bonds %4.1f kJ/mol'%DU0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.2:pg-74" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat of reaction for HCl formation is -95.1 kJ/mol\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "#Variable Declaration\n", + "a = ([29.064, 31.695, 28.165]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "b = ([-0.8363e-3, 10.143e-3, 1.809e-3]) #Constant 'b' in Heat capacity equation, J/(mol.K)\n", + "c = ([20.111e-7, -40.373e-7, 15.464e-7]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "delHf0HCl = -92.3 #Std. Heat of formation of HCl, kJ/mol\n", + "T1, T2 = 298.15, 1450 #Std and final temperature, K\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "DA = a[2]-(a[0]+a[1])/2\n", + "DB = b[2]-(b[0]+b[1])/2\n", + "DC = c[2]-(c[0]+c[1])/2\n", + "\n", + "expr = integrate( DA + DB*T + DC*T**2, (T,T1,T2))\n", + "DHR1450= expr/1000 + delHf0HCl\n", + "\n", + "#Results\n", + "print 'Heat of reaction for HCl formation is %4.1f kJ/mol'%DHR1450" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.3:pg-75" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calorimeter constant 7.59e+03 J/°C\n", + "Enthalpy of rection for benzene -3.26e+06 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms1 = 0.972 #Mass of cyclohexane, g\n", + "DT1 = 2.98 #Change in temperature for bath, °C\n", + "DUR1 = -3913e3 #Std Internal energy change, J/mol\n", + "mw = 1.812e3 #Mass of water, g\n", + "ms2 = 0.857 #Mass of benzene, g\n", + "Ms1 = 84.16\n", + "Ms2 = 78.12\n", + "DT2 = 2.36 #Change in temperature for bath, °C\n", + "Mw = 18.02\n", + "Cpw = 75.3 \n", + "\n", + "#Calculation\n", + "\n", + "Ccal = ((-ms1/Ms1)*DUR1-(mw/Mw)*Cpw*DT1)/DT1\n", + "DUR2 = (-Ms2/ms2)*((mw/Mw)*Cpw*DT2+Ccal*DT2)\n", + "\n", + "#Results\n", + "print 'Calorimeter constant %4.2e J/°C'%Ccal\n", + "print 'Enthalpy of rection for benzene %4.2e J/mol'%DUR2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.4:pg-77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy of solution for Na2SO4 -2.81e+03 J/mol\n", + "Enthalpy of solution for Na2SO4 from Data -2.40e+00 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms = 1.423 #Mass of Na2SO4, g\n", + "mw = 100.34 #Mass of Na2SO4, g\n", + "DT = 0.037 #Change in temperature for solution, K\n", + "Mw = 18.02 #Molecular wt of Water\n", + "Ms = 142.04 #Molecular wt of ms Na2SO4\n", + "Ccal = 342.5 #Calorimeter constant, J/K\n", + "#Data\n", + "DHfNa = -240.1\n", + "DHfSO4 = -909.3\n", + "DHfNa2SO4 = -1387.1\n", + "\n", + "#Calculation\n", + "DHs = (-Ms/ms)*((mw/Mw)*Cpw*DT+Ccal*DT)\n", + "DHsolD = 2*DHfNa + DHfSO4 - DHfNa2SO4\n", + "\n", + "#Results\n", + "print 'Enthalpy of solution for Na2SO4 %4.2e J/mol'%DHs\n", + "print 'Enthalpy of solution for Na2SO4 from Data %4.2e J/mol'%DHsolD" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_EDdenY2.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_EDdenY2.ipynb new file mode 100644 index 00000000..bb478dec --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_EDdenY2.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 07: Properties of Real Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex7.3:pg-175" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(V-Videal) -6.49 L\n", + "Percentage error -58.73\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "m = 1.0 #Mass of Methane, kg\n", + "T = 230 #Temeprature of Methane, K\n", + "P = 68.0 #Pressure, bar \n", + "Tc = 190.56 #Critical Temeprature of Methane\n", + "Pc = 45.99 #Critical Pressure of Methane\n", + "R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n", + "M = 16.04 #Molecular wt of Methane\n", + "\n", + "#Calcualtions\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "z = 0.63 #Methane compressibility factor\n", + "n = m*1e3/M\n", + "V = z*n*R*T/P\n", + "Vig = n*R*T/P\n", + "DV = (V - Vig)/V\n", + "\n", + "#Results\n", + "print '(V-Videal) %4.2f L'%(V-Vig)\n", + "print 'Percentage error %5.2f'%(DV*100)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Gn8Ls8Q.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Gn8Ls8Q.ipynb new file mode 100644 index 00000000..bfc29594 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Gn8Ls8Q.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Statistical Thermodyanamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.2:pg-374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Internal energy to be 1000.0 J temperature will be 449.0 K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "U = 1.00e3 #Total internal energy, J\n", + "hnu = 1.00e-20 #Energy level separation, J\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1 #Number of moles, mol\n", + "\n", + "#Calcualtions\n", + "T = hnu/(k*log(n*NA*hnu/U-1.))\n", + "\n", + "#Results\n", + "print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.3:pg-378" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of excited state is 1.57e-19 J\n", + "Electronic partition function qE is 3.000e+00\n", + "Electronic contribution to internal enrgy is 3.921e-06 J\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "g0 = 3.0 #Ground State partition function\n", + "labda = 1263e-9 #Wave length in nm\n", + "T = 500. #Temperature, K\n", + "c = 3.00e8 #Speed of light, m/s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1.0 #Number of moles, mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "\n", + "#Calcualtions\n", + "beta = 1./(k*T)\n", + "eps = h*c/labda\n", + "qE = g0 + exp(-beta*eps)\n", + "UE = n*NA*eps*exp(-beta*eps)/qE\n", + "\n", + "#Results\n", + "print 'Energy of excited state is %4.2e J'%eps\n", + "print 'Electronic partition function qE is %4.3e'%qE\n", + "print 'Electronic contribution to internal enrgy is %4.3e J'%UE" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.5:pg-387" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 2.25e-11 m3\n", + "Std. Molar entropy for Ne is 145.46 J/(mol.K)\n", + "Thermal wave lengths for Kr is 1.11e-11 m3\n", + "Std. Molar entropy for Kr is 163.18 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log, pi, sqrt\n", + "\n", + "#Variable Declaration\n", + "Mne = 0.0201797 #Molecular wt of ne, kg/mol \n", + "Mkr = 0.0837980 #Molecular wt of kr, kg/mol\n", + "Vmne = 0.0224 #Std. state molar volume of ne, m3\n", + "Vmkr = 0.0223 #Std. state molar volume of kr, m3\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298 #Std. state temeprature,K \n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "mne = Mne/NA\n", + "mkr = Mkr/NA\n", + "Labdane = sqrt(h**2/(2*pi*mne*k*T))\n", + "Labdakr = sqrt(h**2/(2*pi*mkr*k*T))\n", + "Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)\n", + "Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane\n", + "print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne\n", + "print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr\n", + "print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.8:pg-392" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 4.09e-33 m3\n", + "The Gibbs energy for 1 mol of Ar is -39.97 kJ\n" + ] + } + ], + "source": [ + "from math import log, pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Moleculat wt of Ar, kg/mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298.15 #Std. state temeprature,K \n", + "P = 1e5 #Std. state pressure, Pa\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "m = M/NA\n", + "Labda3 = (h**2/(2*pi*m*k*T))**(3./2)\n", + "G0 = -n*R*T*log(k*T/(P*Labda3))\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3\n", + "print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_H2F1LxB.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_H2F1LxB.ipynb new file mode 100644 index 00000000..2b5ef632 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_H2F1LxB.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Electrolyte Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex10.2:Pg-252" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ionic streangth for NaCl solution is 0.050 and for Na2SO4 solution is 0.150, mol/kg\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "M = 0.050 #Molarity for NaCl and Na2SO4 solution, mol/kg\n", + "npa, zpa = 1, 1\n", + "nma, zma = 1, 1\n", + "npb, zpb = 2, 1\n", + "nmb, zmb = 1, 2\n", + "\n", + "#Calculations\n", + "Ia = M*(npa*zpa**2 + nma*zma**2)/2\n", + "Ib = M*(npb*zpb**2 + nmb*zmb**2)/2\n", + "\n", + "#Results\n", + "print 'Ionic streangth for NaCl solution is %4.3f and for Na2SO4 solution is %4.3f, mol/kg'%(Ia,Ib)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_HQ89OkI.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_HQ89OkI.ipynb new file mode 100644 index 00000000..860afddf --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_HQ89OkI.ipynb @@ -0,0 +1,172 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 08: Phase Diagrams and the Relative Stability of Solids, Liquids, and Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.2:Pg.No-195" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Latent heat of vaporization of benzene at 20°C 30.7 kJ/mol\n", + "Entropy Change of vaporization of benzene at 20°C 86.9 J/mol\n", + "Triple point temperature = 267.3 K for benzene\n", + "Triple point pressure = 3.53e+03 Pa for benzene\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + "\n", + "import math\n", + "Tn = 353.24 #normal boiling point of Benzene, K\n", + "pi = 1.19e4 #Vapor pressure of benzene at 20°C, Pa\n", + "DHf = 9.95 #Latent heat of fusion, kJ/mol\n", + "pv443 = 137. #Vapor pressure of benzene at -44.3°C, Pa\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "Pf = 101325 #Std. atmospheric pressure, Pa\n", + "T20 = 293.15 #Temperature in K\n", + "P0 = 1.\n", + "Pl = 10000.\n", + "Ts = -44.3 #Temperature of solid benzene, °C\n", + "\n", + "#Calculations\n", + "Ts = Ts + 273.15\n", + "#Part a\n", + "\n", + "DHv = -(R*math.log(Pf/pi))/(1./Tn-1./T20)\n", + "#Part b\n", + "\n", + "DSv = DHv/Tn\n", + "DHf = DHf*1e3\n", + "#Part c\n", + "\n", + "Ttp = -DHf/(R*(math.log(Pl/P0)-math.log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))\n", + "Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325\n", + "\n", + "#Results\n", + "print 'Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol'%(DHv/1000)\n", + "print 'Entropy Change of vaporization of benzene at 20°C %3.1f J/mol'%DSv\n", + "print 'Triple point temperature = %4.1f K for benzene'%Ttp\n", + "print 'Triple point pressure = %4.2e Pa for benzene'%Ptp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.3:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted by one leg 5.428e-05 N\n" + ] + } + ], + "source": [ + "from math import cos, pi\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 1.2e-4 #Radius of hemisphere, m\n", + "theta = 0.0 #Contact angle, rad\n", + "\n", + "#Calculations\n", + "DP = 2*gama*cos(theta)/r\n", + "F = DP*pi*r**2\n", + "\n", + "#Results\n", + "print 'Force exerted by one leg %5.3e N'%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.4:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height to which water can rise by capillary action is 0.74 m\n", + "This is very less than 100.0 n, hence water can not reach top of tree\n" + ] + } + ], + "source": [ + "from math import cos\n", + "\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 2e-5 #Radius of xylem, m\n", + "theta = 0.0 #Contact angle, rad\n", + "rho = 997.0 #Density of water, kg/m3\n", + "g = 9.81 #gravitational acceleration, m/s2\n", + "H = 100 #Height at top of redwood tree, m\n", + "\n", + "#Calculations\n", + "h = 2*gama/(rho*g*r*cos(theta))\n", + "\n", + "#Results\n", + "print 'Height to which water can rise by capillary action is %3.2f m'%h\n", + "print 'This is very less than %4.1f n, hence water can not reach top of tree'%H" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Hl9us6l.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Hl9us6l.ipynb new file mode 100644 index 00000000..351d347c --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Hl9us6l.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Importance of State Functions: Internal Energy and Enthalpy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.2:pg-49" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure increase in capillary 100.0 bar\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "betaOH = 11.2e-4 #Thermal exapnasion coefficient of ethanol, °C\n", + "betagl = 2.00e-5 #Thermal exapnasion coefficient of glass, °C\n", + "kOH = 11.0e-5 #Isothermal compressibility of ethanol, /bar\n", + "dT = 10.0 #Increase in Temperature, °C\n", + "\n", + "#Calcualtions\n", + "vfbyvi = (1+ betagl*dT)\n", + "dP = betaOH*dT/kOH-(1./kOH)*log(vfbyvi)\n", + "\n", + "#Results\n", + "print 'Pressure increase in capillary %4.1f bar'%dP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.4:pg-53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum detectable temperature change of gas +- 6.0 °C\n" + ] + } + ], + "source": [ + "import math\n", + "cpsubysy = 1000 #Specific heat ration of surrounding and system\n", + "Tpreci = 0.006 #Precision in Temperature measurement, °C\n", + "\n", + "#Calcualtions\n", + "dtgas = -cpsubysy*(-Tpreci)\n", + "\n", + "#Results\n", + "print 'Minimum detectable temperature change of gas +-%4.1f °C'%dtgas" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.6:pg-54" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUT = 24.4 J: This is wrongly reported in book\n", + "dUV = 4174.1 J\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "\n", + "n = 1.0 #number of mole of N2, mol \n", + "Ti = 200.0 #Intial Temperature, K\n", + "Pi = 5.00 #Initial pressure, bar\n", + "Tf = 400.0 #Intial Temperature, K\n", + "Pf = 20.0 #Initial pressure, bar\n", + "a = 0.137 #van der Waals constant a, Pa.m3/(mol2)\n", + "b = 3.87e-5 #van der Waals constant b, m3/(mol)\n", + "A, B, C, D = 22.5, -1.187e-2,2.3968e-5, -1.0176e-8\n", + " #Constants in Cvm equation J, K and mol\n", + "vi = 3.28e-3 #initial volume, m3/mol\n", + "vf = 7.88e-3 #Final volume, m3/mol\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "dUT = n**2*a*(1./vi-1./vf)\n", + "dUV = integrate( A + B*T + C*T**2 + D*T**3, (T,Ti,Tf))\n", + "\n", + "#Results\n", + "print 'dUT = %4.1f J: This is wrongly reported in book'%dUT\n", + "print 'dUV = %4.1f J'%dUV" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.7:pg-57" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dH = 46.8 kJ\n", + "qp = 30.8 kJ\n", + "Error in calculations 34.3\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "import math\n", + "m = 143.0 #Mass of graphite, g \n", + "Ti = 300.0 #Intial Temperature, K\n", + "Tf = 600.0 #Intial Temperature, K\n", + "A, B, C, D, E = -12.19,0.1126,-1.947e-4,1.919e-7,-7.8e-11\n", + " #Constants in Cvm equation J, K and mol\n", + "M = 12.01\n", + "\n", + "#Calculations\n", + "\n", + "T = symbols('T')\n", + "dH = (m/M)*integrate( A + B*T + C*T**2 + D*T**3 + E*T**4, (T,Ti,Tf))\n", + "expr = A + B*T + C*T**2 + D*T**3 + E*T**4\n", + "cpm = expr.subs(T,300.)\n", + "qp = (m/M)*cpm*(Tf-Ti)\n", + "err = abs(dH-qp)/dH\n", + "#Results\n", + "print 'dH = %6.1f kJ'%(dH/1000)\n", + "print 'qp = %6.1f kJ'%(qp/1000)\n", + "print 'Error in calculations %4.1f'%(err*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.9:pg-59" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy change for change in state of methanol is 39.9 kJ\n" + ] + } + ], + "source": [ + "import math\n", + "m = 124.0 #Mass of liquid methanol, g\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "Ti = 298.0 #Intial Temperature, K\n", + "Pf = 2.5 #Final Pressure, bar\n", + "Tf = 425.0 #Intial Temperature, K\n", + "rho = 0.791 #Density, g/cc\n", + "Cpm = 81.1 #Specifi heat, J/(K.mol)\n", + "M = 32.04\n", + "\n", + "#Calculations\n", + "n = m/M\n", + "DH = n*Cpm*(Tf-Ti)+ m*(Pf-Pi)*1e-6/rho\n", + "\n", + "#Results\n", + "print 'Enthalpy change for change in state of methanol is %4.1f kJ'%(DH/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_KWcC9YQ.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_KWcC9YQ.ipynb new file mode 100644 index 00000000..bfc29594 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_KWcC9YQ.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Statistical Thermodyanamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.2:pg-374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Internal energy to be 1000.0 J temperature will be 449.0 K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "U = 1.00e3 #Total internal energy, J\n", + "hnu = 1.00e-20 #Energy level separation, J\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1 #Number of moles, mol\n", + "\n", + "#Calcualtions\n", + "T = hnu/(k*log(n*NA*hnu/U-1.))\n", + "\n", + "#Results\n", + "print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.3:pg-378" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of excited state is 1.57e-19 J\n", + "Electronic partition function qE is 3.000e+00\n", + "Electronic contribution to internal enrgy is 3.921e-06 J\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "g0 = 3.0 #Ground State partition function\n", + "labda = 1263e-9 #Wave length in nm\n", + "T = 500. #Temperature, K\n", + "c = 3.00e8 #Speed of light, m/s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "n = 1.0 #Number of moles, mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "\n", + "#Calcualtions\n", + "beta = 1./(k*T)\n", + "eps = h*c/labda\n", + "qE = g0 + exp(-beta*eps)\n", + "UE = n*NA*eps*exp(-beta*eps)/qE\n", + "\n", + "#Results\n", + "print 'Energy of excited state is %4.2e J'%eps\n", + "print 'Electronic partition function qE is %4.3e'%qE\n", + "print 'Electronic contribution to internal enrgy is %4.3e J'%UE" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.5:pg-387" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 2.25e-11 m3\n", + "Std. Molar entropy for Ne is 145.46 J/(mol.K)\n", + "Thermal wave lengths for Kr is 1.11e-11 m3\n", + "Std. Molar entropy for Kr is 163.18 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log, pi, sqrt\n", + "\n", + "#Variable Declaration\n", + "Mne = 0.0201797 #Molecular wt of ne, kg/mol \n", + "Mkr = 0.0837980 #Molecular wt of kr, kg/mol\n", + "Vmne = 0.0224 #Std. state molar volume of ne, m3\n", + "Vmkr = 0.0223 #Std. state molar volume of kr, m3\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298 #Std. state temeprature,K \n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "mne = Mne/NA\n", + "mkr = Mkr/NA\n", + "Labdane = sqrt(h**2/(2*pi*mne*k*T))\n", + "Labdakr = sqrt(h**2/(2*pi*mkr*k*T))\n", + "Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)\n", + "Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane\n", + "print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne\n", + "print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr\n", + "print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex15.8:pg-392" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave lengths for Ne is 4.09e-33 m3\n", + "The Gibbs energy for 1 mol of Ar is -39.97 kJ\n" + ] + } + ], + "source": [ + "from math import log, pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Moleculat wt of Ar, kg/mol\n", + "h = 6.626e-34 #Planks's Constant, J.s\n", + "NA = 6.022e23 #Avagadro's Number, 1/mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "T = 298.15 #Std. state temeprature,K \n", + "P = 1e5 #Std. state pressure, Pa\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "n = 1.0 #Number of mole, mol\n", + "\n", + "#Calcualtions\n", + "m = M/NA\n", + "Labda3 = (h**2/(2*pi*m*k*T))**(3./2)\n", + "G0 = -n*R*T*log(k*T/(P*Labda3))\n", + "\n", + "#Results\n", + "print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3\n", + "print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_L0LVinK.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_L0LVinK.ipynb new file mode 100644 index 00000000..1fc19029 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_L0LVinK.ipynb @@ -0,0 +1,171 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1. Fundamental Concepts of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.1:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final Tyre pressure is 3.61e+05 Pa\n" + ] + } + ], + "source": [ + "import math \n", + "Pi = 3.21e5 #Recommended tyre pressure, Pa\n", + "Ti = -5.00 #Initial Tyre temperature, °C\n", + "Tf = 28.00 #Final Tyre temperature, °C\n", + "\n", + "#Calculations\n", + "Ti = 273.16 + Ti\n", + "Tf = 273.16 + Tf\n", + "pf = Pi*Tf/Ti #Final tyre pressure, Pa\n", + "\n", + "#Results\n", + "print 'Final Tyre pressure is %6.2e Pa'%pf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.2:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Moles of He=0.121, Ne=0.303 and, Xe=0.040 in mol\n", + "Mole fraction of xHe=0.261, xNe=0.652 and, xXe=0.087\n", + "Final pressure is 1.917 bar\n", + "Partial pressure of pHe=0.500, pNe=1.250 and, pXe=0.167 in bar\n" + ] + } + ], + "source": [ + "import math \n", + "phe = 1.5 #Pressure in Helium chamber, bar\n", + "vhe = 2.0 #Volume of Helium chamber, L\n", + "pne = 2.5 #Pressure in Neon chamber, bar\n", + "vne = 3.0 #Volume of Neon chamber, L\n", + "pxe = 1.0 #Pressure in Xenon chamber, bar\n", + "vxe = 1.0 #Volume of Xenon chamber, L\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "#Calculations\n", + "\n", + "nhe = phe*vhe/(R*T) #Number of moles of Helium, mol\n", + "nne = pne*vne/(R*T) #Number of moles of Neon, mol\n", + "nxe = pxe*vxe/(R*T) #Number of moles of Xenon, mol\n", + "n = nhe + nne + nxe #Total number of moles, mol\n", + "V = vhe + vne + vxe #Total volume of system, L\n", + "xhe = nhe/n\n", + "xne = nne/n\n", + "xxe = nxe/n\n", + "P = n*R*T/(V)\n", + "phe = P*xhe #Partial pressure of Helium, bar\n", + "pne = P*xne #Partial pressure of Neon, bar\n", + "pxe = P*xxe #Partial pressure of Xenon, bar\n", + "\n", + "#Results\n", + "print 'Moles of He=%4.3f, Ne=%4.3f and, Xe=%4.3f in mol'%(nhe,nne,nxe) \n", + "print 'Mole fraction of xHe=%4.3f, xNe=%4.3f and, xXe=%4.3f'%(xhe,xne,xxe)\n", + "print 'Final pressure is %4.3f bar'%P\n", + "print 'Partial pressure of pHe=%4.3f, pNe=%4.3f and, pXe=%4.3f in bar'%(phe,pne,pxe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.4:pg-12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure from ideal gas law = 9.98e-02 bar nad from Van der Waals equation = 9.98e-02 bar \n", + "Pressure from ideal gas law = 249.4 bar nad from Van der Waals equation = 269.9 bar \n" + ] + } + ], + "source": [ + "\n", + "import math \n", + "T = 300.0 #Nitrogen temperature, K\n", + "v1 = 250.00 #Molar volume, L\n", + "v2 = 0.1 #Molar volume, L\n", + "a = 1.37 #Van der Waals parameter a, bar.dm6/mol2 \n", + "b = 0.0387 #Van der Waals parameter b, dm3/mol\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "n = 1.\n", + "#Calculations\n", + "\n", + "p1 = n*R*T/v1 \n", + "p2 = n*R*T/v2\n", + "pv1 = n*R*T/(v1-n*b)- n**2*a/v1**2\n", + "pv2 = n*R*T/(v2-n*b)- n**2*a/v2**2\n", + "\n", + "#Results\n", + "print 'Pressure from ideal gas law = %4.2e bar nad from Van der Waals equation = %4.2e bar '%(p1, pv1)\n", + "print 'Pressure from ideal gas law = %4.1f bar nad from Van der Waals equation = %4.1f bar '%(p2, pv2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Lf8vdtw.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Lf8vdtw.ipynb new file mode 100644 index 00000000..7d42ed97 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Lf8vdtw.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 04: Thermochemistry" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.1:pg-72" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Avergae Enthalpy change required for breaking both OH bonds 927.0 kJ/mol\n", + "Average bond energy required for breaking both OH bonds 461.0 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "DH0_H2O = 241.8 #Std Enthalpy of reaxtion of Water Fomation backward rxn, kJ/mol\n", + "DH0_2H = 2*218.0 #Std Enthalpy of formation of Hydrogen atom, kJ/mol\n", + "DH0_O = 249.2 #Std Enthalpy of formation of Oxygen atom, kJ/mol\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "Dn = 2.0\n", + "T = 298.15 #Std. Temperature, K\n", + "#Calculation\n", + "DH0_2HO = DH0_H2O + DH0_2H + DH0_O\n", + "DU0 = (DH0_2HO - Dn*R*T*1e-3)/2\n", + "\n", + "#Results\n", + "print 'Avergae Enthalpy change required for breaking both OH bonds %4.1f kJ/mol'%DH0_2HO\n", + "print 'Average bond energy required for breaking both OH bonds %4.1f kJ/mol'%DU0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.2:pg-74" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat of reaction for HCl formation is -95.1 kJ/mol\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "#Variable Declaration\n", + "a = ([29.064, 31.695, 28.165]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "b = ([-0.8363e-3, 10.143e-3, 1.809e-3]) #Constant 'b' in Heat capacity equation, J/(mol.K)\n", + "c = ([20.111e-7, -40.373e-7, 15.464e-7]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "delHf0HCl = -92.3 #Std. Heat of formation of HCl, kJ/mol\n", + "T1, T2 = 298.15, 1450 #Std and final temperature, K\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "DA = a[2]-(a[0]+a[1])/2\n", + "DB = b[2]-(b[0]+b[1])/2\n", + "DC = c[2]-(c[0]+c[1])/2\n", + "\n", + "expr = integrate( DA + DB*T + DC*T**2, (T,T1,T2))\n", + "DHR1450= expr/1000 + delHf0HCl\n", + "\n", + "#Results\n", + "print 'Heat of reaction for HCl formation is %4.1f kJ/mol'%DHR1450" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.3:pg-75" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calorimeter constant 7.59e+03 J/°C\n", + "Enthalpy of rection for benzene -3.26e+06 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms1 = 0.972 #Mass of cyclohexane, g\n", + "DT1 = 2.98 #Change in temperature for bath, °C\n", + "DUR1 = -3913e3 #Std Internal energy change, J/mol\n", + "mw = 1.812e3 #Mass of water, g\n", + "ms2 = 0.857 #Mass of benzene, g\n", + "Ms1 = 84.16\n", + "Ms2 = 78.12\n", + "DT2 = 2.36 #Change in temperature for bath, °C\n", + "Mw = 18.02\n", + "Cpw = 75.3 \n", + "\n", + "#Calculation\n", + "\n", + "Ccal = ((-ms1/Ms1)*DUR1-(mw/Mw)*Cpw*DT1)/DT1\n", + "DUR2 = (-Ms2/ms2)*((mw/Mw)*Cpw*DT2+Ccal*DT2)\n", + "\n", + "#Results\n", + "print 'Calorimeter constant %4.2e J/°C'%Ccal\n", + "print 'Enthalpy of rection for benzene %4.2e J/mol'%DUR2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.4:pg-77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy of solution for Na2SO4 -2.81e+03 J/mol\n", + "Enthalpy of solution for Na2SO4 from Data -2.40e+00 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms = 1.423 #Mass of Na2SO4, g\n", + "mw = 100.34 #Mass of Na2SO4, g\n", + "DT = 0.037 #Change in temperature for solution, K\n", + "Mw = 18.02 #Molecular wt of Water\n", + "Ms = 142.04 #Molecular wt of ms Na2SO4\n", + "Ccal = 342.5 #Calorimeter constant, J/K\n", + "#Data\n", + "DHfNa = -240.1\n", + "DHfSO4 = -909.3\n", + "DHfNa2SO4 = -1387.1\n", + "\n", + "#Calculation\n", + "DHs = (-Ms/ms)*((mw/Mw)*Cpw*DT+Ccal*DT)\n", + "DHsolD = 2*DHfNa + DHfSO4 - DHfNa2SO4\n", + "\n", + "#Results\n", + "print 'Enthalpy of solution for Na2SO4 %4.2e J/mol'%DHs\n", + "print 'Enthalpy of solution for Na2SO4 from Data %4.2e J/mol'%DHsolD" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MPQmYM0.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MPQmYM0.ipynb new file mode 100644 index 00000000..6d251294 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MPQmYM0.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Transport Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.1:pg-427" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion coefficient of Argon 1.1e-05 m2/s\n" + ] + } + ], + "source": [ + "from scipy import constants\n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Molecualar wt of Argon, kh/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "DAr = (1./3)*sqrt(8*R*T/(pi*M))*(R*T/(P*N_A*sqrt(2)*sigm))\n", + "\n", + "#Results\n", + "print 'Diffusion coefficient of Argon %3.1e m2/s'%DAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.2:pg-428" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of collision cross sections of Helium to Argon 0.790\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "DHebyAr = 4.0 \n", + "MAr, MHe = 39.9, 4.0 #Molecualar wt of Argon and Neon, kg/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "sigHebyAr = (1./DHebyAr)*sqrt(MAr/MHe)\n", + "\n", + "#Results\n", + "print 'Ratio of collision cross sections of Helium to Argon %4.3f'%sigHebyAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.3:pg-430" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rms displacement at 1000 and 10000 is 0.141 and 0.447 m respectively\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "D = 1.0e-5 #Diffusion coefficient, m2/s \n", + "t1 = 1000 #Time, s\n", + "t10 = 10000 #Time, s\n", + "\n", + "#Calculations\n", + "xrms1 = sqrt(2*D*t1)\n", + "xrms10 = sqrt(2*D*t10)\n", + "\n", + "#Results\n", + "print 'rms displacement at %4d and %4d is %4.3f and %4.3f m respectively'%(t1,t10,xrms1,xrms10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.4:pg-432" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time per random walk is 2.045e-11 s or 20.45 ps\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "D = 2.2e-5 #Diffusion coefficient of benzene, cm2/s \n", + "x0 = 0.3 #molecular diameter of benzene, nm\n", + "\n", + "#Calculations\n", + "t = (x0*1e-9)**2/(2*D*1e-4)\n", + "\n", + "#Results\n", + "print 'Time per random walk is %4.3e s or %4.2f ps'%(t,t/1e-12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.5:pg-434" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean free path 2.627e-07 m and collisional cross section 1.10e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "CvmbyNA = 3.*k/2\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "labda = 3*kt/(CvmbyNA*nuavg*N)\n", + "sigm = 1/(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Mean free path %4.3e m and collisional cross section %4.2e m2'%(labda, sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.6:pg-437" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional cross section 2.74e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 227. #Viscosity of Ar, muP\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "m = M*1e-3/NA\n", + "labda = 3.*eta*1e-7/(nuavg*N*m) #viscosity in kg m s units\n", + "sigm = 1./(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Collisional cross section %4.2e m2'%(sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.7:pg-439" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Flow rate is 2.762e-06 m3/s\n", + "Cylinder can be used for 4.381e+06 s nearly 50.7 days\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "m = 22.7 #Mass of CO2, kg\n", + "T = 293.0 #Temperature, K\n", + "L = 1.0 #length of the tube, m\n", + "d = 0.75 #Diameter of the tube, mm\n", + "eta = 146 #Viscosity of CO2, muP\n", + "p1 = 1.05 #Inlet pressure, atm\n", + "p2 = 1.00 #Outlet pressure, atm\n", + "atm2pa = 101325 #Conversion for pressure from atm to Pa \n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "R = 8.314 #Molar Gas constant, J mol^-1 K^-1\n", + "\n", + "#Calculations\n", + "p1 = p1*atm2pa\n", + "p2 = p2*atm2pa\n", + "F = pi*(d*1e-3/2)**4*(p1**2-p2**2)/(16.*eta/1.e7*L*p2)\n", + "nCO2 = m/M\n", + "v = nCO2*R*T/((p1+p2)/2)\n", + "t = v/F\n", + "\n", + "#Results\n", + "print 'Flow rate is %4.3e m3/s'%(F)\n", + "print 'Cylinder can be used for %4.3e s nearly %3.1f days'%(t, t/(24*3600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.8:pg-441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of protein is 3.550 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 0.891 #Viscosity of hemoglobin in water, cP\n", + "T = 298.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "D = 6.9e-11 #Diffusion coefficient, m2/s \n", + "\n", + "#Calculations\n", + "r = k*T/(6*pi*eta*1e-3*D)\n", + "\n", + "#Results\n", + "print 'Radius of protein is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.9:pg-442" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of Lysozyme particle is 1.937 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "s = 1.91e-13 #Sedimentation constant, s\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 14100.0 #Molecualr wt of lysozyme, g/mol\n", + "rho = 0.998 #Density of water, kg/m3\n", + "eta = 1.002 #Viscosity lysozyme in water, cP\n", + "T = 293.15 #Temperature, K\n", + "vbar = 0.703 #Specific volume of cm3/g\n", + "\n", + "#Calculations\n", + "m = M/NA\n", + "f = m*(1.-vbar*rho)/s\n", + "r = f/(6*pi*eta)\n", + "\n", + "#Results\n", + "print 'Radius of Lysozyme particle is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.10:pg-443" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAETCAYAAAAVhSD9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4lOW9//H3F2lcqlCXU5SAEINbUVBQREGJCwrYymnP\nUq22im3FBVFxrb3yKz2prfZYXIqniFKXqgWXKlTREsW4YNkKAWQRiIFCIigqm1YCyff3x/0g0ymB\nkEzyzPJ5XZeXM8/cM/OZXMZvvnM/z32buyMiIpIqreIOICIi2UWFRUREUkqFRUREUkqFRUREUkqF\nRUREUkqFRUREUiq2wmJmA8xsiZktNbNb6xlzv5ktM7NyMzsh4XhbM3vGzBab2UIzO6XlkouIyK7E\nUljMrBUwGjgP6ApcZGbHJI0ZCBS6+5HAUGBMwsP3AZPd/VigO7C4RYKLiMhuxdWx9AKWuftKd98K\njAcGJ40ZDDwO4O4zgLZm1s7M2gCnu/sj0WPb3H1jC2YXEZFdiKuw5AOrEu6vjo7takxVdKwAWGdm\nj5jZHDMba2b7NmtaERFpsEycvG8N9AAecPcewOfAbfFGEhGR7VrH9L5VwOEJ9ztEx5LHdKxnzCp3\nnx3dfhaob/JfC6GJiOwhd7emPD+ujmUW0MXMOplZHnAhMClpzCTgBwBm1htY7+5r3X0tsMrMjorG\nnQ0squ+N3D2t//nZz34WewblVE7lVM7t/6RCLB2Lu9ea2TBgCqG4jXP3xWY2NDzsY919spkNMrPl\nwGfAkISXGA48aWZfAd5PekxERGIU11dhuPsrwNFJxx5Muj+snufOA05uvnQiItJYmTh5n1WKiori\njtAgyplayplaypleLFXfqaUjM/Ns/nwiIqlmZniGTt6LiEiWUmEREZGUUmEREZGUUmEREckwlSsq\nuWT4JZ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UaKpY970UyxImEtai2mtl3gF+7+1IzW+/uE+II5GG/jO/tdqBIjNSxiNRvqYfN4gCOcvel0e33\n4gokkgnUsYjUw6PdPs2sC2ERvu37q5xhZoXu/pyZ9QX+Eygj/KFWBLwM/Fv0Go9HzxtA2OZ1C/Cc\nR5tpbdeQ14ne+5uEBQTXJIw3oKu7/yLlPwSRRlDHIrJ7vdixVPihwMfA3kljqtz9T0A34C3gRcIO\noZjZ4cBP3f0eYAmw/y7eq97XSXjvvKTxzxOWMxdJCyosIrvXC5gB4O7vEPYBnxTdfxsodPdZ0Y6B\n6zzsCnoKYflxCPvGL4t256xz94rkN2jI6yS+d9L4NsDnzfXhRfaUCovI7p1M1LGY2QGE7XqPi+7v\nA/wjGncSYW8YgPOBN8yse/T4RHd/CXjLzA41s86Jb9CA1+mW+N5J4wcBk83stJR9YpEmUGERqYeZ\ndTezmwhfS33HzP6NMC+5hh1fhR0HvBndPh54Pbq9AuhP2NzraaCbmQ0i7MrZirCZVqLdvc6CpPdO\nHL+ZsH1sdVM+r0iqaKMvkRiYWT93fyPuHCLNQR2LSDySJ/9FsoY6FhERSSl1LCIiklIqLCIiklIq\nLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklL/H8qUwV6V+bCZAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9adf8d0>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope is 3.78e-04 1/min or 6.299e-06 1/s \n", + "Sedimentation factor is 1.899e-13 s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot,show,xlabel,ylabel\n", + "import math\n", + "%matplotlib inline\n", + "\n", + "#Variable Declaration\n", + "t = array([0.0,30.0,60.0,90.0,120.0,150.0]) #Time, min\n", + "xb = array([6.00,6.07,6.14,6.21,6.28,6.35]) #Location of boundary layer, cm\n", + "rpm = 55000. #RPM of centrifuge \n", + "\n", + "#Calculations\n", + "nx = xb/xb[0]\n", + "lnx = log(nx)\n", + "A = array([ t, ones(size(t))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,lnx)[0] # obtaining the parameters\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*t+intercept # regression line\n", + "\n", + "#Results\n", + "plot(t,line,'-',t,lnx,'o')\n", + "xlabel('$ Time, min $')\n", + "ylabel('$ \\log(x_b/x_{b0}) $')\n", + "show()\n", + "sbar = (slope/60)/(rpm*2*pi/60)**2\n", + "print 'Slope is %6.2e 1/min or %4.3e 1/s '%(slope, slope/60)\n", + "print 'Sedimentation factor is %4.3e s'%(sbar)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.11:pg-449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar conductivity of MgCl2 on infinite dilution is 0.0258 S.m2/mol\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "LMg = 0.0106 #Ionic conductance for Mg, S.m2/mol\n", + "LCl = 0.0076 #Ionic conductance for Cl, S.m2/mol\n", + "nMg, nCl = 1, 2 #Coefficients of Mg and Cl \n", + "\n", + "#Calculations\n", + "LMgCl2 = nMg*LMg + nCl*LCl\n", + "\n", + "#Results\n", + "print 'Molar conductivity of MgCl2 on infinite dilution is %5.4f S.m2/mol'%(LMgCl2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MS7AyON.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MS7AyON.ipynb new file mode 100644 index 00000000..076c1413 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_MS7AyON.ipynb @@ -0,0 +1,700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 06: Chemical Equilibrium" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.1:pg-126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Available work through combustion of CH4 -813.6 kJ/mol\n", + "Maximum Available work through combustion of C8H18 -5320.9 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dACH4 = dHcCH4*1e3 - dnCH4*R*T - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dAC8H18 = dHcC8H18*1e3 - dnC8H18*R*T - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum Available work through combustion of CH4 %4.1f kJ/mol'%(dACH4/1000)\n", + "print 'Maximum Available work through combustion of C8H18 %4.1f kJ/mol'%(dAC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.2:pg-128" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum nonexapnasion work through combustion of CH4 -818.6 kJ/mol\n", + "Maximum nonexapnasion work through combustion of C8H18 -5309.8 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dGCH4 = dHcCH4*1e3 - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dGC8H18 = dHcC8H18*1e3 - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum nonexapnasion work through combustion of CH4 %4.1f kJ/mol'%(dGCH4/1000)\n", + "print 'Maximum nonexapnasion work through combustion of C8H18 %4.1f kJ/mol'%(dGC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.4:pg-133" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy of formation for Fe(g) at 400 K is 355.1 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGf298 = 370.7 #Std. free energy of formation for Fe (g), kJ/mol\n", + "dHf298 = 416.3 #Std. Enthalpy of formation for Fe (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 400. #Temperature in K\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "\n", + "dGf = T*(dGf298*1e3/T0 + dHf298*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. free energy of formation for Fe(g) at 400 K is %4.1f kJ/mol'%(dGf/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.5:pg-137" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy Change on mixing is -2.8e+04 J\n", + "Std. entropy Change on mixing is -93.3 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "nHe = 1.0 #Number of moles of He\n", + "nNe = 3.0 #Number of moles of Ne\n", + "nAr = 2.0 #Number of moles of Ar\n", + "nXe = 2.5 #Number of moles of Xe\n", + "T = 298.15 #Temperature in K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "n = nHe + nNe + nAr + nXe\n", + "dGmix = n*R*T*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "dSmix = n*R*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "\n", + "#Results \n", + "print 'Std. free energy Change on mixing is %3.1e J'%(dGmix)\n", + "print 'Std. entropy Change on mixing is %4.1f J'%(dSmix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.6:pg-138" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 67.00 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGfFe = 0.0 #Std. Gibbs energy of formation for Fe (S), kJ/mol\n", + "dGfH2O = -237.1 #Std. Gibbs energy of formation for Water (g), kJ/mol\n", + "dGfFe2O3 = -1015.4 #Std. Gibbs energy of formation for Fe2O3 (s), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dGR = nFe*dGfFe + nH2O*dGfH2O + nFe2O3*dGfFe2O3 + nH2*dGfH2 \n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.2f kJ/mol'%(dGR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.7:pg-139" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Enthalpy change for reactionat 525.0 is -24.80 kJ/mol\n", + "Std. Gibbs energy change for reactionat 525.0 is 137 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGR = 67.0 #Std. Gibbs energy of formation for reaction, kJ, from previous problem\n", + "dHfFe = 0.0 #Enthalpy of formation for Fe (S), kJ/mol\n", + "dHfH2O = -285.8 #Enthalpy of formation for Water (g), kJ/mol\n", + "dHfFe2O3 = -1118.4 #Enthalpy of formation for Fe2O3 (s), kJ/mol\n", + "dHfH2 = 0.0 #Enthalpy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 525. #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dHR = nFe*dHfFe + nH2O*dHfH2O + nFe2O3*dHfFe2O3 + nH2*dHfH2 \n", + "dGR2 = T*(dGR*1e3/T0 + dHR*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. Enthalpy change for reactionat %4.1f is %4.2f kJ/mol'%(T, dHR)\n", + "print 'Std. Gibbs energy change for reactionat %4.1f is %4.0f kJ/mol'%(T, dGR2/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.8:pg-140" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 1.337 kJ/mol\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "dGfNO2 = 51.3 #Std. Gibbs energy of formation for NO2 (g), kJ/mol\n", + "dGfN2O4 = 99.8 #Std. Gibbs energy of formation for N2O4 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "pNO2 = 0.350 #Partial pressure of NO2, bar\n", + "pN2O4 = 0.650 #Partial pressure of N2O4, bar\n", + "R = 8.314\n", + "nNO2, nN2O4 = -2, 1 #Stoichiomentric coeff of NO2 and N2O4 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nN2O4*dGfN2O4*1e3 + nNO2*dGfNO2*1e3 + R*T0*log(pN2O4/(pNO2)**2)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.9:pg-141" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is -0.020 kJ/mol\n", + "Equilibrium constant for reaction is 3323.254 \n", + "Kp >> 1. hence, mixture will consists of product CO2 and H2\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dGfCO = 237.1 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dGfH2O = 137.2 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCO2, nH2, nCO, nH2O = 1,1,1,1 #Stoichiomentric coeff of CO2,H2,CO,H2O respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCO2*dGfCO2 + nH2*dGfH2 + nCO*dGfCO + nH2O*dGfH2O\n", + "Kp = exp(-dGR*1e3/(R*T0))\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)\n", + "print 'Equilibrium constant for reaction is %5.3f '%(Kp)\n", + "if Kp > 1: print 'Kp >> 1. hence, mixture will consists of product CO2 and H2'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.11:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part A\n", + "Std. Gibbs energy change for reaction is 211.400 kJ/mol\n", + "Std. Enthalpy change for reaction is 242.600 kJ/mol\n", + "Equilibrium constants at 800, 1500, and 2000 K are 4.223e-11, 1.042e-03, and 1.349e-01\n", + "Part B\n", + "Degree of dissociation at 800, 1500, and 2000 K are 3.249e-05, 1.593e-01, and 8.782e-01\n" + ] + } + ], + "source": [ + "from math import exp, sqrt\n", + "\n", + "dGfCl2 = 0.0 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfCl = 105.7 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dHfCl2 = 0.0 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dHfCl = 121.3 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCl2, nCl= -1,2 #Stoichiomentric coeff of Cl2,Cl respectively in reaction\n", + "PbyP0 = 0.01\n", + "#Calculations\n", + "dGR = nCl*dGfCl + nCl2*dGfCl2 \n", + "dHR = nCl*dHfCl + nCl2*dHfCl2 \n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "Kp8 = func(800)\n", + "Kp15 = func(1500)\n", + "Kp20 = func(2000)\n", + "DDiss = lambda K: sqrt(K/(K+4*PbyP0))\n", + "alp8 = DDiss(Kp8)\n", + "alp15 = DDiss(Kp15)\n", + "alp20 = DDiss(Kp20)\n", + "\n", + "#Results \n", + "print 'Part A'\n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %5.3f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(Kp8,Kp15,Kp20)\n", + "\n", + "print 'Part B'\n", + "print 'Degree of dissociation at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(alp8,alp15,alp20)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.12:pg-145" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 131.1 kJ/mol\n", + "Std. Enthalpy change for reaction is 178.5 kJ/mol\n", + "Equilibrium constants at 1000, 1100, and 1200 K are 0.0956, 0.673e, and 3.423\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCaCO3 = -1128.8 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCaO = -603.3 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for O2 (g), kJ/mol\n", + "dHfCaCO3 = -1206.9 #Std. Enthalpy Change of formation for CaCO3 (s), kJ/mol\n", + "dHfCaO = -634.9 #Std. Enthalpy Change of formation for CaO (s), kJ/mol\n", + "dHfCO2 = -393.5 #Std. Enthalpy Change of formation for O2 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCaCO3, nCaO, nO2 = -1,1,1 #Stoichiomentric coeff of CaCO3, CaO, O2 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCaO*dGfCaO + nO2*dGfCO2 + nCaCO3*dGfCaCO3\n", + "dHR = nCaO*dHfCaO + nO2*dHfCO2 + nCaCO3*dHfCaCO3\n", + "\n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "\n", + "Kp10 = func(1000)\n", + "Kp11 = func(1100)\n", + "Kp12 = func(1200)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.1f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %4.1f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 1000, 1100, and 1200 K are %4.4f, %4.3fe, and %4.3f'%(Kp10,Kp11,Kp12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.13:pg-146" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at which graphite and dimond will be in equilibrium is 1.51e+04 bar\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCG = 0.0 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCD = 2.90 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "rhoG = 2.25e3 #Density of Graphite, kg/m3\n", + "rhoD = 3.52e3 #Density of dimond, kg/m3\n", + "T0 = 298.15 #Std. Temperature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K) \n", + "P0 = 1.0 #Pressure, bar\n", + "M = 12.01 #Molceular wt of Carbon\n", + "#Calculations\n", + "P = P0*1e5 + dGfCD*1e3/((1./rhoG-1./rhoD)*M*1e-3)\n", + "\n", + "#Results \n", + "print 'Pressure at which graphite and dimond will be in equilibrium is %4.2e bar'%(P/1e5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.14:pg-154" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUbydV = 1.42e+03 bar\n", + "dVbyV = 6.519 percent\n", + "dUbydVm = 9e+02 atm\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "\n", + "beta = 2.04e-4 #Thermal exapansion coefficient, /K\n", + "kapa = 45.9e-6 #Isothermal compressibility, /bar\n", + "T = 298.15 #Std. Temperature, K\n", + "R = 8.206e-2 #Ideal gas constant, atm.L/(mol.K) \n", + "T1 = 320.0 #Temperature, K\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "V = 1.00 #Volume, m3\n", + "a = 1.35 #van der Waals constant a for nitrogen, atm.L2/mol2\n", + "\n", + "#Calculations\n", + "dUbydV = Pf = (beta*T1-kapa*P0)/kapa\n", + "dVT = V*kapa*(Pf-Pi)\n", + "dVbyV = dVT*100/V\n", + "Vm = Pi/(R*T1)\n", + "dUbydVm = a/(Vm**2)\n", + "\n", + "#Results \n", + "print 'dUbydV = %4.2e bar'%(dUbydV)\n", + "print 'dVbyV = %4.3f percent'%(dVbyV)\n", + "print 'dUbydVm = %4.0e atm'%(dUbydVm)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.15:pg-155" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Internal energy change is 4.06e+04 J/mol in which \n", + "contribution of temeprature dependent term 99.9999 percent\n", + "Enthalpy change is 4.185e+04 J/mol in which \n", + "contribution of temeprature dependent term 100.0 percent\n" + ] + } + ], + "source": [ + "from math import exp, log\n", + "\n", + "m = 1000.0 #mass of mercury, g\n", + "Pi, Ti = 1.00, 300.0 #Intial pressure and temperature, bar, K\n", + "Pf, Tf = 300., 600.0 #Final pressure and temperature, bar, K\n", + "rho = 13534. #Density of mercury, kg/m3\n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "Cpm = 27.98 #Molar Specific heat at constant pressure, J/(mol.K) \n", + "M = 200.59 #Molecular wt of Hg, g/mol\n", + "\n", + "#Calculations\n", + "Vi = m*1e-3/rho\n", + "Vf = Vi*exp(-kapa*(Pf-Pi))\n", + "Ut = m*Cpm*(Tf-Ti)/M \n", + "Up = (beta*Ti/kapa-Pi)*1e5*(Vf-Vi) + (Vi-Vf+Vf*log(Vf/Vi))*1e5/kapa\n", + "dU = Ut + Up\n", + "Ht = m*Cpm*(Tf-Ti)/M\n", + "Hp = ((1 + beta*(Tf-Ti))*Vi*exp(-kapa*Pi)/kapa)*(exp(-kapa*Pi)-exp(-kapa*Pf))\n", + "dH = Ht + Hp\n", + "#Results\n", + "print 'Internal energy change is %6.2e J/mol in which \\ncontribution of temeprature dependent term %6.4f percent'%(dU,Ut*100/dH)\n", + "print 'Enthalpy change is %4.3e J/mol in which \\ncontribution of temeprature dependent term %4.1f percent'%(dH,Ht*100/dH)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.16:pg-156" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in molar specific heats \n", + "at constant volume and constant pressure 3.73e-03 J/(mol.K)\n", + "Molar Specific heat of Hg at const. volume is 27.98 J/(mol.K)\n" + ] + } + ], + "source": [ + "import math\n", + "T = 300.0 #Temperature of Hg, K \n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "M = 0.20059 #Molecular wt of Hg, kg/mol \n", + "rho = 13534 #Density of mercury, kg/m3\n", + "Cpm = 27.98 #Experimental Molar specif heat at const pressure for mercury, J/(mol.K)\n", + "\n", + "#Calculations\n", + "Vm = M/rho\n", + "DCpmCv = T*Vm*beta**2/kapa\n", + "Cvm = Cpm - DCpmCv\n", + "#Results\n", + "print 'Difference in molar specific heats \\nat constant volume and constant pressure %4.2e J/(mol.K)'%DCpmCv\n", + "print 'Molar Specific heat of Hg at const. volume is %4.2f J/(mol.K)'%Cvm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.17:pg-158" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar Gibbs energy of Ar -46.154 kJ/mol\n", + "Molar Gibbs energy of Water -306.658 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "T = 298.15 #Std. Temperature, K \n", + "P = 1.0 #Initial Pressure, bar\n", + "Hm0, Sm0 = 0.0,154.8 #Std. molar enthalpy and entropy of Ar(g), kJ, mol, K units\n", + "Sm0H2, Sm0O2 = 130.7,205.2 #Std. molar entropy of O2 and H2 (g), kJ/(mol.K)\n", + "dGfH2O = -237.1 #Gibbs energy of formation for H2O(l), kJ/mol \n", + "nH2, nO2 = 1, 1./2 #Stoichiomentric coefficients for H2 and O2 in water formation reaction \n", + "\n", + "#Calculations\n", + "Gm0 = Hm0 - T*Sm0\n", + "dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)\n", + "#Results\n", + "print 'Molar Gibbs energy of Ar %4.3f kJ/mol'%(Gm0/1e3)\n", + "print 'Molar Gibbs energy of Water %4.3f kJ/mol'%(dGmH2O/1e3)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_OjcoXgK.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_OjcoXgK.ipynb new file mode 100644 index 00000000..351d347c --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_OjcoXgK.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Importance of State Functions: Internal Energy and Enthalpy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.2:pg-49" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure increase in capillary 100.0 bar\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "betaOH = 11.2e-4 #Thermal exapnasion coefficient of ethanol, °C\n", + "betagl = 2.00e-5 #Thermal exapnasion coefficient of glass, °C\n", + "kOH = 11.0e-5 #Isothermal compressibility of ethanol, /bar\n", + "dT = 10.0 #Increase in Temperature, °C\n", + "\n", + "#Calcualtions\n", + "vfbyvi = (1+ betagl*dT)\n", + "dP = betaOH*dT/kOH-(1./kOH)*log(vfbyvi)\n", + "\n", + "#Results\n", + "print 'Pressure increase in capillary %4.1f bar'%dP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.4:pg-53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum detectable temperature change of gas +- 6.0 °C\n" + ] + } + ], + "source": [ + "import math\n", + "cpsubysy = 1000 #Specific heat ration of surrounding and system\n", + "Tpreci = 0.006 #Precision in Temperature measurement, °C\n", + "\n", + "#Calcualtions\n", + "dtgas = -cpsubysy*(-Tpreci)\n", + "\n", + "#Results\n", + "print 'Minimum detectable temperature change of gas +-%4.1f °C'%dtgas" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.6:pg-54" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUT = 24.4 J: This is wrongly reported in book\n", + "dUV = 4174.1 J\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "\n", + "n = 1.0 #number of mole of N2, mol \n", + "Ti = 200.0 #Intial Temperature, K\n", + "Pi = 5.00 #Initial pressure, bar\n", + "Tf = 400.0 #Intial Temperature, K\n", + "Pf = 20.0 #Initial pressure, bar\n", + "a = 0.137 #van der Waals constant a, Pa.m3/(mol2)\n", + "b = 3.87e-5 #van der Waals constant b, m3/(mol)\n", + "A, B, C, D = 22.5, -1.187e-2,2.3968e-5, -1.0176e-8\n", + " #Constants in Cvm equation J, K and mol\n", + "vi = 3.28e-3 #initial volume, m3/mol\n", + "vf = 7.88e-3 #Final volume, m3/mol\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "dUT = n**2*a*(1./vi-1./vf)\n", + "dUV = integrate( A + B*T + C*T**2 + D*T**3, (T,Ti,Tf))\n", + "\n", + "#Results\n", + "print 'dUT = %4.1f J: This is wrongly reported in book'%dUT\n", + "print 'dUV = %4.1f J'%dUV" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.7:pg-57" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dH = 46.8 kJ\n", + "qp = 30.8 kJ\n", + "Error in calculations 34.3\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "import math\n", + "m = 143.0 #Mass of graphite, g \n", + "Ti = 300.0 #Intial Temperature, K\n", + "Tf = 600.0 #Intial Temperature, K\n", + "A, B, C, D, E = -12.19,0.1126,-1.947e-4,1.919e-7,-7.8e-11\n", + " #Constants in Cvm equation J, K and mol\n", + "M = 12.01\n", + "\n", + "#Calculations\n", + "\n", + "T = symbols('T')\n", + "dH = (m/M)*integrate( A + B*T + C*T**2 + D*T**3 + E*T**4, (T,Ti,Tf))\n", + "expr = A + B*T + C*T**2 + D*T**3 + E*T**4\n", + "cpm = expr.subs(T,300.)\n", + "qp = (m/M)*cpm*(Tf-Ti)\n", + "err = abs(dH-qp)/dH\n", + "#Results\n", + "print 'dH = %6.1f kJ'%(dH/1000)\n", + "print 'qp = %6.1f kJ'%(qp/1000)\n", + "print 'Error in calculations %4.1f'%(err*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.9:pg-59" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy change for change in state of methanol is 39.9 kJ\n" + ] + } + ], + "source": [ + "import math\n", + "m = 124.0 #Mass of liquid methanol, g\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "Ti = 298.0 #Intial Temperature, K\n", + "Pf = 2.5 #Final Pressure, bar\n", + "Tf = 425.0 #Intial Temperature, K\n", + "rho = 0.791 #Density, g/cc\n", + "Cpm = 81.1 #Specifi heat, J/(K.mol)\n", + "M = 32.04\n", + "\n", + "#Calculations\n", + "n = m/M\n", + "DH = n*Cpm*(Tf-Ti)+ m*(Pf-Pi)*1e-6/rho\n", + "\n", + "#Results\n", + "print 'Enthalpy change for change in state of methanol is %4.1f kJ'%(DH/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PE5hkZJ.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PE5hkZJ.ipynb new file mode 100644 index 00000000..2b5ef632 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PE5hkZJ.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Electrolyte Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex10.2:Pg-252" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ionic streangth for NaCl solution is 0.050 and for Na2SO4 solution is 0.150, mol/kg\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "M = 0.050 #Molarity for NaCl and Na2SO4 solution, mol/kg\n", + "npa, zpa = 1, 1\n", + "nma, zma = 1, 1\n", + "npb, zpb = 2, 1\n", + "nmb, zmb = 1, 2\n", + "\n", + "#Calculations\n", + "Ia = M*(npa*zpa**2 + nma*zma**2)/2\n", + "Ib = M*(npb*zpb**2 + nmb*zmb**2)/2\n", + "\n", + "#Results\n", + "print 'Ionic streangth for NaCl solution is %4.3f and for Na2SO4 solution is %4.3f, mol/kg'%(Ia,Ib)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoMDUmn.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoMDUmn.ipynb new file mode 100644 index 00000000..382b0ea4 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoMDUmn.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ensemble and Molecular Partition Function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.1:pg-344" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in energy levels is 3.10e-38 J or 1.56e-15 1/cm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "l = 0.01 #Box length, m \n", + "n1,n2 = 2,1 #Energy levels states\n", + "m = 5.31e-26 #mass of oxygen molecule, kg\n", + "\n", + "#Calculations \n", + "dE = (n1+n2)*h**2/(8*m*l**2)\n", + "dEcm = dE/(h*c*1e2)\n", + "#Results\n", + "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.2:pg-345" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave length is 1.60e-11 m and\n", + "Translational partition function is 2.44e+29\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "v = 1.0 #Volume, L\n", + "T = 298.0 #Temeprature of Ar, K\n", + "m = 6.63e-26 #Mass of Argon molecule, kg \n", + "\n", + "#Calculations \n", + "GAMA = h/sqrt(2*pi*m*k*T)\n", + "v = v*1e-3\n", + "qT3D = v/GAMA**3\n", + "\n", + "#Results\n", + "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.4:pg-350" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Spectrum will be observed at 494 K\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "J = 4 #Rotational energy level\n", + "B = 8.46 #Spectrum, 1/cm\n", + "\n", + "#Calculations \n", + "T = (2*J+1)**2*h*c*100*B/(2*k)\n", + "#Results\n", + "print 'Spectrum will be observed at %4.0f K'%(T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.5:pg-352" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 1000 is 5.729\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "B = 60.589 #Spectrum for H2, 1/cm\n", + "T = 1000 #Temperture of Hydrogen, K\n", + "#Calculations \n", + "qR = k*T/(2*h*c*100*B)\n", + "qRs = 0.0\n", + "#for J in range(101):\n", + "# print J\n", + "# if (J%2 == 0):\n", + "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n", + "# else:\n", + "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n", + "#print qRs/4\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.6:pg-353" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 100 K is 928.121\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "B = 0.0374 #Spectrum for H2, 1/cm\n", + "T = 100.0 #Temperture of Hydrogen, K\n", + "sigma = 2.\n", + "\n", + "#Calculations\n", + "ThetaR = h*c*100*B/k\n", + "qR = T/(sigma*ThetaR)\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.7:pg-354" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "Ba = 1.48 #Spectrum for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n", + "T = 298.0 #Temperture of Hydrogen, K\n", + "sigmab = 1\n", + "sigmac = 2\n", + "\n", + "#Calculations\n", + "qRa = k*T/(h*c*100*Ba)\n", + "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n", + "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n", + "\n", + "#Results\n", + "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.8:pg-356" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n" + ] + } + ], + "source": [ + "from math import pi, exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "Ba = 1.48 #Frequency for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n", + "T298 = 298.0 #Temperture of Hydrogen, K\n", + "T1000 = 1000 #Temperture of Hydrogen, K\n", + "nubar = 208\n", + "\n", + "#Calculations\n", + "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n", + "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.9:pg-357" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 450 1/cm the q = 1.128\n", + "At 945 1/cm the q = 1.010\n", + "At 1100 1/cm the q = 1.005\n", + "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "T = 298 #Temeprature, K\n", + "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.10:pg-359" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for F2 at 298.0 K is 10.508\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298 #Temeprature, K\n", + "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n", + "\n", + "#Calculations\n", + "ThetaV = h*c*100*nubar/k\n", + "Th = 10*ThetaV\n", + "qv = 1/(1.-exp(-ThetaV/Th))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.11:pg-360" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 1388 1/cm the q = 1.157\n", + "At 667 1/cm the q = 1.619\n", + "At 667 1/cm the q = 1.619\n", + "At 2349 1/cm the q = 1.035\n", + "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 1000 #Temeprature, K\n", + "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.12:pg-363" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electronic partition function for F2 at 298.0 K is 9.45\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298. #Temeprature, K\n", + "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n", + "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n", + "g0 = [4,6,8,10,2,4,6,8,10]\n", + "\n", + "#Calculations\n", + "qE = 0.0\n", + "for i in range(9):\n", + " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n", + " qE = qE + a\n", + "\n", + "#Results\n", + "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoWqLvV.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoWqLvV.ipynb new file mode 100644 index 00000000..430c21a8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_PoWqLvV.ipynb @@ -0,0 +1,484 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Probability" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.1:pg-295" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of picking up any one ball is 1.0\n" + ] + } + ], + "source": [ + "import math\n", + "#Varible declaration\n", + "n = range(1,51,1)\n", + "Prob = 0\n", + "for x in n:\n", + " Prob = 1./len(n) + Prob\n", + "\n", + "#Results\n", + "print 'Probability of picking up any one ball is %3.1f'%Prob" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.2:pg-296" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of one (heart)card picked from a std. stack of 52 cards is 1/4\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "import math\n", + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "nheart = 13 #Number of cards with hearts\n", + "\n", + "#Calculations\n", + "Pe = Fraction(nheart,n)\n", + "\n", + "#Results\n", + "print 'Probability of one (heart)card picked from a std. stack of %d cards is'%n,Pe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.3:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of Five card arrangment from a deck of 52 cards is 311875200\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "import math\n", + "#Calculations\n", + "TotalM = n*(n-1)*(n-2)*(n-3)*(n-4)\n", + "#Results\n", + "print 'Total number of Five card arrangment from a deck of 52 cards is %d'%TotalM" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.4:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Possible spin states for excited state are 4\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "n1 = 2 #Two spin states for 1st electron in orbit 1\n", + "n2 = 2 #Two spin states for 2nd electron in orbit 2\n", + "\n", + "#Calculation\n", + "M = n1*n1\n", + "\n", + "#Results\n", + "print 'Possible spin states for excited state are %2d'%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.5:pg-298" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible permutations for 5 player to play are 95040\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 12 #Total Number of players \n", + "j = 5 #Number player those can play match\n", + "\n", + "#Calculation\n", + "P = factorial(n)/factorial(n-j)\n", + "\n", + "#Results\n", + "print 'Maximum Possible permutations for 5 player to play are %8d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.6:pg-299" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible 5-card combinations are 2598960\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 52 #Number of cards in std . pack\n", + "j = 5 #Number of cards in subset\n", + "\n", + "#Calculation\n", + "C = factorial(n)/(factorial(j)*factorial(n-j))\n", + "\n", + "#Results\n", + "print 'Maximum Possible 5-card combinations are %8d'%C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.7:pg-300" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of quantum states are 15\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "x = 6 #Number of electrons\n", + "n = 2 #Number of states\n", + "\n", + "#Calculation\n", + "P = factorial(x)/(factorial(n)*factorial(x-n))\n", + "\n", + "#Results\n", + "print 'Total number of quantum states are %3d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.8:pg-301" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of getting 25 head out of 50 tossing is 0.112\n", + "Probability of getting 10 head out of 50 tossing is 9.124e-06\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "n = 50 #Number of separate experiments\n", + "j1 = 25 #Number of sucessful expt with heads up\n", + "j2 = 10 #Number of sucessful expt with heads up\n", + "\n", + "#Calculation\n", + "C25 = factorial(n)/(factorial(j1)*factorial(n-j1))\n", + "PE25 = Fraction(1,2)**j1\n", + "PEC25 = (1-Fraction(1,2))**(n-j1)\n", + "P25 = C25*PE25*PEC25\n", + "\n", + "C10 = factorial(n)/(factorial(j2)*factorial(n-j2))\n", + "PE10 = Fraction(1,2)**j2\n", + "PEC10 = (1-Fraction(1,2))**(n-j2)\n", + "P10 = C10*PE10*PEC10\n", + "\n", + "#Results\n", + "print 'Probability of getting 25 head out of 50 tossing is %4.3f'%(float(P25))\n", + "print 'Probability of getting 10 head out of 50 tossing is %4.3e'%(float(P10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.9:pg-302" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " N ln(N!) ln(N!)sterling Error\n", + " 10 15.10 13.03 2.08\n", + " 50 148.48 145.60 2.88\n", + "100 363.74 360.52 3.22\n" + ] + } + ], + "source": [ + "from math import factorial, log\n", + "#Variable Declaration\n", + "N = [10,50,100] #Valures for N\n", + "\n", + "#Calculations\n", + "print ' N ln(N!) ln(N!)sterling Error'\n", + "for i in N:\n", + " lnN = log(factorial(i))\n", + " lnNs = i*log(i)-i\n", + " err = abs(lnN-lnNs)\n", + " print '%3d %5.2f %5.2f %4.2f'%(i,lnN,lnNs, err)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.10:pg-305" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of receiving any card 1/52\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "fi = 1 #Probability of receiving any card\n", + "n = 52 #Number od Cards\n", + "\n", + "#Calculations\n", + "sum = 0\n", + "for i in range(52):\n", + " sum = sum + fi\n", + "\n", + "Pxi = Fraction(fi,sum)\n", + "\n", + "#Results\n", + "print 'Probability of receiving any card', Pxi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.11:pg-307" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of Px considering it as discrete function 20.4\n", + "Sum of Px considering it as contineous function 19.9\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from scipy import integrate\n", + "#Variable Declaration\n", + "\n", + "#Calculations\n", + "fun = lambda x: exp(-0.05*x)\n", + "Pt = 0\n", + "for i in range(0,101):\n", + " Pt = Pt + fun(i)\n", + " \n", + "Ptot = integrate.quad(fun, 0.0, 100.)\n", + "\n", + "#Results\n", + "print 'Sum of Px considering it as discrete function %4.1f'%Pt\n", + "print 'Sum of Px considering it as contineous function %4.1f'%Ptot[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.12:pg-308" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from sympy import Symbol\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = Symbol('r') #Radius of inner circle\n", + "C = [5,2,0]\n", + "#Calculations\n", + "A1 = pi*r**2\n", + "A2 = pi*(2*r)**2 - A1\n", + "A3 = pi*(3*r)**2 - (A1 + A2)\n", + "At = A1 + A2 + A3\n", + "f1 = A1/At\n", + "f2 = A2/At\n", + "f3 = A3/At\n", + "sf = f1 + f2 + f3\n", + "\n", + "ns = (f1*C[0]+f2*C[1]+f3*C[2])/sf\n", + "\n", + "#Results\n", + "print 'A1, A2, A3: ', A1,', ', A2,', ', A3\n", + "print 'f1, f2, f3: ', f1,f2,f3\n", + "print 'Average payout $', round(float(ns),2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_QHlxeI4.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_QHlxeI4.ipynb new file mode 100644 index 00000000..058c9da8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_QHlxeI4.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Boltzmann Distribution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.1:pg-321" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The observed weight 1.37e+28 compared to 1.01e+29\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "\n", + "aH = 40 #Number of heads\n", + "N = 100 #Total events\n", + "\n", + "#Calculations\n", + "aT = 100 - aH\n", + "We = factorial(N)/(factorial(aT)*factorial(aH))\n", + "Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))\n", + "\n", + "#Results\n", + "print 'The observed weight %5.2e compared to %5.2e'%(We,Wexpected)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.2:pg-322" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At maximum value of ln(W)\n", + "Values of N1 : 6162, N2: 2676 and N3: 1162 \n", + "Maximum value of ln(W)= 9012\n" + ] + } + ], + "source": [ + "from sympy import symbols, diff, log\n", + "\n", + "#Varialbe declaration\n", + "n = 10000 #Total number of particles\n", + "\n", + "\n", + "#Calcualtions\n", + "def ster(i):\n", + " return i*log(i)-i\n", + "\n", + "n1, n2, n3, W = symbols('n1 n2 n3 W',positive=True)\n", + "\n", + "n2 = 5000 - 2*n3\n", + "n1 = 10000 - n2 -n3\n", + "logW = ster(n) - ster(n1) - ster(n2) - ster(n3) \n", + "fun = diff(logW, n3)\n", + "dfun = diff(fun, n3)\n", + "x0 = 10.0\n", + "err = 1.0\n", + "while err>0.001:\n", + " f = fun.subs(n3,x0)\n", + " df = dfun.subs(n3,x0)\n", + " xnew = x0 - f/df\n", + " err = abs(x0-xnew)/x0\n", + " x0 = xnew\n", + "\n", + "x0 = int(x0)\n", + "N2 = n2.subs(n3,x0)\n", + "N3 = x0\n", + "n1 = n1.subs(n3,x0)\n", + "N1 = n1.subs(n2,N2)\n", + "lnW = logW.subs(n3,N3)\n", + "\n", + "#Results\n", + "print 'At maximum value of ln(W)'\n", + "print 'Values of N1 : %4d, N2: %4d and N3: %4d '%(N1, N2,N3)\n", + "print 'Maximum value of ln(W)= %6d'%lnW" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.3:pg-326" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.048 i.e. 4.8 percent\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.633 #Probabilities of Energy level 1,2,3 \n", + "p1 = 0.233\n", + "p2 = 0.086\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f i.e.%4.1f percent'%(p4,p4*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.4:pg-327" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.222\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.394 #Probabilities of Energy level 1,2,3 \n", + "p1by2 = 0.239\n", + "p2 = 0.145\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1by2+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f'%(p4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.5:pg-333" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Partition function is 1.577\n", + "Probability of occupying the second vibrational state n=2 is 0.085\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "I2 = 208 #Vibrational frequency, cm-1 \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "#Calculation\n", + "q = 1./(1.-exp(-h*c*I2/(k*T)))\n", + "p2 = exp(-2*h*c*I2/(k*T))/q\n", + "\n", + "#Results\n", + "print 'Partition function is %4.3f'%(q)\n", + "print 'Probability of occupying the second vibrational state n=2 is %4.3f'%(p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.6:pg-334" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Occupation Number is 0.999990\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "B = 1.45 #Magnetic field streangth, Teslas \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K \n", + "gnbn = 2.82e-26 #J/T\n", + "#Calculation\n", + "ahpbyahm = math.exp(-gnbn*B/(k*T))\n", + "\n", + "#Results\n", + "print 'Occupation Number is %7.6f'%(ahpbyahm)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_SRvof3X.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_SRvof3X.ipynb new file mode 100644 index 00000000..81a699eb --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_SRvof3X.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Complex Reaction Mechanism " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.1:pg-511" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEQCAYAAACTEVJTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1VW9//HXGxQvGKaVKKg4oih4Q8Jbao6kqJ3yUh5F\nK6VDHhUUL13E+hF4SFPLJDW7mIXXSK28pCEYZywTFAQEARERFAYBFcXEGzCf3x/rC2w5Mzgz7D3f\nPTPv5+MxD/as+X73fu8B5jNrre93LUUEZmZmxdIm7wBmZtayuLCYmVlRubCYmVlRubCYmVlRubCY\nmVlRubCYmVlRbZZ3gHIgyddcm5k1UESotnb3WDIRUZYfw4YNyz1Dc8xW7vmcrWXmK+dsxc63MS4s\nZ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W0VXShhcAu2eZskX39\nY/fWiIhlEfG1iHBRsaJxYTFrmBrSdrnrSNpC0tHZ430lnS7pKEnflbS3pP0kHSupt6TzsuN6Z8d8\nr64XiogngK4RMSnbzOz1SNtDH0I22S6pA7CcVFi6AIdmw1sHU/oNr8xq5cJi1jB/Aw7doO10oEpS\nZ9KE/h8j4nFgAfA28B8RMS7SdrttJe0HfBaYCHw628URSbsVPqmkLYH3sk97s34O5z+AxyUdkLU/\nE2mL4d2Bd7JjXFgsNy4sZg0QEXOAX0i6TtIASWeQdogMYCBp1761x94LnAOMLniKCuCdiPg1sApo\nGxErs4n1xzZ4uX2Bf2SP9wP+N3u8gLQV87bAj4EvZ+1PRMS07PLjnsCRxXjPZg3lHSTNikTSlcBV\nWaFoC+xF2mP8hxHxgaTts8cXZ8efQdoqdkVErJZ0VNbTMWvWXFjMiiQbCjuBtH84EfGvbHjrYOBl\nUqH5Y1Zkzib1KGqA8yKiRlLfiBibS3izInJhMTOzovIci5mZFZULi5mZFZULi5mZFZULi5mZFZUL\ni5mZFZULi5mZFZULi5mZFZULi5mZFZULi5mZFdX/B8J/v5b87GuOAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9aa4048>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Km and k2 are 10.0 mM and 1.1e+05 s-1\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from numpy import arange,array,ones,linalg,size\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ce = 2.3e-9 #Initial value of enzyme concentration, M\n", + "r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])\n", + "CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])\n", + "\n", + "#Calculations\n", + "rinv = 1./r\n", + "CCO2inv = 1./CCO2\n", + "xlim(0,850)\n", + "ylim(0,38000)\n", + "xi = CCO2inv\n", + "A = array([ CCO2inv, ones(size(CCO2inv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters\n", + "slope = w[0]\n", + "intercept = w[1]\n", + "\n", + "line = w[0]*CCO2inv+w[1] # regression line\n", + "plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')\n", + "xlabel('$ {C_{CO}}_2, mM^{-1} $')\n", + "ylabel('$ Rate^{-1}, s/M^{-1} $')\n", + "show()\n", + "rmax = 1./intercept\n", + "k2 = rmax/Ce\n", + "Km = slope*rmax\n", + "\n", + "#Results\n", + "print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.2:pg-517" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH11JREFUeJzt3Xl4VdW5x/HvGwQH2jrUOhCEplEBrViqRlqnoFKnKk6t\nxaJFRa0KVXHAKQ3ctF5HtIqtYq3cXrXcVm8pV8WSWtMWKYooqJgwpigJ1aJCBSdM3vvHOsghJuTk\nZOfsM/w+z5MnZ5+z98mbTcIve6291jJ3R0REJApFcRcgIiL5Q6EiIiKRUaiIiEhkFCoiIhIZhYqI\niERGoSIiIpGJLVTM7FgzqzOzxWY2rpXXzzSzBYmPWWY2MNVjRUQkHhbHOBUzKwIWA0cBjcBc4Hvu\nXpe0z2Cg1t3XmtmxwHh3H5zKsSIiEo+4rlTKgCXuvsLdNwBTgWHJO7j7HHdfm9icAxSneqyIiMQj\nrlApBt5I2l7JptBozShgRprHiohIhmwVdwHtMbMhwDnAoXHXIiIiWxZXqDQAfZK2eyee20yic34y\ncKy7v9uRYxPHa2IzEZE0uLulc1xczV9z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1fuJpEOhItJCYgr8O8zsxDZ2aWqxfTDwYtJ2b2BR0vbixOp6\nAHu7++LE47p0a0wsJrUfYdJDA9a6+xx0lSIxU6iIdEBiCvC5LZ4uA/6QeH03wgp6Uze+6O7zE6/t\nSVgXfOPzC8zsBGDnxMeTwBeBbwM7ANsD9yR23+y5xJonjS1q24WwiNKRwEOd/25FOk6hItIxBySW\nmk02CChNhMbngeNbrPm+URnw/MYNM9sbGOHuwxNLtV4M3A28B/wZ+Iu7f5S4KWCz51orzN3fAr7f\nuW9PpHMUKiIds1nzkpl9BVjh7o+lcGwZ8HTS9g+ARxKP+wDvJvpaDiT0u2wAcPdFLZ8TyVa6+0uk\nbS0DpB+b95VA6E959jMHmn25lfc7iKQrFaAHsCLx+DuEdeEBerQSHq09J5J1FCoiLZhZTzO7DOhv\nZpeZ2XaJl8qBmqT9DgcuAHZJ9GdsfL4X8Kek7f3N7EpgIHCqmX0p8dL9wDGJFRcfdfclZtaXzTv9\nae05kWyllR9FUmRmo919Uvt7gpkd4e5/6eqaRLKNrlREUpAYpd7QgUO27qpaRLKZrlREUmBm3wUe\nb+OuLhFJUKiIiEhk1PwlIiKRUaiIiEhkFCoiIhIZhYqIiERGoSIiIpFRqIiISGQUKiIiEhmFioiI\nREahIiIikfl//rBLh3QxZCwAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9acd4a8>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3\n", + "K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K\n", + "P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr\n", + "\n", + "#Calculations\n", + "Vinv = 1./Vads\n", + "Pinv =1./P\n", + "xlim(0,0.5)\n", + "ylim(0,0.2)\n", + "A = array([ Pinv, ones(size(Pinv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters\n", + "m = w[0]\n", + "c = w[1]\n", + "line = m*Pinv+c # regression line\n", + "plot(Pinv,line,'r-',Pinv,Vinv,'o')\n", + "xlabel('$ 1/P, Torr^{-1} $')\n", + "ylabel('$ 1/V_{abs}, cm^{-1}g $')\n", + "show()\n", + "Vm = 1./c\n", + "K = 1./(m*Vm)\n", + "\n", + "#Results\n", + "print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)\n", + "print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.4:pg-533" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFRJREFUeJzt3XuUXHWV6PHvjvgMDioIToKGJoBwQURACIjQqIwEVBjH\npaKo8UGiCPhARLm0CZO7RgGvIg9FBUVwIjg+eCgK4dFABBQTwiOIkNiGkEBUEJBGckOy7x+nmhSh\n0+mudNWpx/ezVi+qq86p2j/S6Z39+/3O2ZGZSJJUizFlByBJal0mEUlSzUwikqSamUQkSTUziUiS\namYSkSTVrKWTSEScGxHLI+L2YRz7tYi4NSLmRcQfI+LhRsQoSe0sWvk6kYjYB3gcOD8zdx7BeUcB\nu2Tmx+oWnCR1gJauRDJzDvD36uciYuuI+FVE3BIR10XEdoOcehjwo4YEKUltbKOyA6iD7wDTMnNR\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KRJNXMJCJJqplJRJJUM5OIJKlmJhFJUs1MIpKkmplEJEk1a4Z7Z0mli4jPU9wx\n+FSKW0IcBByTmfcN8/xXAJ+kuEfbo8A/gBdn5vnDPP8TFLfq6cqqexRFxEXAE8DJmXn38EckNYZJ\nRCr8DtgkM88FiIiJFP0VzljfiRGxNfBt4D2Z+XDlubOo3MRumG6huBHjBOChynu8DtgYOCEzF43g\nvaSGcTpLKuwJzAGIiM2AvYFLh3nuBRTdFx+uem4eRWIYrgnADTzzzqobU9xXywSipmUlIhVeDyyM\niMnA4cDHgVdWppleAmwCnJWZc6pPioi9KKatrlnr/S7MzP4RfH5Q3IJ7QtX79lFeCwNpWEwiUmHT\nzPwpQET8EfghRdfBf1D0sb8uM1dExEuBtwErMvPHwF7AdWu/WWb2D3Ls+iwB9omIjSiaqO1CMc0m\nNS2ns9TxImIcz/wX/9+AHTPzHmB34NrMXFF57ViKftQvqHy/GnhGxRERz4+IN1Ud+8L1fP6/AA9T\nJJEJwKTMvJmiD7ZJRE3NJCIVv6znVX1/BEXPD4DnZ+bKqte2A15LsV4BRf/3SWu937uB3qpjxw68\nEBFbDfL5uwNzs+iYtzXweFVcJhE1NZOIOlpEdFOsf2wXEUdGxJcofpEfFRETgLlrnfJAZv4eeEVE\nbJyZfwTOioj/GxEfjYjDgMsyc/Xax1YqnqvW+vw3AF8G3l55ak5mzq+sxewCvLE+I5dGh02ppBGI\niD0pqpDx67sGZLBjI2K/zHzWGorUqlxYl0YgM3+7gcc+fxTDkUpnJSJJqplrIpKkmplEJEk1M4lI\nkmpmEpEk1cwkIkmqmUlEklQzk4gkqWYmEUlSzf4/9Fa7EFJttIoAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0xa641f28>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M\n", + "tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s\n", + "\n", + "#Calculations\n", + "Tfinv = 1./tf\n", + "xlim(0,0.006)\n", + "ylim(0,2.e7)\n", + "A = array([ CBr, ones(size(CBr))])\n", + "# linearly generated sequence\n", + "[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters\n", + "\n", + "line = m*CBr+c # regression line\n", + "plot(CBr,line,'r-',CBr,Tfinv,'o')\n", + "xlabel('$ Br_6C_6, M $')\n", + "ylabel('$ tau_f $')\n", + "show()\n", + "\n", + "#Results\n", + "print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.5:pg-536" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Separation Distance at decreased efficiency 11.53\n" + ] + } + ], + "source": [ + "from scipy.optimize import root\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = 11. #Distance of residue separation, °A\n", + "r0 = 9. #Initial Distance of residue separation, °A\n", + "EffD = 0.2 #Fraction decrease in eff\n", + "\n", + "#Calculations\n", + "Effi = r0**6/(r0**6+r**6)\n", + "Eff = Effi*(1-EffD)\n", + "f = lambda r: r0**6/(r0**6+r**6) - Eff\n", + "sol = root(f, 12)\n", + "rn = sol.x[0]\n", + "\n", + "#Results\n", + "print 'Separation Distance at decreased efficiency %4.2f'%rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.6:pg-538" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total photon energy absorbed by sample 2.7e+03 J\n", + "Photon energy absorbed at 280 nm is 7.1e-19 J\n", + "Total number of photon absorbed by sample 3.8e+21 photones\n", + "Overall quantum yield 0.40\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "mr = 2.5e-3 #Moles reacted, mol\n", + "P = 100.0 #Irradiation Power, J/s\n", + "t = 27 #Time of irradiation, s\n", + "h = 6.626e-34 #Planks constant, Js\n", + "c = 3.0e8 #Speed of light, m/s\n", + "labda = 280e-9 #Wavelength of light, m\n", + "\n", + "#Calculation\n", + "Eabs = P*t\n", + "Eph = h*c/labda\n", + "nph = Eabs/Eph #moles of photone\n", + "phi = mr/6.31e-3\n", + "\n", + "#Results\n", + "print 'Total photon energy absorbed by sample %3.1e J'%Eabs\n", + "print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph\n", + "print 'Total number of photon absorbed by sample %3.1e photones'%nph\n", + "print 'Overall quantum yield %4.2f'%phi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.7:pg-542" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DGS = 0.111 eV\n", + "Rate constant with barrier to electron transfer 2.66e+07 per s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "#Variable Declarations\n", + "r = 2.0e9 #Rate constant for electron transfer, per s\n", + "labda = 1.2 #Gibss energy change, eV\n", + "DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "T = 298.0 #Temeprature, K\n", + "#Calculation\n", + "DGS = (DG+labda)**2/(4*labda)\n", + "k193 = r*exp(-DGS*1.6e-19/(k*T))\n", + "#Results\n", + "print 'DGS = %5.3f eV'%DGS\n", + "print 'Rate constant with barrier to electron transfer %3.2e per s'%k193" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_T5WJU5x.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_T5WJU5x.ipynb new file mode 100644 index 00000000..076c1413 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_T5WJU5x.ipynb @@ -0,0 +1,700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 06: Chemical Equilibrium" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.1:pg-126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Available work through combustion of CH4 -813.6 kJ/mol\n", + "Maximum Available work through combustion of C8H18 -5320.9 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dACH4 = dHcCH4*1e3 - dnCH4*R*T - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dAC8H18 = dHcC8H18*1e3 - dnC8H18*R*T - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum Available work through combustion of CH4 %4.1f kJ/mol'%(dACH4/1000)\n", + "print 'Maximum Available work through combustion of C8H18 %4.1f kJ/mol'%(dAC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.2:pg-128" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum nonexapnasion work through combustion of CH4 -818.6 kJ/mol\n", + "Maximum nonexapnasion work through combustion of C8H18 -5309.8 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dGCH4 = dHcCH4*1e3 - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dGC8H18 = dHcC8H18*1e3 - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum nonexapnasion work through combustion of CH4 %4.1f kJ/mol'%(dGCH4/1000)\n", + "print 'Maximum nonexapnasion work through combustion of C8H18 %4.1f kJ/mol'%(dGC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.4:pg-133" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy of formation for Fe(g) at 400 K is 355.1 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGf298 = 370.7 #Std. free energy of formation for Fe (g), kJ/mol\n", + "dHf298 = 416.3 #Std. Enthalpy of formation for Fe (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 400. #Temperature in K\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "\n", + "dGf = T*(dGf298*1e3/T0 + dHf298*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. free energy of formation for Fe(g) at 400 K is %4.1f kJ/mol'%(dGf/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.5:pg-137" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy Change on mixing is -2.8e+04 J\n", + "Std. entropy Change on mixing is -93.3 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "nHe = 1.0 #Number of moles of He\n", + "nNe = 3.0 #Number of moles of Ne\n", + "nAr = 2.0 #Number of moles of Ar\n", + "nXe = 2.5 #Number of moles of Xe\n", + "T = 298.15 #Temperature in K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "n = nHe + nNe + nAr + nXe\n", + "dGmix = n*R*T*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "dSmix = n*R*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "\n", + "#Results \n", + "print 'Std. free energy Change on mixing is %3.1e J'%(dGmix)\n", + "print 'Std. entropy Change on mixing is %4.1f J'%(dSmix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.6:pg-138" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 67.00 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGfFe = 0.0 #Std. Gibbs energy of formation for Fe (S), kJ/mol\n", + "dGfH2O = -237.1 #Std. Gibbs energy of formation for Water (g), kJ/mol\n", + "dGfFe2O3 = -1015.4 #Std. Gibbs energy of formation for Fe2O3 (s), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dGR = nFe*dGfFe + nH2O*dGfH2O + nFe2O3*dGfFe2O3 + nH2*dGfH2 \n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.2f kJ/mol'%(dGR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.7:pg-139" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Enthalpy change for reactionat 525.0 is -24.80 kJ/mol\n", + "Std. Gibbs energy change for reactionat 525.0 is 137 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGR = 67.0 #Std. Gibbs energy of formation for reaction, kJ, from previous problem\n", + "dHfFe = 0.0 #Enthalpy of formation for Fe (S), kJ/mol\n", + "dHfH2O = -285.8 #Enthalpy of formation for Water (g), kJ/mol\n", + "dHfFe2O3 = -1118.4 #Enthalpy of formation for Fe2O3 (s), kJ/mol\n", + "dHfH2 = 0.0 #Enthalpy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 525. #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dHR = nFe*dHfFe + nH2O*dHfH2O + nFe2O3*dHfFe2O3 + nH2*dHfH2 \n", + "dGR2 = T*(dGR*1e3/T0 + dHR*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. Enthalpy change for reactionat %4.1f is %4.2f kJ/mol'%(T, dHR)\n", + "print 'Std. Gibbs energy change for reactionat %4.1f is %4.0f kJ/mol'%(T, dGR2/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.8:pg-140" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 1.337 kJ/mol\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "dGfNO2 = 51.3 #Std. Gibbs energy of formation for NO2 (g), kJ/mol\n", + "dGfN2O4 = 99.8 #Std. Gibbs energy of formation for N2O4 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "pNO2 = 0.350 #Partial pressure of NO2, bar\n", + "pN2O4 = 0.650 #Partial pressure of N2O4, bar\n", + "R = 8.314\n", + "nNO2, nN2O4 = -2, 1 #Stoichiomentric coeff of NO2 and N2O4 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nN2O4*dGfN2O4*1e3 + nNO2*dGfNO2*1e3 + R*T0*log(pN2O4/(pNO2)**2)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.9:pg-141" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is -0.020 kJ/mol\n", + "Equilibrium constant for reaction is 3323.254 \n", + "Kp >> 1. hence, mixture will consists of product CO2 and H2\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dGfCO = 237.1 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dGfH2O = 137.2 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCO2, nH2, nCO, nH2O = 1,1,1,1 #Stoichiomentric coeff of CO2,H2,CO,H2O respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCO2*dGfCO2 + nH2*dGfH2 + nCO*dGfCO + nH2O*dGfH2O\n", + "Kp = exp(-dGR*1e3/(R*T0))\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)\n", + "print 'Equilibrium constant for reaction is %5.3f '%(Kp)\n", + "if Kp > 1: print 'Kp >> 1. hence, mixture will consists of product CO2 and H2'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.11:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part A\n", + "Std. Gibbs energy change for reaction is 211.400 kJ/mol\n", + "Std. Enthalpy change for reaction is 242.600 kJ/mol\n", + "Equilibrium constants at 800, 1500, and 2000 K are 4.223e-11, 1.042e-03, and 1.349e-01\n", + "Part B\n", + "Degree of dissociation at 800, 1500, and 2000 K are 3.249e-05, 1.593e-01, and 8.782e-01\n" + ] + } + ], + "source": [ + "from math import exp, sqrt\n", + "\n", + "dGfCl2 = 0.0 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfCl = 105.7 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dHfCl2 = 0.0 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dHfCl = 121.3 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCl2, nCl= -1,2 #Stoichiomentric coeff of Cl2,Cl respectively in reaction\n", + "PbyP0 = 0.01\n", + "#Calculations\n", + "dGR = nCl*dGfCl + nCl2*dGfCl2 \n", + "dHR = nCl*dHfCl + nCl2*dHfCl2 \n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "Kp8 = func(800)\n", + "Kp15 = func(1500)\n", + "Kp20 = func(2000)\n", + "DDiss = lambda K: sqrt(K/(K+4*PbyP0))\n", + "alp8 = DDiss(Kp8)\n", + "alp15 = DDiss(Kp15)\n", + "alp20 = DDiss(Kp20)\n", + "\n", + "#Results \n", + "print 'Part A'\n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %5.3f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(Kp8,Kp15,Kp20)\n", + "\n", + "print 'Part B'\n", + "print 'Degree of dissociation at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(alp8,alp15,alp20)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.12:pg-145" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 131.1 kJ/mol\n", + "Std. Enthalpy change for reaction is 178.5 kJ/mol\n", + "Equilibrium constants at 1000, 1100, and 1200 K are 0.0956, 0.673e, and 3.423\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCaCO3 = -1128.8 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCaO = -603.3 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for O2 (g), kJ/mol\n", + "dHfCaCO3 = -1206.9 #Std. Enthalpy Change of formation for CaCO3 (s), kJ/mol\n", + "dHfCaO = -634.9 #Std. Enthalpy Change of formation for CaO (s), kJ/mol\n", + "dHfCO2 = -393.5 #Std. Enthalpy Change of formation for O2 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCaCO3, nCaO, nO2 = -1,1,1 #Stoichiomentric coeff of CaCO3, CaO, O2 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCaO*dGfCaO + nO2*dGfCO2 + nCaCO3*dGfCaCO3\n", + "dHR = nCaO*dHfCaO + nO2*dHfCO2 + nCaCO3*dHfCaCO3\n", + "\n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "\n", + "Kp10 = func(1000)\n", + "Kp11 = func(1100)\n", + "Kp12 = func(1200)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.1f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %4.1f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 1000, 1100, and 1200 K are %4.4f, %4.3fe, and %4.3f'%(Kp10,Kp11,Kp12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.13:pg-146" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at which graphite and dimond will be in equilibrium is 1.51e+04 bar\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCG = 0.0 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCD = 2.90 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "rhoG = 2.25e3 #Density of Graphite, kg/m3\n", + "rhoD = 3.52e3 #Density of dimond, kg/m3\n", + "T0 = 298.15 #Std. Temperature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K) \n", + "P0 = 1.0 #Pressure, bar\n", + "M = 12.01 #Molceular wt of Carbon\n", + "#Calculations\n", + "P = P0*1e5 + dGfCD*1e3/((1./rhoG-1./rhoD)*M*1e-3)\n", + "\n", + "#Results \n", + "print 'Pressure at which graphite and dimond will be in equilibrium is %4.2e bar'%(P/1e5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.14:pg-154" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUbydV = 1.42e+03 bar\n", + "dVbyV = 6.519 percent\n", + "dUbydVm = 9e+02 atm\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "\n", + "beta = 2.04e-4 #Thermal exapansion coefficient, /K\n", + "kapa = 45.9e-6 #Isothermal compressibility, /bar\n", + "T = 298.15 #Std. Temperature, K\n", + "R = 8.206e-2 #Ideal gas constant, atm.L/(mol.K) \n", + "T1 = 320.0 #Temperature, K\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "V = 1.00 #Volume, m3\n", + "a = 1.35 #van der Waals constant a for nitrogen, atm.L2/mol2\n", + "\n", + "#Calculations\n", + "dUbydV = Pf = (beta*T1-kapa*P0)/kapa\n", + "dVT = V*kapa*(Pf-Pi)\n", + "dVbyV = dVT*100/V\n", + "Vm = Pi/(R*T1)\n", + "dUbydVm = a/(Vm**2)\n", + "\n", + "#Results \n", + "print 'dUbydV = %4.2e bar'%(dUbydV)\n", + "print 'dVbyV = %4.3f percent'%(dVbyV)\n", + "print 'dUbydVm = %4.0e atm'%(dUbydVm)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.15:pg-155" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Internal energy change is 4.06e+04 J/mol in which \n", + "contribution of temeprature dependent term 99.9999 percent\n", + "Enthalpy change is 4.185e+04 J/mol in which \n", + "contribution of temeprature dependent term 100.0 percent\n" + ] + } + ], + "source": [ + "from math import exp, log\n", + "\n", + "m = 1000.0 #mass of mercury, g\n", + "Pi, Ti = 1.00, 300.0 #Intial pressure and temperature, bar, K\n", + "Pf, Tf = 300., 600.0 #Final pressure and temperature, bar, K\n", + "rho = 13534. #Density of mercury, kg/m3\n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "Cpm = 27.98 #Molar Specific heat at constant pressure, J/(mol.K) \n", + "M = 200.59 #Molecular wt of Hg, g/mol\n", + "\n", + "#Calculations\n", + "Vi = m*1e-3/rho\n", + "Vf = Vi*exp(-kapa*(Pf-Pi))\n", + "Ut = m*Cpm*(Tf-Ti)/M \n", + "Up = (beta*Ti/kapa-Pi)*1e5*(Vf-Vi) + (Vi-Vf+Vf*log(Vf/Vi))*1e5/kapa\n", + "dU = Ut + Up\n", + "Ht = m*Cpm*(Tf-Ti)/M\n", + "Hp = ((1 + beta*(Tf-Ti))*Vi*exp(-kapa*Pi)/kapa)*(exp(-kapa*Pi)-exp(-kapa*Pf))\n", + "dH = Ht + Hp\n", + "#Results\n", + "print 'Internal energy change is %6.2e J/mol in which \\ncontribution of temeprature dependent term %6.4f percent'%(dU,Ut*100/dH)\n", + "print 'Enthalpy change is %4.3e J/mol in which \\ncontribution of temeprature dependent term %4.1f percent'%(dH,Ht*100/dH)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.16:pg-156" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in molar specific heats \n", + "at constant volume and constant pressure 3.73e-03 J/(mol.K)\n", + "Molar Specific heat of Hg at const. volume is 27.98 J/(mol.K)\n" + ] + } + ], + "source": [ + "import math\n", + "T = 300.0 #Temperature of Hg, K \n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "M = 0.20059 #Molecular wt of Hg, kg/mol \n", + "rho = 13534 #Density of mercury, kg/m3\n", + "Cpm = 27.98 #Experimental Molar specif heat at const pressure for mercury, J/(mol.K)\n", + "\n", + "#Calculations\n", + "Vm = M/rho\n", + "DCpmCv = T*Vm*beta**2/kapa\n", + "Cvm = Cpm - DCpmCv\n", + "#Results\n", + "print 'Difference in molar specific heats \\nat constant volume and constant pressure %4.2e J/(mol.K)'%DCpmCv\n", + "print 'Molar Specific heat of Hg at const. volume is %4.2f J/(mol.K)'%Cvm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.17:pg-158" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar Gibbs energy of Ar -46.154 kJ/mol\n", + "Molar Gibbs energy of Water -306.658 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "T = 298.15 #Std. Temperature, K \n", + "P = 1.0 #Initial Pressure, bar\n", + "Hm0, Sm0 = 0.0,154.8 #Std. molar enthalpy and entropy of Ar(g), kJ, mol, K units\n", + "Sm0H2, Sm0O2 = 130.7,205.2 #Std. molar entropy of O2 and H2 (g), kJ/(mol.K)\n", + "dGfH2O = -237.1 #Gibbs energy of formation for H2O(l), kJ/mol \n", + "nH2, nO2 = 1, 1./2 #Stoichiomentric coefficients for H2 and O2 in water formation reaction \n", + "\n", + "#Calculations\n", + "Gm0 = Hm0 - T*Sm0\n", + "dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)\n", + "#Results\n", + "print 'Molar Gibbs energy of Ar %4.3f kJ/mol'%(Gm0/1e3)\n", + "print 'Molar Gibbs energy of Water %4.3f kJ/mol'%(dGmH2O/1e3)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TRgyMmv.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TRgyMmv.ipynb new file mode 100644 index 00000000..504b170b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TRgyMmv.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 09: Ideal and Real Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.2:pg-212" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gibbs energy change of mixing is -1.371e+04 J\n", + "Gibbs energy change of mixing is < 0, hence the mixing is spontaneous\n", + "Entropy change of mixing is 45.99 J/K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "dGmix = n*R*T*(xb*log(xb)+xt*log(xt))\n", + "dSmix = -n*R*(xb*log(xb)+xt*log(xt))\n", + "\n", + "#Results\n", + "print 'Gibbs energy change of mixing is %4.3e J'%dGmix\n", + "print 'Gibbs energy change of mixing is < 0, hence the mixing is spontaneous'\n", + "print 'Entropy change of mixing is %4.2f J/K'%dSmix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.3:pg-214" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total pressure of the vapor is 69.8 torr\n", + "Benzene fraction in vapor is 0.837 \n", + "Toulene fraction in vapor is 0.163 \n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "P = xb*P0b + xt*P0t\n", + "y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "yt = 1.-y\n", + "\n", + "#Results\n", + "print 'Total pressure of the vapor is %4.1f torr'%P\n", + "print 'Benzene fraction in vapor is %4.3f '%y\n", + "print 'Toulene fraction in vapor is %4.3f '%yt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.4:pg-215" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass Balance: 6.75*x + 1.5*y - 5.0\n", + "Pressure and x: P - 67.5*x - 28.9\n", + "Pressure and y: y - 0.0148148148148148*(96.4*P - 2785.96)/P\n", + "Pressure is 66.8 torr\n", + "Mole fraction of benzene in liquid phase 0.561\n", + "Mole fraction of benzene in vapor phase 0.810\n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "nv = 1.5 #moles vaporized, mol\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "nl = n - nv\n", + "zb = nb/n\n", + "\n", + "x,y, P = symbols('x y P')\n", + "e1 = nv*(y-zb)-nl*(zb-x)\n", + "print 'Mass Balance:', e1\n", + "e2 = P - (x*P0b + (1-x)*P0t)\n", + "print 'Pressure and x:',e2\n", + "e3 = y - (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "print 'Pressure and y:', e3\n", + "equations = [e1,e2,e3]\n", + "sol = solve(equations)\n", + "\n", + "#Results\n", + "for i in sol:\n", + " if ((i[x] > 0.0 and i[x] <1.0) and (i[P] > 0.0) and (i[y]>zb and i[y]<1.0)):\n", + " print 'Pressure is %4.1f torr' %i[P]\n", + " print 'Mole fraction of benzene in liquid phase %4.3f' %i[x]\n", + " print 'Mole fraction of benzene in vapor phase %4.3f' %i[y]\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.6:pg-222" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Freezing point depression -3.94 K\n", + "Molecualr wt of solute 274.2 g/mol\n", + "Vapor pressure of solvent is reduced by a factor of 0.980\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 4.50 #Mass of substance dissolved, g\n", + "ms = 125.0 #Mass of slovent (CCl4), g\n", + "TbE = 0.65 #Boiling point elevation, °C\n", + "Kf, Kb = 30.0, 4.95 #Constants for freezing point elevation \n", + " # and boiling point depression for CCl4, K kg/mol\n", + "Msolvent = 153.8 #Molecualr wt of solvent, g/mol\n", + "#Calculations\n", + "DTf = -Kf*TbE/Kb\n", + "Msolute = Kb*m/(ms*1e-3*TbE)\n", + "nsolute = m/Msolute\n", + "nsolvent = ms/Msolvent \n", + "x = 1.0 - nsolute/(nsolute + nsolvent)\n", + "\n", + "#Results\n", + "print 'Freezing point depression %5.2f K'%DTf\n", + "print 'Molecualr wt of solute %4.1f g/mol'%Msolute\n", + "print 'Vapor pressure of solvent is reduced by a factor of %4.3f'%x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.7:pg-223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Osmotic pressure 12.23 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "csolute = 0.500 #Concentration of solute, g/L\n", + "R = 8.206e-2 #Gas constant L.atm/(mol.K)\n", + "T = 298.15 #Temperature of the solution, K\n", + "\n", + "#Calculations\n", + "pii = csolute*R*T\n", + "\n", + "#Results\n", + "print 'Osmotic pressure %4.2f atm'%pii\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.8:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.6994 atm\n", + "Activity coefficinet of CS2 1.9971 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "p0CS2 = 512.3 #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/p0CS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.9:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.1783 atm\n", + "Activity coefficinet of CS2 0.5090 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "kHCS2 = 2010. #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/kHCS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.10:pg-231" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Henrys constant = 143.38 torr\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "rho = 789.9 #Density of acetone, g/L\n", + "n = 1.0 #moles of acetone, mol\n", + "M = 58.08 #Molecular wt of acetone, g/mol\n", + "kHacetone = 1950 #Henrys law constant, torr\n", + "#Calculations\n", + "H = n*M*kHacetone/rho\n", + "\n", + "#Results\n", + "print 'Henrys constant = %5.2f torr'%H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.11:pg-232" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity coefficient = 0.969\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 0.5 #Mass of water, kg\n", + "ms = 24.0 #Mass of solute, g\n", + "Ms = 241.0 #Molecular wt of solute, g/mol\n", + "Tfd = 0.359 #Freezinf point depression, °C or K\n", + "kf = 1.86 #Constants for freezing point depression for water, K kg/mol\n", + "\n", + "#Calculations\n", + "msolute = ms/(Ms*m)\n", + "gama = Tfd/(kf*msolute)\n", + "\n", + "#Results\n", + "print 'Activity coefficient = %4.3f'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.12:pg-233" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of moles of nitrogen in blood at 1 and 50 bar are 2.46e-03,0.123 mol\n", + "Volume of nitrogen released from blood at reduced pressure 2.981 L\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 70.0 #Mass of human body, kg\n", + "V = 5.00 #Volume of blood, L\n", + "HN2 = 9.04e4 #Henry law constant for N2 solubility in blood, bar\n", + "T = 298.0 #Temperature, K\n", + "rho = 1.00 #density of blood, kg/L\n", + "Mw = 18.02 #Molecualr wt of water, g/mol\n", + "X = 80 #Percent of N2 at sea level\n", + "p1, p2 = 1.0, 50.0 #Pressures, bar\n", + "R = 8.314e-2 #Ideal Gas constant, L.bar/(mol.K)\n", + "#Calculations\n", + "nN21 = (V*rho*1e3/Mw)*(p1*X/100)/HN2\n", + "nN22 = (V*rho*1e3/Mw)*(p2*X/100)/HN2\n", + "V = (nN22-nN21)*R*T/p1\n", + "#Results\n", + "print 'Number of moles of nitrogen in blood at 1 and 50 bar are %3.2e,%3.3f mol'%(nN21,nN22)\n", + "print 'Volume of nitrogen released from blood at reduced pressure %4.3f L'%V" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TyFMWWo.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TyFMWWo.ipynb new file mode 100644 index 00000000..1fc19029 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_TyFMWWo.ipynb @@ -0,0 +1,171 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1. Fundamental Concepts of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.1:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final Tyre pressure is 3.61e+05 Pa\n" + ] + } + ], + "source": [ + "import math \n", + "Pi = 3.21e5 #Recommended tyre pressure, Pa\n", + "Ti = -5.00 #Initial Tyre temperature, °C\n", + "Tf = 28.00 #Final Tyre temperature, °C\n", + "\n", + "#Calculations\n", + "Ti = 273.16 + Ti\n", + "Tf = 273.16 + Tf\n", + "pf = Pi*Tf/Ti #Final tyre pressure, Pa\n", + "\n", + "#Results\n", + "print 'Final Tyre pressure is %6.2e Pa'%pf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.2:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Moles of He=0.121, Ne=0.303 and, Xe=0.040 in mol\n", + "Mole fraction of xHe=0.261, xNe=0.652 and, xXe=0.087\n", + "Final pressure is 1.917 bar\n", + "Partial pressure of pHe=0.500, pNe=1.250 and, pXe=0.167 in bar\n" + ] + } + ], + "source": [ + "import math \n", + "phe = 1.5 #Pressure in Helium chamber, bar\n", + "vhe = 2.0 #Volume of Helium chamber, L\n", + "pne = 2.5 #Pressure in Neon chamber, bar\n", + "vne = 3.0 #Volume of Neon chamber, L\n", + "pxe = 1.0 #Pressure in Xenon chamber, bar\n", + "vxe = 1.0 #Volume of Xenon chamber, L\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "#Calculations\n", + "\n", + "nhe = phe*vhe/(R*T) #Number of moles of Helium, mol\n", + "nne = pne*vne/(R*T) #Number of moles of Neon, mol\n", + "nxe = pxe*vxe/(R*T) #Number of moles of Xenon, mol\n", + "n = nhe + nne + nxe #Total number of moles, mol\n", + "V = vhe + vne + vxe #Total volume of system, L\n", + "xhe = nhe/n\n", + "xne = nne/n\n", + "xxe = nxe/n\n", + "P = n*R*T/(V)\n", + "phe = P*xhe #Partial pressure of Helium, bar\n", + "pne = P*xne #Partial pressure of Neon, bar\n", + "pxe = P*xxe #Partial pressure of Xenon, bar\n", + "\n", + "#Results\n", + "print 'Moles of He=%4.3f, Ne=%4.3f and, Xe=%4.3f in mol'%(nhe,nne,nxe) \n", + "print 'Mole fraction of xHe=%4.3f, xNe=%4.3f and, xXe=%4.3f'%(xhe,xne,xxe)\n", + "print 'Final pressure is %4.3f bar'%P\n", + "print 'Partial pressure of pHe=%4.3f, pNe=%4.3f and, pXe=%4.3f in bar'%(phe,pne,pxe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.4:pg-12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure from ideal gas law = 9.98e-02 bar nad from Van der Waals equation = 9.98e-02 bar \n", + "Pressure from ideal gas law = 249.4 bar nad from Van der Waals equation = 269.9 bar \n" + ] + } + ], + "source": [ + "\n", + "import math \n", + "T = 300.0 #Nitrogen temperature, K\n", + "v1 = 250.00 #Molar volume, L\n", + "v2 = 0.1 #Molar volume, L\n", + "a = 1.37 #Van der Waals parameter a, bar.dm6/mol2 \n", + "b = 0.0387 #Van der Waals parameter b, dm3/mol\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "n = 1.\n", + "#Calculations\n", + "\n", + "p1 = n*R*T/v1 \n", + "p2 = n*R*T/v2\n", + "pv1 = n*R*T/(v1-n*b)- n**2*a/v1**2\n", + "pv2 = n*R*T/(v2-n*b)- n**2*a/v2**2\n", + "\n", + "#Results\n", + "print 'Pressure from ideal gas law = %4.2e bar nad from Van der Waals equation = %4.2e bar '%(p1, pv1)\n", + "print 'Pressure from ideal gas law = %4.1f bar nad from Van der Waals equation = %4.1f bar '%(p2, pv2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UE2LpyX.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UE2LpyX.ipynb new file mode 100644 index 00000000..7d42ed97 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UE2LpyX.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 04: Thermochemistry" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.1:pg-72" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Avergae Enthalpy change required for breaking both OH bonds 927.0 kJ/mol\n", + "Average bond energy required for breaking both OH bonds 461.0 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "DH0_H2O = 241.8 #Std Enthalpy of reaxtion of Water Fomation backward rxn, kJ/mol\n", + "DH0_2H = 2*218.0 #Std Enthalpy of formation of Hydrogen atom, kJ/mol\n", + "DH0_O = 249.2 #Std Enthalpy of formation of Oxygen atom, kJ/mol\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "Dn = 2.0\n", + "T = 298.15 #Std. Temperature, K\n", + "#Calculation\n", + "DH0_2HO = DH0_H2O + DH0_2H + DH0_O\n", + "DU0 = (DH0_2HO - Dn*R*T*1e-3)/2\n", + "\n", + "#Results\n", + "print 'Avergae Enthalpy change required for breaking both OH bonds %4.1f kJ/mol'%DH0_2HO\n", + "print 'Average bond energy required for breaking both OH bonds %4.1f kJ/mol'%DU0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.2:pg-74" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat of reaction for HCl formation is -95.1 kJ/mol\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "#Variable Declaration\n", + "a = ([29.064, 31.695, 28.165]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "b = ([-0.8363e-3, 10.143e-3, 1.809e-3]) #Constant 'b' in Heat capacity equation, J/(mol.K)\n", + "c = ([20.111e-7, -40.373e-7, 15.464e-7]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "delHf0HCl = -92.3 #Std. Heat of formation of HCl, kJ/mol\n", + "T1, T2 = 298.15, 1450 #Std and final temperature, K\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "DA = a[2]-(a[0]+a[1])/2\n", + "DB = b[2]-(b[0]+b[1])/2\n", + "DC = c[2]-(c[0]+c[1])/2\n", + "\n", + "expr = integrate( DA + DB*T + DC*T**2, (T,T1,T2))\n", + "DHR1450= expr/1000 + delHf0HCl\n", + "\n", + "#Results\n", + "print 'Heat of reaction for HCl formation is %4.1f kJ/mol'%DHR1450" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.3:pg-75" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calorimeter constant 7.59e+03 J/°C\n", + "Enthalpy of rection for benzene -3.26e+06 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms1 = 0.972 #Mass of cyclohexane, g\n", + "DT1 = 2.98 #Change in temperature for bath, °C\n", + "DUR1 = -3913e3 #Std Internal energy change, J/mol\n", + "mw = 1.812e3 #Mass of water, g\n", + "ms2 = 0.857 #Mass of benzene, g\n", + "Ms1 = 84.16\n", + "Ms2 = 78.12\n", + "DT2 = 2.36 #Change in temperature for bath, °C\n", + "Mw = 18.02\n", + "Cpw = 75.3 \n", + "\n", + "#Calculation\n", + "\n", + "Ccal = ((-ms1/Ms1)*DUR1-(mw/Mw)*Cpw*DT1)/DT1\n", + "DUR2 = (-Ms2/ms2)*((mw/Mw)*Cpw*DT2+Ccal*DT2)\n", + "\n", + "#Results\n", + "print 'Calorimeter constant %4.2e J/°C'%Ccal\n", + "print 'Enthalpy of rection for benzene %4.2e J/mol'%DUR2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.4:pg-77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy of solution for Na2SO4 -2.81e+03 J/mol\n", + "Enthalpy of solution for Na2SO4 from Data -2.40e+00 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms = 1.423 #Mass of Na2SO4, g\n", + "mw = 100.34 #Mass of Na2SO4, g\n", + "DT = 0.037 #Change in temperature for solution, K\n", + "Mw = 18.02 #Molecular wt of Water\n", + "Ms = 142.04 #Molecular wt of ms Na2SO4\n", + "Ccal = 342.5 #Calorimeter constant, J/K\n", + "#Data\n", + "DHfNa = -240.1\n", + "DHfSO4 = -909.3\n", + "DHfNa2SO4 = -1387.1\n", + "\n", + "#Calculation\n", + "DHs = (-Ms/ms)*((mw/Mw)*Cpw*DT+Ccal*DT)\n", + "DHsolD = 2*DHfNa + DHfSO4 - DHfNa2SO4\n", + "\n", + "#Results\n", + "print 'Enthalpy of solution for Na2SO4 %4.2e J/mol'%DHs\n", + "print 'Enthalpy of solution for Na2SO4 from Data %4.2e J/mol'%DHsolD" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_URNYBHc.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_URNYBHc.ipynb new file mode 100644 index 00000000..504b170b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_URNYBHc.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 09: Ideal and Real Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.2:pg-212" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gibbs energy change of mixing is -1.371e+04 J\n", + "Gibbs energy change of mixing is < 0, hence the mixing is spontaneous\n", + "Entropy change of mixing is 45.99 J/K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "dGmix = n*R*T*(xb*log(xb)+xt*log(xt))\n", + "dSmix = -n*R*(xb*log(xb)+xt*log(xt))\n", + "\n", + "#Results\n", + "print 'Gibbs energy change of mixing is %4.3e J'%dGmix\n", + "print 'Gibbs energy change of mixing is < 0, hence the mixing is spontaneous'\n", + "print 'Entropy change of mixing is %4.2f J/K'%dSmix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.3:pg-214" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total pressure of the vapor is 69.8 torr\n", + "Benzene fraction in vapor is 0.837 \n", + "Toulene fraction in vapor is 0.163 \n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "P = xb*P0b + xt*P0t\n", + "y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "yt = 1.-y\n", + "\n", + "#Results\n", + "print 'Total pressure of the vapor is %4.1f torr'%P\n", + "print 'Benzene fraction in vapor is %4.3f '%y\n", + "print 'Toulene fraction in vapor is %4.3f '%yt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.4:pg-215" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass Balance: 6.75*x + 1.5*y - 5.0\n", + "Pressure and x: P - 67.5*x - 28.9\n", + "Pressure and y: y - 0.0148148148148148*(96.4*P - 2785.96)/P\n", + "Pressure is 66.8 torr\n", + "Mole fraction of benzene in liquid phase 0.561\n", + "Mole fraction of benzene in vapor phase 0.810\n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "nv = 1.5 #moles vaporized, mol\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "nl = n - nv\n", + "zb = nb/n\n", + "\n", + "x,y, P = symbols('x y P')\n", + "e1 = nv*(y-zb)-nl*(zb-x)\n", + "print 'Mass Balance:', e1\n", + "e2 = P - (x*P0b + (1-x)*P0t)\n", + "print 'Pressure and x:',e2\n", + "e3 = y - (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "print 'Pressure and y:', e3\n", + "equations = [e1,e2,e3]\n", + "sol = solve(equations)\n", + "\n", + "#Results\n", + "for i in sol:\n", + " if ((i[x] > 0.0 and i[x] <1.0) and (i[P] > 0.0) and (i[y]>zb and i[y]<1.0)):\n", + " print 'Pressure is %4.1f torr' %i[P]\n", + " print 'Mole fraction of benzene in liquid phase %4.3f' %i[x]\n", + " print 'Mole fraction of benzene in vapor phase %4.3f' %i[y]\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.6:pg-222" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Freezing point depression -3.94 K\n", + "Molecualr wt of solute 274.2 g/mol\n", + "Vapor pressure of solvent is reduced by a factor of 0.980\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 4.50 #Mass of substance dissolved, g\n", + "ms = 125.0 #Mass of slovent (CCl4), g\n", + "TbE = 0.65 #Boiling point elevation, °C\n", + "Kf, Kb = 30.0, 4.95 #Constants for freezing point elevation \n", + " # and boiling point depression for CCl4, K kg/mol\n", + "Msolvent = 153.8 #Molecualr wt of solvent, g/mol\n", + "#Calculations\n", + "DTf = -Kf*TbE/Kb\n", + "Msolute = Kb*m/(ms*1e-3*TbE)\n", + "nsolute = m/Msolute\n", + "nsolvent = ms/Msolvent \n", + "x = 1.0 - nsolute/(nsolute + nsolvent)\n", + "\n", + "#Results\n", + "print 'Freezing point depression %5.2f K'%DTf\n", + "print 'Molecualr wt of solute %4.1f g/mol'%Msolute\n", + "print 'Vapor pressure of solvent is reduced by a factor of %4.3f'%x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.7:pg-223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Osmotic pressure 12.23 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "csolute = 0.500 #Concentration of solute, g/L\n", + "R = 8.206e-2 #Gas constant L.atm/(mol.K)\n", + "T = 298.15 #Temperature of the solution, K\n", + "\n", + "#Calculations\n", + "pii = csolute*R*T\n", + "\n", + "#Results\n", + "print 'Osmotic pressure %4.2f atm'%pii\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.8:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.6994 atm\n", + "Activity coefficinet of CS2 1.9971 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "p0CS2 = 512.3 #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/p0CS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.9:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.1783 atm\n", + "Activity coefficinet of CS2 0.5090 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "kHCS2 = 2010. #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/kHCS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.10:pg-231" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Henrys constant = 143.38 torr\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "rho = 789.9 #Density of acetone, g/L\n", + "n = 1.0 #moles of acetone, mol\n", + "M = 58.08 #Molecular wt of acetone, g/mol\n", + "kHacetone = 1950 #Henrys law constant, torr\n", + "#Calculations\n", + "H = n*M*kHacetone/rho\n", + "\n", + "#Results\n", + "print 'Henrys constant = %5.2f torr'%H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.11:pg-232" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity coefficient = 0.969\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 0.5 #Mass of water, kg\n", + "ms = 24.0 #Mass of solute, g\n", + "Ms = 241.0 #Molecular wt of solute, g/mol\n", + "Tfd = 0.359 #Freezinf point depression, °C or K\n", + "kf = 1.86 #Constants for freezing point depression for water, K kg/mol\n", + "\n", + "#Calculations\n", + "msolute = ms/(Ms*m)\n", + "gama = Tfd/(kf*msolute)\n", + "\n", + "#Results\n", + "print 'Activity coefficient = %4.3f'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.12:pg-233" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of moles of nitrogen in blood at 1 and 50 bar are 2.46e-03,0.123 mol\n", + "Volume of nitrogen released from blood at reduced pressure 2.981 L\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 70.0 #Mass of human body, kg\n", + "V = 5.00 #Volume of blood, L\n", + "HN2 = 9.04e4 #Henry law constant for N2 solubility in blood, bar\n", + "T = 298.0 #Temperature, K\n", + "rho = 1.00 #density of blood, kg/L\n", + "Mw = 18.02 #Molecualr wt of water, g/mol\n", + "X = 80 #Percent of N2 at sea level\n", + "p1, p2 = 1.0, 50.0 #Pressures, bar\n", + "R = 8.314e-2 #Ideal Gas constant, L.bar/(mol.K)\n", + "#Calculations\n", + "nN21 = (V*rho*1e3/Mw)*(p1*X/100)/HN2\n", + "nN22 = (V*rho*1e3/Mw)*(p2*X/100)/HN2\n", + "V = (nN22-nN21)*R*T/p1\n", + "#Results\n", + "print 'Number of moles of nitrogen in blood at 1 and 50 bar are %3.2e,%3.3f mol'%(nN21,nN22)\n", + "print 'Volume of nitrogen released from blood at reduced pressure %4.3f L'%V" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UpRo20c.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UpRo20c.ipynb new file mode 100644 index 00000000..04d54ef7 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_UpRo20c.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 02: Heat, Work, Internal Energy, Enthalpy, and The First Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.1:pg-20" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part a: Work done in expansion is -16.2 kJ\n", + "Part b: Work done in expansion of bubble is -1.73 J\n", + "Part c: Work done in paasing the cuurent through coil is 1.39 kJ\n", + "Part d: Work done stretching th fiber is -1.12 J\n" + ] + } + ], + "source": [ + "import math #Part a\n", + "vi = 20.0 #Initial volume of ideal gas, L\n", + "vf = 85.0 #final volume of ideal gas, L\n", + "Pext = 2.5 #External Pressure against which work is done, bar\n", + "\n", + "#Calculations\n", + "w = -Pext*1e5*(vf-vi)*1e-3\n", + "\n", + "#Results\n", + "print 'Part a: Work done in expansion is %6.1f kJ'%(w/1000)\n", + "\n", + "import math #Part b\n", + "ri = 1.00 #Initial diameter of bubble, cm\n", + "rf = 3.25 #final diameter of bubble, cm\n", + "sigm = 71.99 #Surface tension, N/m\n", + "\n", + "#Calculations\n", + "w = -2*sigm*4*math.pi*(rf**2-ri**2)*1e-4\n", + "\n", + "#Results\n", + "print 'Part b: Work done in expansion of bubble is %4.2f J'%w\n", + "\n", + "import math #Part c\n", + "i = 3.20 #Current through heating coil, A \n", + "v = 14.5 #fVoltage applied across coil, volts\n", + "t = 30.0 #time for which current is applied,s\n", + "\n", + "#Calculations\n", + "w = v*i*t\n", + "\n", + "#Results\n", + "print 'Part c: Work done in pasing the cuurent through coil is %4.2f kJ'%(w/1000)\n", + "\n", + "import math #Part d\n", + "k = 100.0 #Constant in F = -kx, N/cm \n", + "dl = -0.15 #stretch , cm\n", + "\n", + "#Calculations\n", + "w = -k*(dl**2-0)/2\n", + "\n", + "#Results\n", + "print 'Part d: Work done stretching th fiber is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.2:pg-22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat added to the water 24.00 kJ\n", + "Work done in vaporizing liquid is -1703.84 J\n" + ] + } + ], + "source": [ + "import math \n", + "m = 100.0 #Mass of water, g \n", + "T = 100.0 #Temperature of water, °C\n", + "Pext = 1.0 #External Pressure on assembly, bar\n", + "x = 10.0 #percent of water vaporised at 1 bar,-\n", + "i = 2.00 #current through heating coil, A\n", + "v = 12.0 #Voltage applied, v\n", + "t = 1.0e3 #time for which current applied, s \n", + "rhol = 997 #Density of liquid, kg/m3\n", + "rhog = 0.59 #Density of vapor, kg/m3\n", + "\n", + "#Calculations\n", + "q = i*v*t\n", + "vi = m/(rhol*100)*1e-3\n", + "vf = m*(100-x)*1e-3/(rhol*100) + m*x*1e-3/(rhog*100)\n", + "w = -Pext*(vf-vi)*1e5\n", + "#Results\n", + "print 'Heat added to the water %4.2f kJ'%(q/1000)\n", + "print 'Work done in vaporizing liquid is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.3:pg-27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat removed by water at constant pressure 89.03 kJ\n" + ] + } + ], + "source": [ + "import math #Part d\n", + "m = 1.5 #mass of water in surrounding, kg \n", + "dT = 14.2 #Change in temperature of water, °C or K\n", + "cp = 4.18 #Specific heat of water at constant pressure, J/(g.K)\n", + "\n", + "#Calculations\n", + "qp = m*cp*dT\n", + "\n", + "#Results\n", + "print 'Heat removed by water at constant pressure %4.2f kJ'%qp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.4:pg-32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For reverssible Isothermal expansion\n", + "Work done = -1.93e+02 J\n", + "For Single step reverssible expansion\n", + "Work done = -9.22e+03 J\n", + "For Two step reverssible expansion\n", + "Work done = -1.29e+04 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "import math \n", + "n = 2.0 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, bar.L/(mol.K)\n", + "#For reverssible Isothermal expansion \n", + "Pi1 = 25.0 #Initial Pressure of ideal gas, bar\n", + "Vi1 = 4.50 #Initial volume of ideal gas, L\n", + "Pf1 = 4.50 #Fianl Pressure of ideal gas, bar\n", + "Pext = 4.50 #External pressure, bar \n", + "Pint = 11.0 #Intermediate pressure, bar\n", + "\n", + "#Calcualtions reverssible Isothermal expansion \n", + "T1 = Pi1*Vi1/(n*R)\n", + "Vf1 = n*R*T1/Pf1\n", + "w = -n*R*T1*log(Vf1/Vi1)\n", + "\n", + "#Results\n", + "print 'For reverssible Isothermal expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Single step irreverssible expansion \n", + "\n", + "w = -Pext*1e5*(Vf1-Vi1)*1e-3\n", + "\n", + "#Results\n", + "print 'For Single step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Two step irreverssible expansion \n", + "Vint = n*R*T1/(Pint)\n", + "w = -Pint*1e5*(Vint-Vi1)*1e-3 - Pf1*1e5*(Vf1-Vint)*1e-3\n", + "\n", + "#Results\n", + "print 'For Two step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.5:pg-37" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Path q w DU DH \n", + "1-2 139463.96 -39840.00 99623.96 139463.96\n", + "2-3 -99623.96 0.00 -99623.96 -139463.96\n", + "3-1 -5343.33 5343.33 0.00 0.00\n", + "Overall 34496.67 -34496.67 0.00 0.00\n", + "all values are in J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 2.5 #moles of ideal gas\n", + "R = 0.08314 #Ideal gas constant, bar.L/(mol.K)\n", + "cvm = 20.79 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "p1 = 16.6 #Pressure at point 1, bar\n", + "v1 = 1.00 #Volume at point 1, L\n", + "p2 = 16.6 #Pressure at point 2, bar\n", + "v2 = 25.0 #Volume at point 2, L \n", + "v3 = 25.0 #Volume at point 3, L\n", + "\n", + "#Calculations\n", + "T1 = p1*v1/(n*R)\n", + "T2 = p2*v2/(n*R)\n", + "T3 = T1 #from problem statement\n", + " #for path 1-2\n", + "DU12 = n*cvm*(T2-T1)\n", + "w12 = -p1*1e5*(v2-v1)*1e-3\n", + "q12 = DU12 - w12\n", + "DH12 = DU12 + n*R*(T2-T1)*1e2\n", + "\n", + " #for path 2-3\n", + "w23 = 0.0\n", + "DU23 = q23 = n*cvm*(T3-T2)\n", + "DH23 = -DH12\n", + "\n", + "\n", + " #for path 3-1\n", + "DU31 = 0.0 #Isothemal process\n", + "DH31 = 0.0\n", + "w31 = -n*R*1e2*T1*log(v1/v3)\n", + "q31 = -w31\n", + "\n", + "DU = DU12+DU23+DU31\n", + "w = w12+w23+w31\n", + "q = q12+q23+q31\n", + "DH = DH12+DH23+DH31\n", + "\n", + "#Results\n", + "print 'For Path q w DU DH '\n", + "print '1-2 %7.2f %7.2f %7.2f %7.2f'%(q12,w12,DU12,DH12)\n", + "print '2-3 %7.2f %7.2f %7.2f %7.2f'%(q23,w23,DU23,DH23)\n", + "print '3-1 %7.2f %7.2f %7.2f %7.2f'%(q31,w31,DU31,DH31)\n", + "print 'Overall %7.2f %7.2f %7.2f %7.2f'%(q,w,DU,DH)\n", + "print 'all values are in J'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.6:pg-38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The final temperature at end of adiabatic procees is 268.5 K\n", + "The enthalpy change of adiabatic procees is -2937.0 J\n", + "The Internal energy change of adiabatic procees is -1762.2 J\n", + "The work done in expansion of adiabatic procees is -1762.2 J\n" + ] + } + ], + "source": [ + "\n", + "import math #Part d\n", + "n = 2.5 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "cvm = 12.47 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "pext = 1.00 #External Pressure, bar\n", + "Ti = 325. #Initial Temeprature, K\n", + "pi = 2.50 #Initial Pressure, bar\n", + "pf = 1.25 #Final pressure, bar \n", + "\n", + "#Calculations Adiabatic process q = 0; DU = w\n", + "q = 0.0 \n", + "Tf = Ti*(cvm + R*pext/pi)/(cvm + R*pext/pf )\n", + "DU = w = n*cvm*(Tf-Ti)\n", + "DH = DU + n*R*(Tf-Ti)\n", + "\n", + "#Results\n", + "print 'The final temperature at end of adiabatic procees is %4.1f K'%Tf\n", + "print 'The enthalpy change of adiabatic procees is %4.1f J'%DH\n", + "print 'The Internal energy change of adiabatic procees is %4.1f J'%DU\n", + "print 'The work done in expansion of adiabatic procees is %4.1f J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.7:pg-40" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature of cloud 265.2 K\n", + "You can expect cloud\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + " #Part d\n", + "h1 = 1000.0 #initial Altitude of cloud, m \n", + "hf = 3500.0 #Final Altitude of cloud, m \n", + "p1 = 0.802 #Pressure at h1, atm \n", + "pf = 0.602 #Pressure at hf, atm\n", + "T1 = 288.0 #Initial temperature of cloud, K\n", + "cp = 28.86 #Specific heat of air, J/mol.K\n", + "R = 8.314 #Gas constant, J/mol.K\n", + "\n", + "#Calculations\n", + "Tf = exp(-(cp/(cp-R)-1)/(cp/(cp-R))*log(p1/pf))*T1\n", + "#Results\n", + "print 'Final temperature of cloud %4.1f K'%Tf\n", + "if Tf < 273:\n", + " print 'You can expect cloud'\n", + "else:\n", + " print 'You can not expect cloud'" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_XbL429a.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_XbL429a.ipynb new file mode 100644 index 00000000..04d54ef7 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_XbL429a.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 02: Heat, Work, Internal Energy, Enthalpy, and The First Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.1:pg-20" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part a: Work done in expansion is -16.2 kJ\n", + "Part b: Work done in expansion of bubble is -1.73 J\n", + "Part c: Work done in paasing the cuurent through coil is 1.39 kJ\n", + "Part d: Work done stretching th fiber is -1.12 J\n" + ] + } + ], + "source": [ + "import math #Part a\n", + "vi = 20.0 #Initial volume of ideal gas, L\n", + "vf = 85.0 #final volume of ideal gas, L\n", + "Pext = 2.5 #External Pressure against which work is done, bar\n", + "\n", + "#Calculations\n", + "w = -Pext*1e5*(vf-vi)*1e-3\n", + "\n", + "#Results\n", + "print 'Part a: Work done in expansion is %6.1f kJ'%(w/1000)\n", + "\n", + "import math #Part b\n", + "ri = 1.00 #Initial diameter of bubble, cm\n", + "rf = 3.25 #final diameter of bubble, cm\n", + "sigm = 71.99 #Surface tension, N/m\n", + "\n", + "#Calculations\n", + "w = -2*sigm*4*math.pi*(rf**2-ri**2)*1e-4\n", + "\n", + "#Results\n", + "print 'Part b: Work done in expansion of bubble is %4.2f J'%w\n", + "\n", + "import math #Part c\n", + "i = 3.20 #Current through heating coil, A \n", + "v = 14.5 #fVoltage applied across coil, volts\n", + "t = 30.0 #time for which current is applied,s\n", + "\n", + "#Calculations\n", + "w = v*i*t\n", + "\n", + "#Results\n", + "print 'Part c: Work done in pasing the cuurent through coil is %4.2f kJ'%(w/1000)\n", + "\n", + "import math #Part d\n", + "k = 100.0 #Constant in F = -kx, N/cm \n", + "dl = -0.15 #stretch , cm\n", + "\n", + "#Calculations\n", + "w = -k*(dl**2-0)/2\n", + "\n", + "#Results\n", + "print 'Part d: Work done stretching th fiber is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.2:pg-22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat added to the water 24.00 kJ\n", + "Work done in vaporizing liquid is -1703.84 J\n" + ] + } + ], + "source": [ + "import math \n", + "m = 100.0 #Mass of water, g \n", + "T = 100.0 #Temperature of water, °C\n", + "Pext = 1.0 #External Pressure on assembly, bar\n", + "x = 10.0 #percent of water vaporised at 1 bar,-\n", + "i = 2.00 #current through heating coil, A\n", + "v = 12.0 #Voltage applied, v\n", + "t = 1.0e3 #time for which current applied, s \n", + "rhol = 997 #Density of liquid, kg/m3\n", + "rhog = 0.59 #Density of vapor, kg/m3\n", + "\n", + "#Calculations\n", + "q = i*v*t\n", + "vi = m/(rhol*100)*1e-3\n", + "vf = m*(100-x)*1e-3/(rhol*100) + m*x*1e-3/(rhog*100)\n", + "w = -Pext*(vf-vi)*1e5\n", + "#Results\n", + "print 'Heat added to the water %4.2f kJ'%(q/1000)\n", + "print 'Work done in vaporizing liquid is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.3:pg-27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat removed by water at constant pressure 89.03 kJ\n" + ] + } + ], + "source": [ + "import math #Part d\n", + "m = 1.5 #mass of water in surrounding, kg \n", + "dT = 14.2 #Change in temperature of water, °C or K\n", + "cp = 4.18 #Specific heat of water at constant pressure, J/(g.K)\n", + "\n", + "#Calculations\n", + "qp = m*cp*dT\n", + "\n", + "#Results\n", + "print 'Heat removed by water at constant pressure %4.2f kJ'%qp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.4:pg-32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For reverssible Isothermal expansion\n", + "Work done = -1.93e+02 J\n", + "For Single step reverssible expansion\n", + "Work done = -9.22e+03 J\n", + "For Two step reverssible expansion\n", + "Work done = -1.29e+04 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "import math \n", + "n = 2.0 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, bar.L/(mol.K)\n", + "#For reverssible Isothermal expansion \n", + "Pi1 = 25.0 #Initial Pressure of ideal gas, bar\n", + "Vi1 = 4.50 #Initial volume of ideal gas, L\n", + "Pf1 = 4.50 #Fianl Pressure of ideal gas, bar\n", + "Pext = 4.50 #External pressure, bar \n", + "Pint = 11.0 #Intermediate pressure, bar\n", + "\n", + "#Calcualtions reverssible Isothermal expansion \n", + "T1 = Pi1*Vi1/(n*R)\n", + "Vf1 = n*R*T1/Pf1\n", + "w = -n*R*T1*log(Vf1/Vi1)\n", + "\n", + "#Results\n", + "print 'For reverssible Isothermal expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Single step irreverssible expansion \n", + "\n", + "w = -Pext*1e5*(Vf1-Vi1)*1e-3\n", + "\n", + "#Results\n", + "print 'For Single step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Two step irreverssible expansion \n", + "Vint = n*R*T1/(Pint)\n", + "w = -Pint*1e5*(Vint-Vi1)*1e-3 - Pf1*1e5*(Vf1-Vint)*1e-3\n", + "\n", + "#Results\n", + "print 'For Two step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.5:pg-37" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Path q w DU DH \n", + "1-2 139463.96 -39840.00 99623.96 139463.96\n", + "2-3 -99623.96 0.00 -99623.96 -139463.96\n", + "3-1 -5343.33 5343.33 0.00 0.00\n", + "Overall 34496.67 -34496.67 0.00 0.00\n", + "all values are in J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 2.5 #moles of ideal gas\n", + "R = 0.08314 #Ideal gas constant, bar.L/(mol.K)\n", + "cvm = 20.79 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "p1 = 16.6 #Pressure at point 1, bar\n", + "v1 = 1.00 #Volume at point 1, L\n", + "p2 = 16.6 #Pressure at point 2, bar\n", + "v2 = 25.0 #Volume at point 2, L \n", + "v3 = 25.0 #Volume at point 3, L\n", + "\n", + "#Calculations\n", + "T1 = p1*v1/(n*R)\n", + "T2 = p2*v2/(n*R)\n", + "T3 = T1 #from problem statement\n", + " #for path 1-2\n", + "DU12 = n*cvm*(T2-T1)\n", + "w12 = -p1*1e5*(v2-v1)*1e-3\n", + "q12 = DU12 - w12\n", + "DH12 = DU12 + n*R*(T2-T1)*1e2\n", + "\n", + " #for path 2-3\n", + "w23 = 0.0\n", + "DU23 = q23 = n*cvm*(T3-T2)\n", + "DH23 = -DH12\n", + "\n", + "\n", + " #for path 3-1\n", + "DU31 = 0.0 #Isothemal process\n", + "DH31 = 0.0\n", + "w31 = -n*R*1e2*T1*log(v1/v3)\n", + "q31 = -w31\n", + "\n", + "DU = DU12+DU23+DU31\n", + "w = w12+w23+w31\n", + "q = q12+q23+q31\n", + "DH = DH12+DH23+DH31\n", + "\n", + "#Results\n", + "print 'For Path q w DU DH '\n", + "print '1-2 %7.2f %7.2f %7.2f %7.2f'%(q12,w12,DU12,DH12)\n", + "print '2-3 %7.2f %7.2f %7.2f %7.2f'%(q23,w23,DU23,DH23)\n", + "print '3-1 %7.2f %7.2f %7.2f %7.2f'%(q31,w31,DU31,DH31)\n", + "print 'Overall %7.2f %7.2f %7.2f %7.2f'%(q,w,DU,DH)\n", + "print 'all values are in J'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.6:pg-38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The final temperature at end of adiabatic procees is 268.5 K\n", + "The enthalpy change of adiabatic procees is -2937.0 J\n", + "The Internal energy change of adiabatic procees is -1762.2 J\n", + "The work done in expansion of adiabatic procees is -1762.2 J\n" + ] + } + ], + "source": [ + "\n", + "import math #Part d\n", + "n = 2.5 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "cvm = 12.47 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "pext = 1.00 #External Pressure, bar\n", + "Ti = 325. #Initial Temeprature, K\n", + "pi = 2.50 #Initial Pressure, bar\n", + "pf = 1.25 #Final pressure, bar \n", + "\n", + "#Calculations Adiabatic process q = 0; DU = w\n", + "q = 0.0 \n", + "Tf = Ti*(cvm + R*pext/pi)/(cvm + R*pext/pf )\n", + "DU = w = n*cvm*(Tf-Ti)\n", + "DH = DU + n*R*(Tf-Ti)\n", + "\n", + "#Results\n", + "print 'The final temperature at end of adiabatic procees is %4.1f K'%Tf\n", + "print 'The enthalpy change of adiabatic procees is %4.1f J'%DH\n", + "print 'The Internal energy change of adiabatic procees is %4.1f J'%DU\n", + "print 'The work done in expansion of adiabatic procees is %4.1f J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.7:pg-40" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature of cloud 265.2 K\n", + "You can expect cloud\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + " #Part d\n", + "h1 = 1000.0 #initial Altitude of cloud, m \n", + "hf = 3500.0 #Final Altitude of cloud, m \n", + "p1 = 0.802 #Pressure at h1, atm \n", + "pf = 0.602 #Pressure at hf, atm\n", + "T1 = 288.0 #Initial temperature of cloud, K\n", + "cp = 28.86 #Specific heat of air, J/mol.K\n", + "R = 8.314 #Gas constant, J/mol.K\n", + "\n", + "#Calculations\n", + "Tf = exp(-(cp/(cp-R)-1)/(cp/(cp-R))*log(p1/pf))*T1\n", + "#Results\n", + "print 'Final temperature of cloud %4.1f K'%Tf\n", + "if Tf < 273:\n", + " print 'You can expect cloud'\n", + "else:\n", + " print 'You can not expect cloud'" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Xc77DNt.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Xc77DNt.ipynb new file mode 100644 index 00000000..81a699eb --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Xc77DNt.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Complex Reaction Mechanism " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.1:pg-511" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEQCAYAAACTEVJTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+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sfgXeB\nayLi+TrO7UhaR2pybV83awwXFrMGypYn/zVwekQsz9p+QVrXKg+TSKs7dwHeyPIcSNr58/sRMa+u\nEyNiqaRpTZLSWg0XFrOGuwMYuraoZKaQfsDnoQvwT9I2EFOytm1Im8atKyqSOpEW7wzSitorImIi\nG98zxqzBXFjMGkDSYaQhr/EbfGl0RKws8msdAZwKVJHmQytJ28d+BqBg2E2kfUy6FGScz/p9N8iO\nX0xaTbvwNXYAugF9gDuLmd9aL0/emzXMYcDjGzYWu6hsoDoi/gzsT+qZ/JW0VXShhcAu2eZskX39\nY/fWiIhlEfG1iHBRsaJxYTFrmBrSdrnrSNpC0tHZ430lnS7pKEnflbS3pP0kHSupt6TzsuN6Z8d8\nr64XiogngK4RMSnbzOz1SNtDH0I22S6pA7CcVFi6AIdmw1sHU/oNr8xq5cJi1jB/Aw7doO10oEpS\nZ9KE/h8j4nFgAfA28B8RMS7SdrttJe0HfBaYCHw628URSbsVPqmkLYH3sk97s34O5z+AxyUdkLU/\nE2mL4d2Bd7JjXFgsNy4sZg0QEXOAX0i6TtIASWeQdogMYCBp1761x94LnAOMLniKCuCdiPg1sApo\nGxErs4n1xzZ4uX2Bf2SP9wP+N3u8gLQV87bAj4EvZ+1PRMS07PLjnsCRxXjPZg3lHSTNikTSlcBV\nWaFoC+xF2mP8hxHxgaTts8cXZ8efQdoqdkVErJZ0VNbTMWvWXFjMiiQbCjuBtH84EfGvbHjrYOBl\nUqH5Y1Zkzib1KGqA8yKiRlLfiBibS3izInJhMTOzovIci5mZFZULi5mZFZULi5mZFZULi5mZFZUL\ni5mZFZULi5mZFZULi5mZFZULi5mZFZULi5mZFdX/B8J/v5b87GuOAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9aa4048>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Km and k2 are 10.0 mM and 1.1e+05 s-1\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from numpy import arange,array,ones,linalg,size\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ce = 2.3e-9 #Initial value of enzyme concentration, M\n", + "r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])\n", + "CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])\n", + "\n", + "#Calculations\n", + "rinv = 1./r\n", + "CCO2inv = 1./CCO2\n", + "xlim(0,850)\n", + "ylim(0,38000)\n", + "xi = CCO2inv\n", + "A = array([ CCO2inv, ones(size(CCO2inv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters\n", + "slope = w[0]\n", + "intercept = w[1]\n", + "\n", + "line = w[0]*CCO2inv+w[1] # regression line\n", + "plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')\n", + "xlabel('$ {C_{CO}}_2, mM^{-1} $')\n", + "ylabel('$ Rate^{-1}, s/M^{-1} $')\n", + "show()\n", + "rmax = 1./intercept\n", + "k2 = rmax/Ce\n", + "Km = slope*rmax\n", + "\n", + "#Results\n", + "print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.2:pg-517" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH11JREFUeJzt3Xl4VdW5x/HvGwQH2jrUOhCEplEBrViqRlqnoFKnKk6t\nxaJFRa0KVXHAKQ3ctF5HtIqtYq3cXrXcVm8pV8WSWtMWKYooqJgwpigJ1aJCBSdM3vvHOsghJuTk\nZOfsM/w+z5MnZ5+z98mbTcIve6291jJ3R0REJApFcRcgIiL5Q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qu4a6R4HjY7JONFZkiK5+J0M7sI2AB8QIo/Exr8KCIikcmH\n5i8REckSChUREYmMQkVERCKjUBERkcgoVEREJDIKFRERiYxCRUREIqNQERGRyChURDrIzLYys6yc\nbDGx2NbucdchhUuhItIKCya28XI50JS07w1mttTMzjOzS8zsXjP7XNLre5nZDDO7wMyqzeyXZnZh\nYoXFyH4HE1PwjCS/53STLJfzc3+JRM3MdiT853x4G7v0c/c/JW2/AOzm7g8kjr85cfykxOuDCLMg\nb1ye9hZ3X2xma9y9Oaq63f1NM5sf1fuJpEOhItJCYgr8O8zsxDZ2aWqxfTDwYtJ2b2BR0vbixOp6\nAHu7++LE47p0a0wsJrUfYdJDA9a6+xx0lSIxU6iIdEBiCvC5LZ4uA/6QeH03wgp6Uze+6O7zE6/t\nSVgXfOPzC8zsBGDnxMeTwBeBbwM7ANsD9yR23+y5xJonjS1q24WwiNKRwEOd/25FOk6hItIxBySW\nmk02CChNhMbngeNbrPm+URnw/MYNM9sbGOHuwxNLtV4M3A28B/wZ+Iu7f5S4KWCz51orzN3fAr7f\nuW9PpHMUKiIds1nzkpl9BVjh7o+lcGwZ8HTS9g+ARxKP+wDvJvpaDiT0u2wAcPdFLZ8TyVa6+0uk\nbS0DpB+b95VA6E959jMHmn25lfc7iKQrFaAHsCLx+DuEdeEBerQSHq09J5J1FCoiLZhZTzO7DOhv\nZpeZ2XaJl8qBmqT9DgcuAHZJ9GdsfL4X8Kek7f3N7EpgIHCqmX0p8dL9wDGJFRcfdfclZtaXzTv9\nae05kWyllR9FUmRmo919Uvt7gpkd4e5/6eqaRLKNrlREUpAYpd7QgUO27qpaRLKZrlREUmBm3wUe\nb+OuLhFJUKiIiEhk1PwlIiKRUaiIiEhkFCoiIhIZhYqIiERGoSIiIpFRqIiISGQUKiIiEhmFioiI\nREahIiIikfl//rBLh3QxZCwAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9acd4a8>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3\n", + "K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K\n", + "P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr\n", + "\n", + "#Calculations\n", + "Vinv = 1./Vads\n", + "Pinv =1./P\n", + "xlim(0,0.5)\n", + "ylim(0,0.2)\n", + "A = array([ Pinv, ones(size(Pinv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters\n", + "m = w[0]\n", + "c = w[1]\n", + "line = m*Pinv+c # regression line\n", + "plot(Pinv,line,'r-',Pinv,Vinv,'o')\n", + "xlabel('$ 1/P, Torr^{-1} $')\n", + "ylabel('$ 1/V_{abs}, cm^{-1}g $')\n", + "show()\n", + "Vm = 1./c\n", + "K = 1./(m*Vm)\n", + "\n", + "#Results\n", + "print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)\n", + "print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.4:pg-533" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFRJREFUeJzt3XuUXHWV6PHvjvgMDioIToKGJoBwQURACIjQqIwEVBjH\npaKo8UGiCPhAR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2K/zHzWGorUqlxYl0YgM3+7gcc+fxTDkUpnJSJJqplrIpKkmplEJEk1M4lI\nkmpmEpEk1cwkIkmqmUlEklQzk4gkqWYmEUlSzf4/9Fa7EFJttIoAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0xa641f28>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M\n", + "tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s\n", + "\n", + "#Calculations\n", + "Tfinv = 1./tf\n", + "xlim(0,0.006)\n", + "ylim(0,2.e7)\n", + "A = array([ CBr, ones(size(CBr))])\n", + "# linearly generated sequence\n", + "[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters\n", + "\n", + "line = m*CBr+c # regression line\n", + "plot(CBr,line,'r-',CBr,Tfinv,'o')\n", + "xlabel('$ Br_6C_6, M $')\n", + "ylabel('$ tau_f $')\n", + "show()\n", + "\n", + "#Results\n", + "print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.5:pg-536" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Separation Distance at decreased efficiency 11.53\n" + ] + } + ], + "source": [ + "from scipy.optimize import root\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = 11. #Distance of residue separation, °A\n", + "r0 = 9. #Initial Distance of residue separation, °A\n", + "EffD = 0.2 #Fraction decrease in eff\n", + "\n", + "#Calculations\n", + "Effi = r0**6/(r0**6+r**6)\n", + "Eff = Effi*(1-EffD)\n", + "f = lambda r: r0**6/(r0**6+r**6) - Eff\n", + "sol = root(f, 12)\n", + "rn = sol.x[0]\n", + "\n", + "#Results\n", + "print 'Separation Distance at decreased efficiency %4.2f'%rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.6:pg-538" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total photon energy absorbed by sample 2.7e+03 J\n", + "Photon energy absorbed at 280 nm is 7.1e-19 J\n", + "Total number of photon absorbed by sample 3.8e+21 photones\n", + "Overall quantum yield 0.40\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "mr = 2.5e-3 #Moles reacted, mol\n", + "P = 100.0 #Irradiation Power, J/s\n", + "t = 27 #Time of irradiation, s\n", + "h = 6.626e-34 #Planks constant, Js\n", + "c = 3.0e8 #Speed of light, m/s\n", + "labda = 280e-9 #Wavelength of light, m\n", + "\n", + "#Calculation\n", + "Eabs = P*t\n", + "Eph = h*c/labda\n", + "nph = Eabs/Eph #moles of photone\n", + "phi = mr/6.31e-3\n", + "\n", + "#Results\n", + "print 'Total photon energy absorbed by sample %3.1e J'%Eabs\n", + "print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph\n", + "print 'Total number of photon absorbed by sample %3.1e photones'%nph\n", + "print 'Overall quantum yield %4.2f'%phi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.7:pg-542" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DGS = 0.111 eV\n", + "Rate constant with barrier to electron transfer 2.66e+07 per s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "#Variable Declarations\n", + "r = 2.0e9 #Rate constant for electron transfer, per s\n", + "labda = 1.2 #Gibss energy change, eV\n", + "DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "T = 298.0 #Temeprature, K\n", + "#Calculation\n", + "DGS = (DG+labda)**2/(4*labda)\n", + "k193 = r*exp(-DGS*1.6e-19/(k*T))\n", + "#Results\n", + "print 'DGS = %5.3f eV'%DGS\n", + "print 'Rate constant with barrier to electron transfer %3.2e per s'%k193" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2GPb6S.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2GPb6S.ipynb new file mode 100644 index 00000000..7f1b328b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2GPb6S.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Electrochemical Cells, Batteries, and Fuel Cells" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.1:pg-265" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The potential of H+/H2 half cell 0.0083 V\n" + ] + } + ], + "source": [ + "from math import log, sqrt\n", + "\n", + "#Variable Declaration\n", + "aH = 0.770 #Activity of \n", + "fH2 = 1.13 #Fugacity of Hydrogen gas\n", + "E0 = 0.0 #Std. electrode potential, V\n", + "n = 1.0 #Number of electrons transfered\n", + "\n", + "#Calculations\n", + "E = E0 - (0.05916/n)*log(aH/sqrt(fH2),10)\n", + "\n", + "#Results\n", + "print 'The potential of H+/H2 half cell %5.4f V'%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.2:pg-266" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.689 1.019\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E0r1 = -0.877 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s) \n", + "E0r2 = -1.660 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s)\n", + "E0r3 = +0.071 #Std Electrod potential for Rx3 : AgBr (s) + e- ------> Ag(s) +Br- (aq.)\n", + "\n", + "#Calculations\n", + "#3Fe(OH)2 (s)+ 2Al (s) <---------> 3Fe (s) + 6(OH-) + 2Al3+\n", + "E0a = 3*E0r1 + (-2)*E0r2\n", + "#Fe (s) + 2OH- + 2AgBr (s) -------> Fe(OH)2 (s) + 2Ag(s) + 2Br- (aq.)\n", + "E0b = -E0r1 + (2)*E0r3\n", + "\n", + "#Results\n", + "print '%5.3f %5.3f'%(E0a,E0b)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.3:pg-267" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E0 for overall reaction is -0.041 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = 0.771 #Rx1 : Fe3+ + e- -----> Fe2+\n", + "E02 = -0.447 #Rx2 : Fe2+ + 2e- -----> Fe\n", + "F = 96485 #Faraday constant, C/mol\n", + "n1,n2,n3 = 1.,2.,3.\n", + "\n", + "#Calculations\n", + "dG01 = -n1*F*E01\n", + "dG02 = -n2*F*E02\n", + " #For overall reaction\n", + "dG0 = dG01 + dG02\n", + "E0Fe3byFe = -dG0/(n3*F)\n", + "\n", + "#Results\n", + "print 'E0 for overall reaction is %5.3f V'%(E0Fe3byFe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.4:pg-268" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. entropy change of reaction from dE0bydT is -2.32e+02 and\n", + "Std entropy values is -2.41e+02 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = +1.36 #Std. electrode potential for Cl2/Cl\n", + "dE0bydT = -1.20e-3 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "S0H = 0.0 #Std. entropy J/(K.mol) for H+ ,Cl-,H2, Cl2 \n", + "S0Cl = 56.5\n", + "S0H2 = 130.7\n", + "S0Cl2 = 223.1\n", + "nH, nCl, nH2, nCl2 = 2, 2, -1,-1\n", + "#Calculations\n", + "dS01 = n*F*dE0bydT\n", + "dS02 =nH*S0H + nCl*S0Cl + nH2*S0H2 + nCl2*S0Cl2\n", + "\n", + "#Results\n", + "print 'Std. entropy change of reaction from dE0bydT is %4.2e and\\nStd entropy values is %4.2e V'%(dS01,dS02)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.5:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.55e+37\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "E0 = +1.10 #Std. electrode potential for Danniel cell, V\n", + " #Zn(s) + Cu++ -----> Zn2+ + Cu\n", + "T = 298.15 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "R = 8.314 #Gas constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "K = exp(n*F*E0/(R*T))\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(K)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.6:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.57e-10\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +0.29 #Cell emf, V\n", + "n = 2.\n", + "\n", + "#Calculations\n", + "Ksp = 10**(-n*E/0.05916)\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(Ksp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.8:pg-272" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cell potentials for Zn, Ag, Au are 2.27 V, 0.71 V, and -0.18 V\n", + "Zn has positive cell potential of 2.272 V and Can be oxidized bypermangnate ion\n", + "Ag has positive cell potential of 0.710 V and Can be oxidized bypermangnate ion\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +1.51 #EMF for reduction of permangnet, V\n", + "E01 = -0.7618 #Zn2+ + 2e- --------> Zn (s)\n", + "E02 = +0.7996 #Ag+ + e- --------> Ag (s)\n", + "E03 = +1.6920 #Au+ + e- --------> Au (s) \n", + "\n", + "#Calculations\n", + "EZn = E - E01\n", + "EAg = E - E02\n", + "EAu = E - E03\n", + "animals = {\"parrot\": 2, \"fish\": 6}\n", + "Er = {\"Zn\":EZn,\"Ag\":EAg,\"Au\":EAu}\n", + "#Results\n", + "print 'Cell potentials for Zn, Ag, Au are %4.2f V, %4.2f V, and %4.2f V'%(EZn, EAg,EAu)\n", + "for i in Er:\n", + " if Er[i] >0.0:\n", + " print '%s has positive cell potential of %4.3f V and Can be oxidized bypermangnate ion' %(i,Er[i])\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2ay0Yh.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2ay0Yh.ipynb new file mode 100644 index 00000000..382b0ea4 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_Y2ay0Yh.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ensemble and Molecular Partition Function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.1:pg-344" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in energy levels is 3.10e-38 J or 1.56e-15 1/cm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "l = 0.01 #Box length, m \n", + "n1,n2 = 2,1 #Energy levels states\n", + "m = 5.31e-26 #mass of oxygen molecule, kg\n", + "\n", + "#Calculations \n", + "dE = (n1+n2)*h**2/(8*m*l**2)\n", + "dEcm = dE/(h*c*1e2)\n", + "#Results\n", + "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.2:pg-345" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave length is 1.60e-11 m and\n", + "Translational partition function is 2.44e+29\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "v = 1.0 #Volume, L\n", + "T = 298.0 #Temeprature of Ar, K\n", + "m = 6.63e-26 #Mass of Argon molecule, kg \n", + "\n", + "#Calculations \n", + "GAMA = h/sqrt(2*pi*m*k*T)\n", + "v = v*1e-3\n", + "qT3D = v/GAMA**3\n", + "\n", + "#Results\n", + "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.4:pg-350" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Spectrum will be observed at 494 K\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "J = 4 #Rotational energy level\n", + "B = 8.46 #Spectrum, 1/cm\n", + "\n", + "#Calculations \n", + "T = (2*J+1)**2*h*c*100*B/(2*k)\n", + "#Results\n", + "print 'Spectrum will be observed at %4.0f K'%(T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.5:pg-352" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 1000 is 5.729\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "B = 60.589 #Spectrum for H2, 1/cm\n", + "T = 1000 #Temperture of Hydrogen, K\n", + "#Calculations \n", + "qR = k*T/(2*h*c*100*B)\n", + "qRs = 0.0\n", + "#for J in range(101):\n", + "# print J\n", + "# if (J%2 == 0):\n", + "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n", + "# else:\n", + "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n", + "#print qRs/4\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.6:pg-353" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 100 K is 928.121\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "B = 0.0374 #Spectrum for H2, 1/cm\n", + "T = 100.0 #Temperture of Hydrogen, K\n", + "sigma = 2.\n", + "\n", + "#Calculations\n", + "ThetaR = h*c*100*B/k\n", + "qR = T/(sigma*ThetaR)\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.7:pg-354" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "Ba = 1.48 #Spectrum for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n", + "T = 298.0 #Temperture of Hydrogen, K\n", + "sigmab = 1\n", + "sigmac = 2\n", + "\n", + "#Calculations\n", + "qRa = k*T/(h*c*100*Ba)\n", + "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n", + "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n", + "\n", + "#Results\n", + "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.8:pg-356" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n" + ] + } + ], + "source": [ + "from math import pi, exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "Ba = 1.48 #Frequency for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n", + "T298 = 298.0 #Temperture of Hydrogen, K\n", + "T1000 = 1000 #Temperture of Hydrogen, K\n", + "nubar = 208\n", + "\n", + "#Calculations\n", + "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n", + "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.9:pg-357" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 450 1/cm the q = 1.128\n", + "At 945 1/cm the q = 1.010\n", + "At 1100 1/cm the q = 1.005\n", + "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "T = 298 #Temeprature, K\n", + "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.10:pg-359" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for F2 at 298.0 K is 10.508\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298 #Temeprature, K\n", + "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n", + "\n", + "#Calculations\n", + "ThetaV = h*c*100*nubar/k\n", + "Th = 10*ThetaV\n", + "qv = 1/(1.-exp(-ThetaV/Th))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.11:pg-360" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 1388 1/cm the q = 1.157\n", + "At 667 1/cm the q = 1.619\n", + "At 667 1/cm the q = 1.619\n", + "At 2349 1/cm the q = 1.035\n", + "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 1000 #Temeprature, K\n", + "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.12:pg-363" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electronic partition function for F2 at 298.0 K is 9.45\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298. #Temeprature, K\n", + "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n", + "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n", + "g0 = [4,6,8,10,2,4,6,8,10]\n", + "\n", + "#Calculations\n", + "qE = 0.0\n", + "for i in range(9):\n", + " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n", + " qE = qE + a\n", + "\n", + "#Results\n", + "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_YCfgqux.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_YCfgqux.ipynb new file mode 100644 index 00000000..7f1b328b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_YCfgqux.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Electrochemical Cells, Batteries, and Fuel Cells" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.1:pg-265" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The potential of H+/H2 half cell 0.0083 V\n" + ] + } + ], + "source": [ + "from math import log, sqrt\n", + "\n", + "#Variable Declaration\n", + "aH = 0.770 #Activity of \n", + "fH2 = 1.13 #Fugacity of Hydrogen gas\n", + "E0 = 0.0 #Std. electrode potential, V\n", + "n = 1.0 #Number of electrons transfered\n", + "\n", + "#Calculations\n", + "E = E0 - (0.05916/n)*log(aH/sqrt(fH2),10)\n", + "\n", + "#Results\n", + "print 'The potential of H+/H2 half cell %5.4f V'%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.2:pg-266" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.689 1.019\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E0r1 = -0.877 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s) \n", + "E0r2 = -1.660 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s)\n", + "E0r3 = +0.071 #Std Electrod potential for Rx3 : AgBr (s) + e- ------> Ag(s) +Br- (aq.)\n", + "\n", + "#Calculations\n", + "#3Fe(OH)2 (s)+ 2Al (s) <---------> 3Fe (s) + 6(OH-) + 2Al3+\n", + "E0a = 3*E0r1 + (-2)*E0r2\n", + "#Fe (s) + 2OH- + 2AgBr (s) -------> Fe(OH)2 (s) + 2Ag(s) + 2Br- (aq.)\n", + "E0b = -E0r1 + (2)*E0r3\n", + "\n", + "#Results\n", + "print '%5.3f %5.3f'%(E0a,E0b)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.3:pg-267" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E0 for overall reaction is -0.041 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = 0.771 #Rx1 : Fe3+ + e- -----> Fe2+\n", + "E02 = -0.447 #Rx2 : Fe2+ + 2e- -----> Fe\n", + "F = 96485 #Faraday constant, C/mol\n", + "n1,n2,n3 = 1.,2.,3.\n", + "\n", + "#Calculations\n", + "dG01 = -n1*F*E01\n", + "dG02 = -n2*F*E02\n", + " #For overall reaction\n", + "dG0 = dG01 + dG02\n", + "E0Fe3byFe = -dG0/(n3*F)\n", + "\n", + "#Results\n", + "print 'E0 for overall reaction is %5.3f V'%(E0Fe3byFe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.4:pg-268" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. entropy change of reaction from dE0bydT is -2.32e+02 and\n", + "Std entropy values is -2.41e+02 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = +1.36 #Std. electrode potential for Cl2/Cl\n", + "dE0bydT = -1.20e-3 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "S0H = 0.0 #Std. entropy J/(K.mol) for H+ ,Cl-,H2, Cl2 \n", + "S0Cl = 56.5\n", + "S0H2 = 130.7\n", + "S0Cl2 = 223.1\n", + "nH, nCl, nH2, nCl2 = 2, 2, -1,-1\n", + "#Calculations\n", + "dS01 = n*F*dE0bydT\n", + "dS02 =nH*S0H + nCl*S0Cl + nH2*S0H2 + nCl2*S0Cl2\n", + "\n", + "#Results\n", + "print 'Std. entropy change of reaction from dE0bydT is %4.2e and\\nStd entropy values is %4.2e V'%(dS01,dS02)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.5:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.55e+37\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "E0 = +1.10 #Std. electrode potential for Danniel cell, V\n", + " #Zn(s) + Cu++ -----> Zn2+ + Cu\n", + "T = 298.15 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "R = 8.314 #Gas constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "K = exp(n*F*E0/(R*T))\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(K)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.6:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.57e-10\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +0.29 #Cell emf, V\n", + "n = 2.\n", + "\n", + "#Calculations\n", + "Ksp = 10**(-n*E/0.05916)\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(Ksp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.8:pg-272" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cell potentials for Zn, Ag, Au are 2.27 V, 0.71 V, and -0.18 V\n", + "Zn has positive cell potential of 2.272 V and Can be oxidized bypermangnate ion\n", + "Ag has positive cell potential of 0.710 V and Can be oxidized bypermangnate ion\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +1.51 #EMF for reduction of permangnet, V\n", + "E01 = -0.7618 #Zn2+ + 2e- --------> Zn (s)\n", + "E02 = +0.7996 #Ag+ + e- --------> Ag (s)\n", + "E03 = +1.6920 #Au+ + e- --------> Au (s) \n", + "\n", + "#Calculations\n", + "EZn = E - E01\n", + "EAg = E - E02\n", + "EAu = E - E03\n", + "animals = {\"parrot\": 2, \"fish\": 6}\n", + "Er = {\"Zn\":EZn,\"Ag\":EAg,\"Au\":EAu}\n", + "#Results\n", + "print 'Cell potentials for Zn, Ag, Au are %4.2f V, %4.2f V, and %4.2f V'%(EZn, EAg,EAu)\n", + "for i in Er:\n", + " if Er[i] >0.0:\n", + " print '%s has positive cell potential of %4.3f V and Can be oxidized bypermangnate ion' %(i,Er[i])\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dUCVVeV.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dUCVVeV.ipynb new file mode 100644 index 00000000..887d09f2 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dUCVVeV.ipynb @@ -0,0 +1,419 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Elementary Chemical Kinetics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.2:pg-461" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Order of reaction with respect to reactant A: 2.00\n", + "Order of reaction with respect to reactant A: 1.00\n", + "Rate constant of the reaction: 3.201e+08 1./(M.s)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "Ca0 = [2.3e-4,4.6e-4,9.2e-4] #Initial Concentration of A, M\n", + "Cb0 = [3.1e-5,6.2e-5,6.2e-5] #Initial Concentration of B, M\n", + "Ri = [5.25e-4,4.2e-3,1.68e-2] #Initial rate of reaction, M\n", + "\n", + "#Calculations\n", + "alp = log(Ri[1]/Ri[2])/log(Ca0[1]/Ca0[2])\n", + "beta = (log(Ri[0]/Ri[1]) - 2*log((Ca0[0]/Ca0[1])))/(log(Cb0[0]/Cb0[1]))\n", + "k = Ri[2]/(Ca0[2]**2*Cb0[2]**beta)\n", + "\n", + "#REsults\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%alp\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%beta\n", + "print 'Rate constant of the reaction: %4.3e 1./(M.s)'%k" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.3:pg-466" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 3.381e-05 1/s\n", + "Timerequire for 60 percent decay of N2O5: 1.511e+04 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 2.05e4 #Half life for first order decomposition of N2O5, s\n", + "x = 60. #percentage decay of N2O5\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.4:pg-467 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 1.203e-04 1/s\n", + "Timerequire for 60 percent decay of N2O5: 4.245e+03 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 5760 #Half life for C14, years\n", + "\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.5:pg-472" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time required for maximum concentration of A: 13.86 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "kAbykI = 2.0 #Ratio of rate constants\n", + "kA = 0.1 #First order rate constant for rxn 1, 1/s \n", + "kI = 0.05 #First order rate constant for rxn 2, 1/s \n", + "#Calculations\n", + "tmax = 1/(kA-kI)*log(kA/kI)\n", + "\n", + "#Results\n", + "print 'Time required for maximum concentration of A: %4.2f s'%tmax" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.7:pg-476" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: 6.67 \n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "T = 22.0 #Temperature of the reaction,°C\n", + "k1 = 7.0e-4 #Rate constants for rxn 1, 1/s\n", + "k2 = 4.1e-3 #Rate constant for rxn 2, 1/s \n", + "k3 = 5.7e-3 #Rate constant for rxn 3, 1/s \n", + "#Calculations\n", + "phiP1 = k1/(k1+k2+k3)\n", + "\n", + "#Results\n", + "print 'Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: %4.2f '%(phiP1*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.8:pg-477" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEWCAYAAADLkvgyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVNW1x/HvhgZnjIIKNCqTKCKCiIAYsCQhIlFQE0fU\naIyKs4JTjEjHNgkaRY04GzEOUaMhMWL02UZb4oAiCLYgogQ1gsPDCXwOiOz3xymkabuaBqrq3Kr6\nfdaqRdWtc+/dfVe5tufcc/cxd0dERCSmJrEDEBERUTISEZHolIxERCQ6JSMREYlOyUhERKJTMhIR\nkegSmYzM7HQze9XMasxsXIY2Q8xsrpnNM7Pz8x2jiIhkT1nsAOoysxRwANDd3ZebWat62jQBJgA/\nABYB08zsQXefm9dgRUQkK5LYMzoZGOfuywHcfXE9bfoAr7v7W+7+NXAvMDyPMYqISBYlMRl1AQaa\n2VQze9LMetfTphz4b63P76S3iYhIAYoyTGdmVcA2tTcBDlyUjmkLd+9nZnsAfwE65j9KERHJlyjJ\nyN0HZ/rOzEYCk9LtppnZCjNr6e4f1mq2ENiu1ud26W2ZjqkCfCIia8ndLV/nSuIw3d+BQQBm1gVo\nVicRAUwDOpvZ9mbWHDgc+EdDB3V3vbLwGjt2bPQYiuml66nrmdRXviUxGU0EOppZDfBn4BgAM2tj\nZpMB3P0b4DTgMWA2cK+7vxopXhERWU+Jm9rtYXbc0fVsfxfYv9bnR4Ed8xiaiIjkSBJ7RpJgqVQq\ndghFRdczu3Q9C5fFGBvMNzPzUvg7RUSyxczwEp/AICIiJUbJSEREolMyEhGR6JSMREQkOiUjERGJ\nTslIRESiUzISEZHolIxERCQ6JSMREYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR\n6JSMREQkOiUjERGJTslIRESiUzISEZHolIxERCQ6JSMREYkukcnIzE43s1fNrMbMxtXzfTsze8LM\nZqfbnBEjThERyY6y2AHUZWYp4AC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OXu/s8M/vE\nVy3wVtt04FF3v9PMDOgP9HX3JZlicff3zWzm+v1FIvEpGYmsJXf/GLjKzA7I0GTlyqHzfNXCgl3c\nfV76/dwM+/UBnjez5sDBwF9r7Y+ZtQW6A07oCX3q7lNRr0iKgJKRSBalVxGdBuDuM9PbOhOqJJPe\nPivD7n2A6wmVkS/21VfIxd0XAYvqnG9roAswCLgrO3+FSP7pnpFIdu3u7tPrbOsDvNCIffcAWgIP\nEpY6WCN3/8DdR7i7EpEUNCUjkeyqb8isD2HtnMw7hYkIi9z9fsLCbsPT941ESoKSkci6Wy1ZpKdz\nv1ZPuz2o1TMys/b1tOlLWB0Td/+UsNDb4CzFKZJ4SkYia8nMNjGzs4CdzOwsM9s4/VUKqK7VroeZ\nnQPsChxsZlulJyE8Xud4/YFTgTZm1jZ9vI2BX5vZDrn/i0Ti00qvIlliZqe5+4RGtNvb3Z/KR0wi\nhUI9I5EsSFdAWNjI5hvkMhaRQqSekUgWpB9wnezun8eORaQQKRmJiEh0GqYTEZHolIxERCQ6JSMR\nEYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR6P4ffTyAN3dtCVsAAAAASUVORK5C\nYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9358710>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are, -6419.8 and 14.45\n", + "Pre-exponential factor and Activation energy are 53.37 kJ/mol and 1.88e+06 1/s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot, show, xlabel, ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "T = array([22.7,27.2,33.7,38.0])\n", + "k1 = array([7.e-4,9.8e-4,1.6e-3,2.e-3])\n", + "R = 8.314 \n", + "\n", + "#Calculations\n", + "T = T +273.15\n", + "x = 1./T\n", + "y = log(k1)\n", + "A = array([ x, ones(size(x))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,y)[0] # obtaining the parameters\n", + "\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*x+intercept # regression line\n", + "#Results\n", + "plot(x,line,'-',x,y,'o')\n", + "xlabel('$ 1/T, K^{-1} $')\n", + "ylabel('$ log(k) $')\n", + "show()\n", + "Ea = -slope*R\n", + "A = exp(intercept)\n", + "print 'Slope and intercept are, %6.1f and %4.2f'%(slope, intercept)\n", + "print 'Pre-exponential factor and Activation energy are %4.2f kJ/mol and %4.2e 1/s'%(Ea/1e3, A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.9:pg-482" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 4.34e+08 1/s\n", + "Backward Rate constant is 4.34e+04 1/s\n", + "Apperent Rate constant is 4.34e+08 1/s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "Ea = 42.e3 #Activation energy for reaction, J/mol\n", + "A = 1.e12 #Pre-exponential factor for reaction, 1/s\n", + "T = 298.0 #Temeprature, K\n", + "Kc = 1.0e4 #Equilibrium constant for reaction\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "#Calculations\n", + "kB = A*exp(-Ea/(R*T))\n", + "kA = kB*Kc\n", + "kApp = kA + kB\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%kA\n", + "print 'Backward Rate constant is %4.2e 1/s'%kB\n", + "print 'Apperent Rate constant is %4.2e 1/s'%kApp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.10:pg-492" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated rate 6.4e+13 1/(M.s) is far grater than experimental value of 4.0e+07 1/(M.s), \n", + "hence the reaction is not diffusion controlled\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Variable Declaration\n", + "Dh = 7.6e-7 #Diffusion coefficient of Hemoglobin, cm2/s\n", + "Do2 = 2.2e-5 #Diffusion coefficient of oxygen, cm2/s\n", + "rh = 35. #Radius of Hemoglobin, °A\n", + "ro2 = 2.0 #Radius of Oxygen, °A\n", + "k = 4e7 #Rate constant for binding of O2 to Hemoglobin, 1/(M.s)\n", + "NA =6.022e23 #Avagadro Number\n", + "#Calculations\n", + "DA = Dh + Do2\n", + "kd = 4*pi*NA*(rh+ro2)*1e-8*DA\n", + "\n", + "#Results\n", + "print 'Estimated rate %4.1e 1/(M.s) is far grater than experimental value of %4.1e 1/(M.s), \\nhence the reaction is not diffusion controlled'%(kd,k)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.11:pg-494" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 9.90e+04 1/s\n", + "Backward Rate constant is -12.72 1/s\n" + ] + } + ], + "source": [ + "from math import log, e\n", + "#Variable Declaration\n", + "Ea = 104e3 #Activation energy for reaction, J/mol\n", + "A = 1.e13 #Pre-exponential factor for reaction, 1/s\n", + "T = 300.0 #Temeprature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "h = 6.626e-34 #Plnak constant, Js\n", + "c = 1.0 #Std. State concentration, M\n", + "k = 1.38e-23 #,J/K\n", + "\n", + "#Calculations\n", + "dH = Ea - 2*R*T\n", + "dS = R*log(A*h*c/(k*T*e**2))\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%dH\n", + "print 'Backward Rate constant is %4.2f 1/s'%dS" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dr124eb.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dr124eb.ipynb new file mode 100644 index 00000000..076c1413 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_dr124eb.ipynb @@ -0,0 +1,700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 06: Chemical Equilibrium" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.1:pg-126" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Available work through combustion of CH4 -813.6 kJ/mol\n", + "Maximum Available work through combustion of C8H18 -5320.9 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dACH4 = dHcCH4*1e3 - dnCH4*R*T - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dAC8H18 = dHcC8H18*1e3 - dnC8H18*R*T - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum Available work through combustion of CH4 %4.1f kJ/mol'%(dACH4/1000)\n", + "print 'Maximum Available work through combustion of C8H18 %4.1f kJ/mol'%(dAC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.2:pg-128" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum nonexapnasion work through combustion of CH4 -818.6 kJ/mol\n", + "Maximum nonexapnasion work through combustion of C8H18 -5309.8 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n", + "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n", + "\n", + "T = 298.15\n", + "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n", + "dnCH4 = -2.\n", + "dnC8H18 = 4.5\n", + "R = 8.314\n", + "#Calculations\n", + "dGCH4 = dHcCH4*1e3 - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n", + "dGC8H18 = dHcC8H18*1e3 - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n", + "#Results \n", + "print 'Maximum nonexapnasion work through combustion of CH4 %4.1f kJ/mol'%(dGCH4/1000)\n", + "print 'Maximum nonexapnasion work through combustion of C8H18 %4.1f kJ/mol'%(dGC8H18/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.4:pg-133" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy of formation for Fe(g) at 400 K is 355.1 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGf298 = 370.7 #Std. free energy of formation for Fe (g), kJ/mol\n", + "dHf298 = 416.3 #Std. Enthalpy of formation for Fe (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 400. #Temperature in K\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "\n", + "dGf = T*(dGf298*1e3/T0 + dHf298*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. free energy of formation for Fe(g) at 400 K is %4.1f kJ/mol'%(dGf/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.5:pg-137" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. free energy Change on mixing is -2.8e+04 J\n", + "Std. entropy Change on mixing is -93.3 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "nHe = 1.0 #Number of moles of He\n", + "nNe = 3.0 #Number of moles of Ne\n", + "nAr = 2.0 #Number of moles of Ar\n", + "nXe = 2.5 #Number of moles of Xe\n", + "T = 298.15 #Temperature in K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314\n", + "\n", + "#Calculations\n", + "n = nHe + nNe + nAr + nXe\n", + "dGmix = n*R*T*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "dSmix = n*R*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n", + "\n", + "#Results \n", + "print 'Std. free energy Change on mixing is %3.1e J'%(dGmix)\n", + "print 'Std. entropy Change on mixing is %4.1f J'%(dSmix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.6:pg-138" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 67.00 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGfFe = 0.0 #Std. Gibbs energy of formation for Fe (S), kJ/mol\n", + "dGfH2O = -237.1 #Std. Gibbs energy of formation for Water (g), kJ/mol\n", + "dGfFe2O3 = -1015.4 #Std. Gibbs energy of formation for Fe2O3 (s), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dGR = nFe*dGfFe + nH2O*dGfH2O + nFe2O3*dGfFe2O3 + nH2*dGfH2 \n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.2f kJ/mol'%(dGR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.7:pg-139" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Enthalpy change for reactionat 525.0 is -24.80 kJ/mol\n", + "Std. Gibbs energy change for reactionat 525.0 is 137 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "dGR = 67.0 #Std. Gibbs energy of formation for reaction, kJ, from previous problem\n", + "dHfFe = 0.0 #Enthalpy of formation for Fe (S), kJ/mol\n", + "dHfH2O = -285.8 #Enthalpy of formation for Water (g), kJ/mol\n", + "dHfFe2O3 = -1118.4 #Enthalpy of formation for Fe2O3 (s), kJ/mol\n", + "dHfH2 = 0.0 #Enthalpy of formation for Hydrogen (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "T = 525. #Temperature in K\n", + "R = 8.314\n", + "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n", + "\n", + "#Calculations\n", + "dHR = nFe*dHfFe + nH2O*dHfH2O + nFe2O3*dHfFe2O3 + nH2*dHfH2 \n", + "dGR2 = T*(dGR*1e3/T0 + dHR*1e3*(1./T - 1./T0))\n", + "\n", + "#Results \n", + "print 'Std. Enthalpy change for reactionat %4.1f is %4.2f kJ/mol'%(T, dHR)\n", + "print 'Std. Gibbs energy change for reactionat %4.1f is %4.0f kJ/mol'%(T, dGR2/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.8:pg-140" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 1.337 kJ/mol\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "dGfNO2 = 51.3 #Std. Gibbs energy of formation for NO2 (g), kJ/mol\n", + "dGfN2O4 = 99.8 #Std. Gibbs energy of formation for N2O4 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "pNO2 = 0.350 #Partial pressure of NO2, bar\n", + "pN2O4 = 0.650 #Partial pressure of N2O4, bar\n", + "R = 8.314\n", + "nNO2, nN2O4 = -2, 1 #Stoichiomentric coeff of NO2 and N2O4 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nN2O4*dGfN2O4*1e3 + nNO2*dGfNO2*1e3 + R*T0*log(pN2O4/(pNO2)**2)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.9:pg-141" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is -0.020 kJ/mol\n", + "Equilibrium constant for reaction is 3323.254 \n", + "Kp >> 1. hence, mixture will consists of product CO2 and H2\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfH2 = 0.0 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dGfCO = 237.1 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dGfH2O = 137.2 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCO2, nH2, nCO, nH2O = 1,1,1,1 #Stoichiomentric coeff of CO2,H2,CO,H2O respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCO2*dGfCO2 + nH2*dGfH2 + nCO*dGfCO + nH2O*dGfH2O\n", + "Kp = exp(-dGR*1e3/(R*T0))\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)\n", + "print 'Equilibrium constant for reaction is %5.3f '%(Kp)\n", + "if Kp > 1: print 'Kp >> 1. hence, mixture will consists of product CO2 and H2'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.11:pg-144" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part A\n", + "Std. Gibbs energy change for reaction is 211.400 kJ/mol\n", + "Std. Enthalpy change for reaction is 242.600 kJ/mol\n", + "Equilibrium constants at 800, 1500, and 2000 K are 4.223e-11, 1.042e-03, and 1.349e-01\n", + "Part B\n", + "Degree of dissociation at 800, 1500, and 2000 K are 3.249e-05, 1.593e-01, and 8.782e-01\n" + ] + } + ], + "source": [ + "from math import exp, sqrt\n", + "\n", + "dGfCl2 = 0.0 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n", + "dGfCl = 105.7 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n", + "dHfCl2 = 0.0 #Std. Gibbs energy of formation for CO (g), kJ/mol\n", + "dHfCl = 121.3 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCl2, nCl= -1,2 #Stoichiomentric coeff of Cl2,Cl respectively in reaction\n", + "PbyP0 = 0.01\n", + "#Calculations\n", + "dGR = nCl*dGfCl + nCl2*dGfCl2 \n", + "dHR = nCl*dHfCl + nCl2*dHfCl2 \n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "Kp8 = func(800)\n", + "Kp15 = func(1500)\n", + "Kp20 = func(2000)\n", + "DDiss = lambda K: sqrt(K/(K+4*PbyP0))\n", + "alp8 = DDiss(Kp8)\n", + "alp15 = DDiss(Kp15)\n", + "alp20 = DDiss(Kp20)\n", + "\n", + "#Results \n", + "print 'Part A'\n", + "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %5.3f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(Kp8,Kp15,Kp20)\n", + "\n", + "print 'Part B'\n", + "print 'Degree of dissociation at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(alp8,alp15,alp20)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.12:pg-145" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. Gibbs energy change for reaction is 131.1 kJ/mol\n", + "Std. Enthalpy change for reaction is 178.5 kJ/mol\n", + "Equilibrium constants at 1000, 1100, and 1200 K are 0.0956, 0.673e, and 3.423\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCaCO3 = -1128.8 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCaO = -603.3 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "dGfCO2 = -394.4 #Std. Gibbs energy of formation for O2 (g), kJ/mol\n", + "dHfCaCO3 = -1206.9 #Std. Enthalpy Change of formation for CaCO3 (s), kJ/mol\n", + "dHfCaO = -634.9 #Std. Enthalpy Change of formation for CaO (s), kJ/mol\n", + "dHfCO2 = -393.5 #Std. Enthalpy Change of formation for O2 (g), kJ/mol\n", + "T0 = 298.15 #Temperature in K\n", + "R = 8.314\n", + "nCaCO3, nCaO, nO2 = -1,1,1 #Stoichiomentric coeff of CaCO3, CaO, O2 respectively in reaction\n", + "\n", + "#Calculations\n", + "dGR = nCaO*dGfCaO + nO2*dGfCO2 + nCaCO3*dGfCaCO3\n", + "dHR = nCaO*dHfCaO + nO2*dHfCO2 + nCaCO3*dHfCaCO3\n", + "\n", + "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n", + "\n", + "Kp10 = func(1000)\n", + "Kp11 = func(1100)\n", + "Kp12 = func(1200)\n", + "\n", + "#Results \n", + "print 'Std. Gibbs energy change for reaction is %4.1f kJ/mol'%(dGR)\n", + "print 'Std. Enthalpy change for reaction is %4.1f kJ/mol'%(dHR)\n", + "print 'Equilibrium constants at 1000, 1100, and 1200 K are %4.4f, %4.3fe, and %4.3f'%(Kp10,Kp11,Kp12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.13:pg-146" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure at which graphite and dimond will be in equilibrium is 1.51e+04 bar\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "dGfCG = 0.0 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n", + "dGfCD = 2.90 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n", + "rhoG = 2.25e3 #Density of Graphite, kg/m3\n", + "rhoD = 3.52e3 #Density of dimond, kg/m3\n", + "T0 = 298.15 #Std. Temperature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K) \n", + "P0 = 1.0 #Pressure, bar\n", + "M = 12.01 #Molceular wt of Carbon\n", + "#Calculations\n", + "P = P0*1e5 + dGfCD*1e3/((1./rhoG-1./rhoD)*M*1e-3)\n", + "\n", + "#Results \n", + "print 'Pressure at which graphite and dimond will be in equilibrium is %4.2e bar'%(P/1e5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.14:pg-154" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUbydV = 1.42e+03 bar\n", + "dVbyV = 6.519 percent\n", + "dUbydVm = 9e+02 atm\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "\n", + "beta = 2.04e-4 #Thermal exapansion coefficient, /K\n", + "kapa = 45.9e-6 #Isothermal compressibility, /bar\n", + "T = 298.15 #Std. Temperature, K\n", + "R = 8.206e-2 #Ideal gas constant, atm.L/(mol.K) \n", + "T1 = 320.0 #Temperature, K\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "V = 1.00 #Volume, m3\n", + "a = 1.35 #van der Waals constant a for nitrogen, atm.L2/mol2\n", + "\n", + "#Calculations\n", + "dUbydV = Pf = (beta*T1-kapa*P0)/kapa\n", + "dVT = V*kapa*(Pf-Pi)\n", + "dVbyV = dVT*100/V\n", + "Vm = Pi/(R*T1)\n", + "dUbydVm = a/(Vm**2)\n", + "\n", + "#Results \n", + "print 'dUbydV = %4.2e bar'%(dUbydV)\n", + "print 'dVbyV = %4.3f percent'%(dVbyV)\n", + "print 'dUbydVm = %4.0e atm'%(dUbydVm)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.15:pg-155" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Internal energy change is 4.06e+04 J/mol in which \n", + "contribution of temeprature dependent term 99.9999 percent\n", + "Enthalpy change is 4.185e+04 J/mol in which \n", + "contribution of temeprature dependent term 100.0 percent\n" + ] + } + ], + "source": [ + "from math import exp, log\n", + "\n", + "m = 1000.0 #mass of mercury, g\n", + "Pi, Ti = 1.00, 300.0 #Intial pressure and temperature, bar, K\n", + "Pf, Tf = 300., 600.0 #Final pressure and temperature, bar, K\n", + "rho = 13534. #Density of mercury, kg/m3\n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "Cpm = 27.98 #Molar Specific heat at constant pressure, J/(mol.K) \n", + "M = 200.59 #Molecular wt of Hg, g/mol\n", + "\n", + "#Calculations\n", + "Vi = m*1e-3/rho\n", + "Vf = Vi*exp(-kapa*(Pf-Pi))\n", + "Ut = m*Cpm*(Tf-Ti)/M \n", + "Up = (beta*Ti/kapa-Pi)*1e5*(Vf-Vi) + (Vi-Vf+Vf*log(Vf/Vi))*1e5/kapa\n", + "dU = Ut + Up\n", + "Ht = m*Cpm*(Tf-Ti)/M\n", + "Hp = ((1 + beta*(Tf-Ti))*Vi*exp(-kapa*Pi)/kapa)*(exp(-kapa*Pi)-exp(-kapa*Pf))\n", + "dH = Ht + Hp\n", + "#Results\n", + "print 'Internal energy change is %6.2e J/mol in which \\ncontribution of temeprature dependent term %6.4f percent'%(dU,Ut*100/dH)\n", + "print 'Enthalpy change is %4.3e J/mol in which \\ncontribution of temeprature dependent term %4.1f percent'%(dH,Ht*100/dH)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.16:pg-156" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in molar specific heats \n", + "at constant volume and constant pressure 3.73e-03 J/(mol.K)\n", + "Molar Specific heat of Hg at const. volume is 27.98 J/(mol.K)\n" + ] + } + ], + "source": [ + "import math\n", + "T = 300.0 #Temperature of Hg, K \n", + "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n", + "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n", + "M = 0.20059 #Molecular wt of Hg, kg/mol \n", + "rho = 13534 #Density of mercury, kg/m3\n", + "Cpm = 27.98 #Experimental Molar specif heat at const pressure for mercury, J/(mol.K)\n", + "\n", + "#Calculations\n", + "Vm = M/rho\n", + "DCpmCv = T*Vm*beta**2/kapa\n", + "Cvm = Cpm - DCpmCv\n", + "#Results\n", + "print 'Difference in molar specific heats \\nat constant volume and constant pressure %4.2e J/(mol.K)'%DCpmCv\n", + "print 'Molar Specific heat of Hg at const. volume is %4.2f J/(mol.K)'%Cvm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex6.17:pg-158" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar Gibbs energy of Ar -46.154 kJ/mol\n", + "Molar Gibbs energy of Water -306.658 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "T = 298.15 #Std. Temperature, K \n", + "P = 1.0 #Initial Pressure, bar\n", + "Hm0, Sm0 = 0.0,154.8 #Std. molar enthalpy and entropy of Ar(g), kJ, mol, K units\n", + "Sm0H2, Sm0O2 = 130.7,205.2 #Std. molar entropy of O2 and H2 (g), kJ/(mol.K)\n", + "dGfH2O = -237.1 #Gibbs energy of formation for H2O(l), kJ/mol \n", + "nH2, nO2 = 1, 1./2 #Stoichiomentric coefficients for H2 and O2 in water formation reaction \n", + "\n", + "#Calculations\n", + "Gm0 = Hm0 - T*Sm0\n", + "dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)\n", + "#Results\n", + "print 'Molar Gibbs energy of Ar %4.3f kJ/mol'%(Gm0/1e3)\n", + "print 'Molar Gibbs energy of Water %4.3f kJ/mol'%(dGmH2O/1e3)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_fGocR0T.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_fGocR0T.ipynb new file mode 100644 index 00000000..cfc07351 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_fGocR0T.ipynb @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Kinetic Theory of Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.1:pg-407" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Most probable speed of Ne and Krypton at 298 K are 498, 244 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "MNe = 0.020 #Molecular wt of Ne, kg/mol\n", + "MKr = 0.083 #Molecular wt of Kr, kg/mol\n", + "\n", + "#Calculations\n", + "vmpNe = sqrt(2*R*T/MNe)\n", + "vmpKr = sqrt(2*R*T/MKr)\n", + "\n", + "#Results\n", + "print 'Most probable speed of Ne and Krypton at 298 K are %4.0f, %4.0f m/s'%(vmpNe,vmpKr)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.2:pg-411" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum, average, root mean square speed of Ar\n", + "at 298 K are 352, 397, 431 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "\n", + "\n", + "#Calculations\n", + "vmp = sqrt(2*R*T/M)\n", + "vave = sqrt(8*R*T/(M*pi))\n", + "vrms = sqrt(3*R*T/M)\n", + "\n", + "#Results\n", + "print 'Maximum, average, root mean square speed of Ar\\nat 298 K are %4.0f, %4.0f, %4.0f m/s'%(vmp,vave,vrms)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.4, Page Numbe 413" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Collisions 2.45e+27 per s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "\n", + "#Calculations\n", + "Zc = P*NA/sqrt(2*pi*R*T*M)\n", + "Nc = Zc*V \n", + "#Results\n", + "print 'Number of Collisions %4.2e per s'%(Nc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.5:pg-414" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure after 1 hr of effusion is 9.996e-03 Pa\n" + ] + } + ], + "source": [ + "from math import sqrt, pi,exp\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P0 = 1013.25 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "t = 3600 #time of effusion, s\n", + "A = 0.01 #Area, um2\n", + "\n", + "#Calculations\n", + "A = A*1e-12\n", + "V = V*1e-3\n", + "expo = (A*t/V)*(k*T/(2*pi*M/NA))\n", + "P = P0*exp(-expo)\n", + "#Results\n", + "print 'Pressure after 1 hr of effusion is %4.3e Pa'%(P/101325)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.6:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Single particle collisional frequency is 6.9e+09 per s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "sigm = 5.2e-19 #m2\n", + "\n", + "#Calculations\n", + "zCO2 = (P*NA/(R*T))*sigm*sqrt(2)*sqrt(8*R*T/(pi*M)) \n", + "#Results\n", + "print 'Single particle collisional frequency is %4.1e per s'%(zCO2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.7:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional frequency is 3.14e+34 m-3s-1\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "MAr = 0.04 #Molecular wt of Ar, kg/mol\n", + "MKr = 0.084 #Molecular wt of Kr, kg/mol\n", + "pAr = 360 #Partial Pressure Ar, torr\n", + "pKr = 400 #Partial Pressure Kr, torr\n", + "rAr = 0.17e-9 #Hard sphere radius of Ar, m\n", + "rKr = 0.20e-9 #Hard sphere radius of Kr, m\n", + "NA = 6.022e23 #Number of particles per mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "\n", + "#Calculations\n", + "pAr = pAr*101325/760\n", + "pKr = pKr*101325/760\n", + "p1 = pAr*NA/(R*T)\n", + "p2 = pKr*NA/(R*T)\n", + "sigm = pi*(rAr+rKr)**2\n", + "mu = MAr*MKr/((MAr+MKr)*NA)\n", + "p3 = sqrt(8*k*T/(pi*mu)) \n", + "zArKr = p1*p2*sigm*p3\n", + "\n", + "#Results\n", + "print 'Collisional frequency is %4.2e m-3s-1'%(zArKr)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_gZhr0WW.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_gZhr0WW.ipynb new file mode 100644 index 00000000..29d2cd41 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_gZhr0WW.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Enthalpy and the Second and Third Laws of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.1:pg-90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of heat engine is 0.600\n", + "Work done by heat engine is 600.0 J\n" + ] + } + ], + "source": [ + "import math\n", + "Th, Tc = 500.,200. #Temeperatures IN Which reversible heat engine works, K\n", + "q = 1000. #Heat absorbed by heat engine, J\n", + "\n", + "#Calcualtions\n", + "eps = 1.-Tc/Th\n", + "w = eps*q\n", + "\n", + "#Results\n", + "print 'Efficiency of heat engine is %4.3f'%eps\n", + "print 'Work done by heat engine is %4.1f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.4:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 24.43 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "Ti, Tf = 320.,650. #Initial and final state Temeperatures of CO2, K\n", + "vi, vf = 80.,120. #Initial and final state volume of CO2, K\n", + "A, B, C, D = 31.08,-0.01452,3.1415e-5,-1.4973e-8\n", + " #Constants in constant volume Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(vf/vi)\n", + "dS = dS1 + dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.5:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 48.55 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 2.5 #Number of moles of CO2\n", + "Ti, Tf = 450.,800. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "A, B, C, D = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(pf/pi)\n", + "dS = dS1 - dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.6:pg-95" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 58.2 J/(mol.K)\n", + "Ratio of pressure to temperature dependent term 2.8e-05\n", + "hence effect of pressure dependent term isvery less\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 3.0 #Number of moles of CO2\n", + "Ti, Tf = 300.,600. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.00,3.00 #Initial and final state pressure of CO2, K\n", + "cpm = 27.98 #Specific heat of mercury, J/(mol.K)\n", + "M = 200.59 #Molecualr wt of mercury, g/(mol)\n", + "beta = 1.81e-4 #per K\n", + "rho = 13.54 #Density of mercury, g/cm3\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "dS1 = n*cpm*log(Tf/Ti)\n", + "dS2 = n*(M/(rho*1e6))*beta*(pf-pi)*1e5\n", + "dS = dS1 - dS2\n", + "\n", + "#Results\n", + "print 'Entropy change of process is %4.1f J/(mol.K)'%dS\n", + "print 'Ratio of pressure to temperature dependent term %3.1e\\nhence effect of pressure dependent term isvery less'%(dS2/dS1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.7:pg-99" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of surrounding is 7.6 J/(mol.K)\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Total Entropy changeis 0.0 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -qrev\n", + "dSsys = qrev/T\n", + "dSsur = -dSsys\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Entropy change of surrounding is %4.1f J/(mol.K)'%dSsur\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Total Entropy changeis %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.8:pg-100" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Constant external pressure and initial pressure are 2.494e+05 J,and 9.977e+04 J respectively\n", + "Heat in reverssible and irreversible processes are -2285.4 J,and -3741.3 J respectively\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Entropy change of surrounding is 12.47 J/(mol.K)\n", + "Total Entropy changeis 4.85 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "pext = n*R*T/(vf/1e3)\n", + "pi = n*R*T/(vi/1e3)\n", + "q = pext*(vf-vi)/1e3\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -q\n", + "dSsur = -q/T\n", + "dSsys = qrev/T\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Constant external pressure and initial pressure are %4.3e J,and %4.3e J respectively'%(pext,pi)\n", + "print 'Heat in reverssible and irreversible processes are %4.1f J,and %4.1f J respectively'%(qrev,q)\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Entropy change of surrounding is %4.2f J/(mol.K)'%dSsur\n", + "print 'Total Entropy changeis %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.9:pg-103" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change Sm0 for O2 is 204.8 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "D1 = 2.11e-3 #Constants in constant pressure Heat capacity equation for K<T<12.97K, in J, mol, K units\n", + "A2, B2, C2, D2 = -5.666,0.6927,-5.191e-3,9.943e-4\n", + " #Constants in constant pressure Heat capacity equation for 12.97<T<23.66, J, mol, K units\n", + "A3, B3, C3, D3 = 31.70,-2.038,0.08384,-6.685e-4\n", + " #Constants in constant pressure Heat capacity equation for 23.66<T<43.76, J, mol, K units\n", + "A4 = 46.094 #Constants in constant pressure Heat capacity equation for 43.76<T<54.39, J/(mol.K)\n", + "A5, B5, C5, D5 = 81.268,-1.1467,0.01516,-6.407e-5\n", + " #Constants in constant pressure Heat capacity equation for 54.39<T<90.20K, J, mol, K units\n", + "A6, B6, C6, D6 = 32.71,-0.04093,1.545e-4,-1.819e-7\n", + " #Constants in constant pressure Heat capacity equation for 90.20<T<298.15 KJ, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "Ltrans1 = 93.80 #Entalpy of transition at 23.66K, J/mol\n", + "Ltrans2 = 743.0 #Entalpy of transition at 43.76K, J/mol\n", + "Ltrans3 = 445.0 #Entalpy of transition at 54.39K, J/mol\n", + "Ltrans4 = 6815. #Entalpy of transition at 90.20K, J/mol\n", + "T1 = 12.97 #Maximum applicabliltiy temeprature for first heat capacity equation, K\n", + "T12 = 23.66 #Phase Change temperature from Solid III--II, K\n", + "T23 = 43.76 #Phase Change temperature from Solid II--I, K\n", + "T34 = 54.39 #Phase Change temperature from Solid I--liquid, K\n", + "T45 = 90.20 #Phase Change temperature from liquid--gas, K\n", + "Ts = 298.15 #Std. Temeprature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (D1*T**3)/T, (T,0,T1)) \n", + "dS2 = n*integrate( (A2 + B2*T + C2*T**2 + D2*T**3)/T, (T,T1,T12)) \n", + "dS21 = Ltrans1/T12\n", + "dS3 = n*integrate( (A3 + B3*T + C3*T**2 + D3*T**3)/T, (T,T12,T23)) \n", + "dS31 = Ltrans2/T23\n", + "dS4 = n*integrate( (A4)/T, (T,T23,T34)) \n", + "dS41 = Ltrans3/T34\n", + "dS5 = n*integrate( (A5 + B5*T + C5*T**2 + D5*T**3)/T, (T,T34,T45)) \n", + "dS51 = Ltrans4/T45\n", + "dS6 = n*integrate( (A6 + B6*T + C6*T**2 + D6*T**3)/T, (T,T45,Ts))\n", + "#print dS1+dS2,dS21\n", + "#print dS3, dS31\n", + "#print dS4, dS41\n", + "#print dS5, dS51\n", + "#print dS6\n", + "dS = dS1+dS2+dS21+dS3+dS31+dS4+dS41+dS5+dS51+dS6\n", + "\n", + "#Results\n", + "print 'Entropy change Sm0 for O2 is %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.10:pg-105" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change for reaction at 475 K is -88.26 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "n = 1.0 #Number of moles of CO2 formed, mol\n", + "p = 1. #Pressure of CO2, K\n", + "\n", + "A1, B1, C1, D1 = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation for CO2, J/(mol.K)\n", + "A2, B2, C2, D2 = 30.81,-1.187e-2,2.3968e-5, 0.0\n", + " #Constants in constant pressure Heat capacity equation for O2, J/(mol.K)\n", + "A3, B3, C3, D3 = 31.08,-1.452e-2,3.1415e-5 ,-1.4793e-8 \n", + " #Constants in constant pressure Heat capacity equation for CO, J/(mol.K)\n", + "DSr298CO = 197.67 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298CO2 = 213.74 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298O2 = 205.138 #Std. Entropy change for CO, J/(mol.K)\n", + "Tr = 475. #Reaction temperature, K\n", + "Ts = 298.15 #Std. temperature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "v1,v2,v3 = 1.,1./2,1.\n", + "DSr = DSr298CO2*v1 - DSr298CO*v1 - DSr298O2*v2\n", + "DA = v1*A1-v2*A2-v3*A3\n", + "DB = v1*B1-v2*B2-v3*B3\n", + "DC = v1*C1-v2*C2-v3*C3\n", + "DD = v1*D1-v2*D2-v3*D3\n", + "dS = DSr + n*integrate( (DA + DB*T + DC*T**2 + DD*T**3)/T, (T,Ts,Tr)) \n", + "\n", + "#Results\n", + "print 'Entropy change for reaction at %4d K is %4.2f J/(mol.K)'%(Tr,dS)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_hEpVYUR.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_hEpVYUR.ipynb new file mode 100644 index 00000000..7d42ed97 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_hEpVYUR.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 04: Thermochemistry" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.1:pg-72" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Avergae Enthalpy change required for breaking both OH bonds 927.0 kJ/mol\n", + "Average bond energy required for breaking both OH bonds 461.0 kJ/mol\n" + ] + } + ], + "source": [ + "import math\n", + "DH0_H2O = 241.8 #Std Enthalpy of reaxtion of Water Fomation backward rxn, kJ/mol\n", + "DH0_2H = 2*218.0 #Std Enthalpy of formation of Hydrogen atom, kJ/mol\n", + "DH0_O = 249.2 #Std Enthalpy of formation of Oxygen atom, kJ/mol\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "Dn = 2.0\n", + "T = 298.15 #Std. Temperature, K\n", + "#Calculation\n", + "DH0_2HO = DH0_H2O + DH0_2H + DH0_O\n", + "DU0 = (DH0_2HO - Dn*R*T*1e-3)/2\n", + "\n", + "#Results\n", + "print 'Avergae Enthalpy change required for breaking both OH bonds %4.1f kJ/mol'%DH0_2HO\n", + "print 'Average bond energy required for breaking both OH bonds %4.1f kJ/mol'%DU0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.2:pg-74" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat of reaction for HCl formation is -95.1 kJ/mol\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from sympy import symbols, integrate\n", + "\n", + "#Variable Declaration\n", + "a = ([29.064, 31.695, 28.165]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "b = ([-0.8363e-3, 10.143e-3, 1.809e-3]) #Constant 'b' in Heat capacity equation, J/(mol.K)\n", + "c = ([20.111e-7, -40.373e-7, 15.464e-7]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n", + "delHf0HCl = -92.3 #Std. Heat of formation of HCl, kJ/mol\n", + "T1, T2 = 298.15, 1450 #Std and final temperature, K\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "DA = a[2]-(a[0]+a[1])/2\n", + "DB = b[2]-(b[0]+b[1])/2\n", + "DC = c[2]-(c[0]+c[1])/2\n", + "\n", + "expr = integrate( DA + DB*T + DC*T**2, (T,T1,T2))\n", + "DHR1450= expr/1000 + delHf0HCl\n", + "\n", + "#Results\n", + "print 'Heat of reaction for HCl formation is %4.1f kJ/mol'%DHR1450" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.3:pg-75" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calorimeter constant 7.59e+03 J/°C\n", + "Enthalpy of rection for benzene -3.26e+06 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms1 = 0.972 #Mass of cyclohexane, g\n", + "DT1 = 2.98 #Change in temperature for bath, °C\n", + "DUR1 = -3913e3 #Std Internal energy change, J/mol\n", + "mw = 1.812e3 #Mass of water, g\n", + "ms2 = 0.857 #Mass of benzene, g\n", + "Ms1 = 84.16\n", + "Ms2 = 78.12\n", + "DT2 = 2.36 #Change in temperature for bath, °C\n", + "Mw = 18.02\n", + "Cpw = 75.3 \n", + "\n", + "#Calculation\n", + "\n", + "Ccal = ((-ms1/Ms1)*DUR1-(mw/Mw)*Cpw*DT1)/DT1\n", + "DUR2 = (-Ms2/ms2)*((mw/Mw)*Cpw*DT2+Ccal*DT2)\n", + "\n", + "#Results\n", + "print 'Calorimeter constant %4.2e J/°C'%Ccal\n", + "print 'Enthalpy of rection for benzene %4.2e J/mol'%DUR2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex4.4:pg-77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy of solution for Na2SO4 -2.81e+03 J/mol\n", + "Enthalpy of solution for Na2SO4 from Data -2.40e+00 J/mol\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "ms = 1.423 #Mass of Na2SO4, g\n", + "mw = 100.34 #Mass of Na2SO4, g\n", + "DT = 0.037 #Change in temperature for solution, K\n", + "Mw = 18.02 #Molecular wt of Water\n", + "Ms = 142.04 #Molecular wt of ms Na2SO4\n", + "Ccal = 342.5 #Calorimeter constant, J/K\n", + "#Data\n", + "DHfNa = -240.1\n", + "DHfSO4 = -909.3\n", + "DHfNa2SO4 = -1387.1\n", + "\n", + "#Calculation\n", + "DHs = (-Ms/ms)*((mw/Mw)*Cpw*DT+Ccal*DT)\n", + "DHsolD = 2*DHfNa + DHfSO4 - DHfNa2SO4\n", + "\n", + "#Results\n", + "print 'Enthalpy of solution for Na2SO4 %4.2e J/mol'%DHs\n", + "print 'Enthalpy of solution for Na2SO4 from Data %4.2e J/mol'%DHsolD" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_id1VlbC.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_id1VlbC.ipynb new file mode 100644 index 00000000..382b0ea4 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_id1VlbC.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ensemble and Molecular Partition Function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.1:pg-344" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference in energy levels is 3.10e-38 J or 1.56e-15 1/cm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "l = 0.01 #Box length, m \n", + "n1,n2 = 2,1 #Energy levels states\n", + "m = 5.31e-26 #mass of oxygen molecule, kg\n", + "\n", + "#Calculations \n", + "dE = (n1+n2)*h**2/(8*m*l**2)\n", + "dEcm = dE/(h*c*1e2)\n", + "#Results\n", + "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.2:pg-345" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal wave length is 1.60e-11 m and\n", + "Translational partition function is 2.44e+29\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "v = 1.0 #Volume, L\n", + "T = 298.0 #Temeprature of Ar, K\n", + "m = 6.63e-26 #Mass of Argon molecule, kg \n", + "\n", + "#Calculations \n", + "GAMA = h/sqrt(2*pi*m*k*T)\n", + "v = v*1e-3\n", + "qT3D = v/GAMA**3\n", + "\n", + "#Results\n", + "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.4:pg-350" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Spectrum will be observed at 494 K\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "J = 4 #Rotational energy level\n", + "B = 8.46 #Spectrum, 1/cm\n", + "\n", + "#Calculations \n", + "T = (2*J+1)**2*h*c*100*B/(2*k)\n", + "#Results\n", + "print 'Spectrum will be observed at %4.0f K'%(T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.5:pg-352" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 1000 is 5.729\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "B = 60.589 #Spectrum for H2, 1/cm\n", + "T = 1000 #Temperture of Hydrogen, K\n", + "#Calculations \n", + "qR = k*T/(2*h*c*100*B)\n", + "qRs = 0.0\n", + "#for J in range(101):\n", + "# print J\n", + "# if (J%2 == 0):\n", + "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n", + "# else:\n", + "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n", + "#print qRs/4\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.6:pg-353" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function of H2 at 100 K is 928.121\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "B = 0.0374 #Spectrum for H2, 1/cm\n", + "T = 100.0 #Temperture of Hydrogen, K\n", + "sigma = 2.\n", + "\n", + "#Calculations\n", + "ThetaR = h*c*100*B/k\n", + "qR = T/(sigma*ThetaR)\n", + "\n", + "#Results\n", + "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.7:pg-354" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "Ba = 1.48 #Spectrum for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n", + "T = 298.0 #Temperture of Hydrogen, K\n", + "sigmab = 1\n", + "sigmac = 2\n", + "\n", + "#Calculations\n", + "qRa = k*T/(h*c*100*Ba)\n", + "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n", + "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n", + "\n", + "#Results\n", + "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.8:pg-356" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n" + ] + } + ], + "source": [ + "from math import pi, exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "Ba = 1.48 #Frequency for OCS, 1/cm\n", + "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n", + "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n", + "T298 = 298.0 #Temperture of Hydrogen, K\n", + "T1000 = 1000 #Temperture of Hydrogen, K\n", + "nubar = 208\n", + "\n", + "#Calculations\n", + "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n", + "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.9:pg-357" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 450 1/cm the q = 1.128\n", + "At 945 1/cm the q = 1.010\n", + "At 1100 1/cm the q = 1.005\n", + "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "\n", + "T = 298 #Temeprature, K\n", + "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.10:pg-359" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vibrational partition function for F2 at 298.0 K is 10.508\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298 #Temeprature, K\n", + "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n", + "\n", + "#Calculations\n", + "ThetaV = h*c*100*nubar/k\n", + "Th = 10*ThetaV\n", + "qv = 1/(1.-exp(-ThetaV/Th))\n", + "\n", + "#Results\n", + "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.11:pg-360" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 1388 1/cm the q = 1.157\n", + "At 667 1/cm the q = 1.619\n", + "At 667 1/cm the q = 1.619\n", + "At 2349 1/cm the q = 1.035\n", + "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 1000 #Temeprature, K\n", + "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n", + "\n", + "#Calculations\n", + "Qv = 1.\n", + "for i in nubar:\n", + " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", + " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", + " Qv = Qv*qv\n", + "#Results\n", + "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex14.12:pg-363" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electronic partition function for F2 at 298.0 K is 9.45\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declarations\n", + "h = 6.626e-34 #Planks constant, J.s\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "c = 3.0e8 #speed of light, m/s\n", + "T = 298. #Temeprature, K\n", + "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n", + "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n", + "g0 = [4,6,8,10,2,4,6,8,10]\n", + "\n", + "#Calculations\n", + "qE = 0.0\n", + "for i in range(9):\n", + " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n", + " qE = qE + a\n", + "\n", + "#Results\n", + "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_imWpKyi.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_imWpKyi.ipynb new file mode 100644 index 00000000..887d09f2 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_imWpKyi.ipynb @@ -0,0 +1,419 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Elementary Chemical Kinetics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.2:pg-461" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Order of reaction with respect to reactant A: 2.00\n", + "Order of reaction with respect to reactant A: 1.00\n", + "Rate constant of the reaction: 3.201e+08 1./(M.s)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "Ca0 = [2.3e-4,4.6e-4,9.2e-4] #Initial Concentration of A, M\n", + "Cb0 = [3.1e-5,6.2e-5,6.2e-5] #Initial Concentration of B, M\n", + "Ri = [5.25e-4,4.2e-3,1.68e-2] #Initial rate of reaction, M\n", + "\n", + "#Calculations\n", + "alp = log(Ri[1]/Ri[2])/log(Ca0[1]/Ca0[2])\n", + "beta = (log(Ri[0]/Ri[1]) - 2*log((Ca0[0]/Ca0[1])))/(log(Cb0[0]/Cb0[1]))\n", + "k = Ri[2]/(Ca0[2]**2*Cb0[2]**beta)\n", + "\n", + "#REsults\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%alp\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%beta\n", + "print 'Rate constant of the reaction: %4.3e 1./(M.s)'%k" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.3:pg-466" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 3.381e-05 1/s\n", + "Timerequire for 60 percent decay of N2O5: 1.511e+04 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 2.05e4 #Half life for first order decomposition of N2O5, s\n", + "x = 60. #percentage decay of N2O5\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.4:pg-467 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 1.203e-04 1/s\n", + "Timerequire for 60 percent decay of N2O5: 4.245e+03 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 5760 #Half life for C14, years\n", + "\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.5:pg-472" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time required for maximum concentration of A: 13.86 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "kAbykI = 2.0 #Ratio of rate constants\n", + "kA = 0.1 #First order rate constant for rxn 1, 1/s \n", + "kI = 0.05 #First order rate constant for rxn 2, 1/s \n", + "#Calculations\n", + "tmax = 1/(kA-kI)*log(kA/kI)\n", + "\n", + "#Results\n", + "print 'Time required for maximum concentration of A: %4.2f s'%tmax" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.7:pg-476" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: 6.67 \n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "T = 22.0 #Temperature of the reaction,°C\n", + "k1 = 7.0e-4 #Rate constants for rxn 1, 1/s\n", + "k2 = 4.1e-3 #Rate constant for rxn 2, 1/s \n", + "k3 = 5.7e-3 #Rate constant for rxn 3, 1/s \n", + "#Calculations\n", + "phiP1 = k1/(k1+k2+k3)\n", + "\n", + "#Results\n", + "print 'Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: %4.2f '%(phiP1*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.8:pg-477" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEWCAYAAADLkvgyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVNW1x/HvhgZnjIIKNCqTKCKCiIAYsCQhIlFQE0fU\naIyKs4JTjEjHNgkaRY04GzEOUaMhMWL02UZb4oAiCLYgogQ1gsPDCXwOiOz3xymkabuaBqrq3Kr6\nfdaqRdWtc+/dfVe5tufcc/cxd0dERCSmJrEDEBERUTISEZHolIxERCQ6JSMREYlOyUhERKJTMhIR\nkegSmYzM7HQze9XMasxsXIY2Q8xsrpnNM7Pz8x2jiIhkT1nsAOoysxRwANDd3ZebWat62jQBJgA/\nABYB08zsQXefm9dgRUQkK5LYMzoZGOfuywHcfXE9bfoAr7v7W+7+NXAvMDyPMYqISBYlMRl1AQaa\n2VQze9LMetfTphz4b63P76S3iYhIAYoyTGdmVcA2tTcBDlyUjmkLd+9nZnsAfwE65j9KERHJlyjJ\nyN0HZ/rOzEYCk9LtppnZCjNr6e4f1mq2ENiu1ud26W2ZjqkCfCIia8ndLV/nSuIw3d+BQQBm1gVo\nVicRAUwDOpvZ9mbWHDgc+EdDB3V3vbLwGjt2bPQYiuml66nrmdRXviUxGU0EOppZDfBn4BgAM2tj\nZpMB3P0b4DTgMWA2cK+7vxopXhERWU+Jm9rtYXbc0fVsfxfYv9bnR4Ed8xiaiIjkSBJ7RpJgqVQq\ndghFRdczu3Q9C5fFGBvMNzPzUvg7RUSyxczwEp/AICIiJUbJSEREolMyEhGR6JSMREQkOiUjERGJ\nTslIRESiUzISEZHolIxERCQ6JSMREYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR\n6JSMREQkOiUjERGJTslIRESiUzISEZHolIxERCQ6JSMREYkukcnIzE43s1fNrMbMxtXzfTsze8LM\nZqfbnBEjThERyY6y2AHUZWYp4ACgu7svN7NW9TRbDoxy95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tt04FF3v9PMDOgP9HX3JZlicff3zWzm+v1FIvEpGYmsJXf/GLjKzA7I0GTlyqHzfNXCgl3c\nfV76/dwM+/UBnjez5sDBwF9r7Y+ZtQW6A07oCX3q7lNRr0iKgJKRSBalVxGdBuDuM9PbOhOqJJPe\nPivD7n2A6wmVkS/21VfIxd0XAYvqnG9roAswCLgrO3+FSP7pnpFIdu3u7tPrbOsDvNCIffcAWgIP\nEpY6WCN3/8DdR7i7EpEUNCUjkeyqb8isD2HtnMw7hYkIi9z9fsLCbsPT941ESoKSkci6Wy1ZpKdz\nv1ZPuz2o1TMys/b1tOlLWB0Td/+UsNDb4CzFKZJ4SkYia8nMNjGzs4CdzOwsM9s4/VUKqK7VroeZ\nnQPsChxsZlulJyE8Xud4/YFTgTZm1jZ9vI2BX5vZDrn/i0Ti00qvIlliZqe5+4RGtNvb3Z/KR0wi\nhUI9I5EsSFdAWNjI5hvkMhaRQqSekUgWpB9wnezun8eORaQQKRmJiEh0GqYTEZHolIxERCQ6JSMR\nEYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR6P4ffTyAN3dtCVsAAAAASUVORK5C\nYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9358710>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are, -6419.8 and 14.45\n", + "Pre-exponential factor and Activation energy are 53.37 kJ/mol and 1.88e+06 1/s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot, show, xlabel, ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "T = array([22.7,27.2,33.7,38.0])\n", + "k1 = array([7.e-4,9.8e-4,1.6e-3,2.e-3])\n", + "R = 8.314 \n", + "\n", + "#Calculations\n", + "T = T +273.15\n", + "x = 1./T\n", + "y = log(k1)\n", + "A = array([ x, ones(size(x))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,y)[0] # obtaining the parameters\n", + "\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*x+intercept # regression line\n", + "#Results\n", + "plot(x,line,'-',x,y,'o')\n", + "xlabel('$ 1/T, K^{-1} $')\n", + "ylabel('$ log(k) $')\n", + "show()\n", + "Ea = -slope*R\n", + "A = exp(intercept)\n", + "print 'Slope and intercept are, %6.1f and %4.2f'%(slope, intercept)\n", + "print 'Pre-exponential factor and Activation energy are %4.2f kJ/mol and %4.2e 1/s'%(Ea/1e3, A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.9:pg-482" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 4.34e+08 1/s\n", + "Backward Rate constant is 4.34e+04 1/s\n", + "Apperent Rate constant is 4.34e+08 1/s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "Ea = 42.e3 #Activation energy for reaction, J/mol\n", + "A = 1.e12 #Pre-exponential factor for reaction, 1/s\n", + "T = 298.0 #Temeprature, K\n", + "Kc = 1.0e4 #Equilibrium constant for reaction\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "#Calculations\n", + "kB = A*exp(-Ea/(R*T))\n", + "kA = kB*Kc\n", + "kApp = kA + kB\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%kA\n", + "print 'Backward Rate constant is %4.2e 1/s'%kB\n", + "print 'Apperent Rate constant is %4.2e 1/s'%kApp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.10:pg-492" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated rate 6.4e+13 1/(M.s) is far grater than experimental value of 4.0e+07 1/(M.s), \n", + "hence the reaction is not diffusion controlled\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Variable Declaration\n", + "Dh = 7.6e-7 #Diffusion coefficient of Hemoglobin, cm2/s\n", + "Do2 = 2.2e-5 #Diffusion coefficient of oxygen, cm2/s\n", + "rh = 35. #Radius of Hemoglobin, °A\n", + "ro2 = 2.0 #Radius of Oxygen, °A\n", + "k = 4e7 #Rate constant for binding of O2 to Hemoglobin, 1/(M.s)\n", + "NA =6.022e23 #Avagadro Number\n", + "#Calculations\n", + "DA = Dh + Do2\n", + "kd = 4*pi*NA*(rh+ro2)*1e-8*DA\n", + "\n", + "#Results\n", + "print 'Estimated rate %4.1e 1/(M.s) is far grater than experimental value of %4.1e 1/(M.s), \\nhence the reaction is not diffusion controlled'%(kd,k)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.11:pg-494" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 9.90e+04 1/s\n", + "Backward Rate constant is -12.72 1/s\n" + ] + } + ], + "source": [ + "from math import log, e\n", + "#Variable Declaration\n", + "Ea = 104e3 #Activation energy for reaction, J/mol\n", + "A = 1.e13 #Pre-exponential factor for reaction, 1/s\n", + "T = 300.0 #Temeprature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "h = 6.626e-34 #Plnak constant, Js\n", + "c = 1.0 #Std. State concentration, M\n", + "k = 1.38e-23 #,J/K\n", + "\n", + "#Calculations\n", + "dH = Ea - 2*R*T\n", + "dS = R*log(A*h*c/(k*T*e**2))\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%dH\n", + "print 'Backward Rate constant is %4.2f 1/s'%dS" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ipvWUNm.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ipvWUNm.ipynb new file mode 100644 index 00000000..29d2cd41 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_ipvWUNm.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Enthalpy and the Second and Third Laws of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.1:pg-90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of heat engine is 0.600\n", + "Work done by heat engine is 600.0 J\n" + ] + } + ], + "source": [ + "import math\n", + "Th, Tc = 500.,200. #Temeperatures IN Which reversible heat engine works, K\n", + "q = 1000. #Heat absorbed by heat engine, J\n", + "\n", + "#Calcualtions\n", + "eps = 1.-Tc/Th\n", + "w = eps*q\n", + "\n", + "#Results\n", + "print 'Efficiency of heat engine is %4.3f'%eps\n", + "print 'Work done by heat engine is %4.1f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.4:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 24.43 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "Ti, Tf = 320.,650. #Initial and final state Temeperatures of CO2, K\n", + "vi, vf = 80.,120. #Initial and final state volume of CO2, K\n", + "A, B, C, D = 31.08,-0.01452,3.1415e-5,-1.4973e-8\n", + " #Constants in constant volume Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(vf/vi)\n", + "dS = dS1 + dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.5:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 48.55 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 2.5 #Number of moles of CO2\n", + "Ti, Tf = 450.,800. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "A, B, C, D = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(pf/pi)\n", + "dS = dS1 - dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.6:pg-95" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 58.2 J/(mol.K)\n", + "Ratio of pressure to temperature dependent term 2.8e-05\n", + "hence effect of pressure dependent term isvery less\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 3.0 #Number of moles of CO2\n", + "Ti, Tf = 300.,600. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.00,3.00 #Initial and final state pressure of CO2, K\n", + "cpm = 27.98 #Specific heat of mercury, J/(mol.K)\n", + "M = 200.59 #Molecualr wt of mercury, g/(mol)\n", + "beta = 1.81e-4 #per K\n", + "rho = 13.54 #Density of mercury, g/cm3\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "dS1 = n*cpm*log(Tf/Ti)\n", + "dS2 = n*(M/(rho*1e6))*beta*(pf-pi)*1e5\n", + "dS = dS1 - dS2\n", + "\n", + "#Results\n", + "print 'Entropy change of process is %4.1f J/(mol.K)'%dS\n", + "print 'Ratio of pressure to temperature dependent term %3.1e\\nhence effect of pressure dependent term isvery less'%(dS2/dS1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.7:pg-99" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of surrounding is 7.6 J/(mol.K)\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Total Entropy changeis 0.0 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -qrev\n", + "dSsys = qrev/T\n", + "dSsur = -dSsys\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Entropy change of surrounding is %4.1f J/(mol.K)'%dSsur\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Total Entropy changeis %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.8:pg-100" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Constant external pressure and initial pressure are 2.494e+05 J,and 9.977e+04 J respectively\n", + "Heat in reverssible and irreversible processes are -2285.4 J,and -3741.3 J respectively\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Entropy change of surrounding is 12.47 J/(mol.K)\n", + "Total Entropy changeis 4.85 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "pext = n*R*T/(vf/1e3)\n", + "pi = n*R*T/(vi/1e3)\n", + "q = pext*(vf-vi)/1e3\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -q\n", + "dSsur = -q/T\n", + "dSsys = qrev/T\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Constant external pressure and initial pressure are %4.3e J,and %4.3e J respectively'%(pext,pi)\n", + "print 'Heat in reverssible and irreversible processes are %4.1f J,and %4.1f J respectively'%(qrev,q)\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Entropy change of surrounding is %4.2f J/(mol.K)'%dSsur\n", + "print 'Total Entropy changeis %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.9:pg-103" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change Sm0 for O2 is 204.8 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "D1 = 2.11e-3 #Constants in constant pressure Heat capacity equation for K<T<12.97K, in J, mol, K units\n", + "A2, B2, C2, D2 = -5.666,0.6927,-5.191e-3,9.943e-4\n", + " #Constants in constant pressure Heat capacity equation for 12.97<T<23.66, J, mol, K units\n", + "A3, B3, C3, D3 = 31.70,-2.038,0.08384,-6.685e-4\n", + " #Constants in constant pressure Heat capacity equation for 23.66<T<43.76, J, mol, K units\n", + "A4 = 46.094 #Constants in constant pressure Heat capacity equation for 43.76<T<54.39, J/(mol.K)\n", + "A5, B5, C5, D5 = 81.268,-1.1467,0.01516,-6.407e-5\n", + " #Constants in constant pressure Heat capacity equation for 54.39<T<90.20K, J, mol, K units\n", + "A6, B6, C6, D6 = 32.71,-0.04093,1.545e-4,-1.819e-7\n", + " #Constants in constant pressure Heat capacity equation for 90.20<T<298.15 KJ, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "Ltrans1 = 93.80 #Entalpy of transition at 23.66K, J/mol\n", + "Ltrans2 = 743.0 #Entalpy of transition at 43.76K, J/mol\n", + "Ltrans3 = 445.0 #Entalpy of transition at 54.39K, J/mol\n", + "Ltrans4 = 6815. #Entalpy of transition at 90.20K, J/mol\n", + "T1 = 12.97 #Maximum applicabliltiy temeprature for first heat capacity equation, K\n", + "T12 = 23.66 #Phase Change temperature from Solid III--II, K\n", + "T23 = 43.76 #Phase Change temperature from Solid II--I, K\n", + "T34 = 54.39 #Phase Change temperature from Solid I--liquid, K\n", + "T45 = 90.20 #Phase Change temperature from liquid--gas, K\n", + "Ts = 298.15 #Std. Temeprature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (D1*T**3)/T, (T,0,T1)) \n", + "dS2 = n*integrate( (A2 + B2*T + C2*T**2 + D2*T**3)/T, (T,T1,T12)) \n", + "dS21 = Ltrans1/T12\n", + "dS3 = n*integrate( (A3 + B3*T + C3*T**2 + D3*T**3)/T, (T,T12,T23)) \n", + "dS31 = Ltrans2/T23\n", + "dS4 = n*integrate( (A4)/T, (T,T23,T34)) \n", + "dS41 = Ltrans3/T34\n", + "dS5 = n*integrate( (A5 + B5*T + C5*T**2 + D5*T**3)/T, (T,T34,T45)) \n", + "dS51 = Ltrans4/T45\n", + "dS6 = n*integrate( (A6 + B6*T + C6*T**2 + D6*T**3)/T, (T,T45,Ts))\n", + "#print dS1+dS2,dS21\n", + "#print dS3, dS31\n", + "#print dS4, dS41\n", + "#print dS5, dS51\n", + "#print dS6\n", + "dS = dS1+dS2+dS21+dS3+dS31+dS4+dS41+dS5+dS51+dS6\n", + "\n", + "#Results\n", + "print 'Entropy change Sm0 for O2 is %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.10:pg-105" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change for reaction at 475 K is -88.26 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "n = 1.0 #Number of moles of CO2 formed, mol\n", + "p = 1. #Pressure of CO2, K\n", + "\n", + "A1, B1, C1, D1 = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation for CO2, J/(mol.K)\n", + "A2, B2, C2, D2 = 30.81,-1.187e-2,2.3968e-5, 0.0\n", + " #Constants in constant pressure Heat capacity equation for O2, J/(mol.K)\n", + "A3, B3, C3, D3 = 31.08,-1.452e-2,3.1415e-5 ,-1.4793e-8 \n", + " #Constants in constant pressure Heat capacity equation for CO, J/(mol.K)\n", + "DSr298CO = 197.67 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298CO2 = 213.74 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298O2 = 205.138 #Std. Entropy change for CO, J/(mol.K)\n", + "Tr = 475. #Reaction temperature, K\n", + "Ts = 298.15 #Std. temperature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "v1,v2,v3 = 1.,1./2,1.\n", + "DSr = DSr298CO2*v1 - DSr298CO*v1 - DSr298O2*v2\n", + "DA = v1*A1-v2*A2-v3*A3\n", + "DB = v1*B1-v2*B2-v3*B3\n", + "DC = v1*C1-v2*C2-v3*C3\n", + "DD = v1*D1-v2*D2-v3*D3\n", + "dS = DSr + n*integrate( (DA + DB*T + DC*T**2 + DD*T**3)/T, (T,Ts,Tr)) \n", + "\n", + "#Results\n", + "print 'Entropy change for reaction at %4d K is %4.2f J/(mol.K)'%(Tr,dS)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_itFEv6b.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_itFEv6b.ipynb new file mode 100644 index 00000000..bb478dec --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_itFEv6b.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 07: Properties of Real Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex7.3:pg-175" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(V-Videal) -6.49 L\n", + "Percentage error -58.73\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "m = 1.0 #Mass of Methane, kg\n", + "T = 230 #Temeprature of Methane, K\n", + "P = 68.0 #Pressure, bar \n", + "Tc = 190.56 #Critical Temeprature of Methane\n", + "Pc = 45.99 #Critical Pressure of Methane\n", + "R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n", + "M = 16.04 #Molecular wt of Methane\n", + "\n", + "#Calcualtions\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "z = 0.63 #Methane compressibility factor\n", + "n = m*1e3/M\n", + "V = z*n*R*T/P\n", + "Vig = n*R*T/P\n", + "DV = (V - Vig)/V\n", + "\n", + "#Results\n", + "print '(V-Videal) %4.2f L'%(V-Vig)\n", + "print 'Percentage error %5.2f'%(DV*100)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_iujxmeR.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_iujxmeR.ipynb new file mode 100644 index 00000000..860afddf --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_iujxmeR.ipynb @@ -0,0 +1,172 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 08: Phase Diagrams and the Relative Stability of Solids, Liquids, and Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.2:Pg.No-195" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Latent heat of vaporization of benzene at 20°C 30.7 kJ/mol\n", + "Entropy Change of vaporization of benzene at 20°C 86.9 J/mol\n", + "Triple point temperature = 267.3 K for benzene\n", + "Triple point pressure = 3.53e+03 Pa for benzene\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + "\n", + "import math\n", + "Tn = 353.24 #normal boiling point of Benzene, K\n", + "pi = 1.19e4 #Vapor pressure of benzene at 20°C, Pa\n", + "DHf = 9.95 #Latent heat of fusion, kJ/mol\n", + "pv443 = 137. #Vapor pressure of benzene at -44.3°C, Pa\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "Pf = 101325 #Std. atmospheric pressure, Pa\n", + "T20 = 293.15 #Temperature in K\n", + "P0 = 1.\n", + "Pl = 10000.\n", + "Ts = -44.3 #Temperature of solid benzene, °C\n", + "\n", + "#Calculations\n", + "Ts = Ts + 273.15\n", + "#Part a\n", + "\n", + "DHv = -(R*math.log(Pf/pi))/(1./Tn-1./T20)\n", + "#Part b\n", + "\n", + "DSv = DHv/Tn\n", + "DHf = DHf*1e3\n", + "#Part c\n", + "\n", + "Ttp = -DHf/(R*(math.log(Pl/P0)-math.log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))\n", + "Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325\n", + "\n", + "#Results\n", + "print 'Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol'%(DHv/1000)\n", + "print 'Entropy Change of vaporization of benzene at 20°C %3.1f J/mol'%DSv\n", + "print 'Triple point temperature = %4.1f K for benzene'%Ttp\n", + "print 'Triple point pressure = %4.2e Pa for benzene'%Ptp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.3:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted by one leg 5.428e-05 N\n" + ] + } + ], + "source": [ + "from math import cos, pi\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 1.2e-4 #Radius of hemisphere, m\n", + "theta = 0.0 #Contact angle, rad\n", + "\n", + "#Calculations\n", + "DP = 2*gama*cos(theta)/r\n", + "F = DP*pi*r**2\n", + "\n", + "#Results\n", + "print 'Force exerted by one leg %5.3e N'%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.4:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height to which water can rise by capillary action is 0.74 m\n", + "This is very less than 100.0 n, hence water can not reach top of tree\n" + ] + } + ], + "source": [ + "from math import cos\n", + "\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 2e-5 #Radius of xylem, m\n", + "theta = 0.0 #Contact angle, rad\n", + "rho = 997.0 #Density of water, kg/m3\n", + "g = 9.81 #gravitational acceleration, m/s2\n", + "H = 100 #Height at top of redwood tree, m\n", + "\n", + "#Calculations\n", + "h = 2*gama/(rho*g*r*cos(theta))\n", + "\n", + "#Results\n", + "print 'Height to which water can rise by capillary action is %3.2f m'%h\n", + "print 'This is very less than %4.1f n, hence water can not reach top of tree'%H" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_l7idTmT.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_l7idTmT.ipynb new file mode 100644 index 00000000..bb478dec --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_l7idTmT.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 07: Properties of Real Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex7.3:pg-175" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(V-Videal) -6.49 L\n", + "Percentage error -58.73\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "m = 1.0 #Mass of Methane, kg\n", + "T = 230 #Temeprature of Methane, K\n", + "P = 68.0 #Pressure, bar \n", + "Tc = 190.56 #Critical Temeprature of Methane\n", + "Pc = 45.99 #Critical Pressure of Methane\n", + "R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n", + "M = 16.04 #Molecular wt of Methane\n", + "\n", + "#Calcualtions\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "z = 0.63 #Methane compressibility factor\n", + "n = m*1e3/M\n", + "V = z*n*R*T/P\n", + "Vig = n*R*T/P\n", + "DV = (V - Vig)/V\n", + "\n", + "#Results\n", + "print '(V-Videal) %4.2f L'%(V-Vig)\n", + "print 'Percentage error %5.2f'%(DV*100)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_lzYYAbC.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_lzYYAbC.ipynb new file mode 100644 index 00000000..6d251294 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_lzYYAbC.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Transport Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.1:pg-427" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion coefficient of Argon 1.1e-05 m2/s\n" + ] + } + ], + "source": [ + "from scipy import constants\n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "M = 0.040 #Molecualar wt of Argon, kh/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "DAr = (1./3)*sqrt(8*R*T/(pi*M))*(R*T/(P*N_A*sqrt(2)*sigm))\n", + "\n", + "#Results\n", + "print 'Diffusion coefficient of Argon %3.1e m2/s'%DAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.2:pg-428" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of collision cross sections of Helium to Argon 0.790\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "DHebyAr = 4.0 \n", + "MAr, MHe = 39.9, 4.0 #Molecualar wt of Argon and Neon, kg/mol\n", + "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "N_A = 6.02214129e+23 #mol^-1\n", + "#Calculations\n", + "sigHebyAr = (1./DHebyAr)*sqrt(MAr/MHe)\n", + "\n", + "#Results\n", + "print 'Ratio of collision cross sections of Helium to Argon %4.3f'%sigHebyAr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.3:pg-430" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rms displacement at 1000 and 10000 is 0.141 and 0.447 m respectively\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "D = 1.0e-5 #Diffusion coefficient, m2/s \n", + "t1 = 1000 #Time, s\n", + "t10 = 10000 #Time, s\n", + "\n", + "#Calculations\n", + "xrms1 = sqrt(2*D*t1)\n", + "xrms10 = sqrt(2*D*t10)\n", + "\n", + "#Results\n", + "print 'rms displacement at %4d and %4d is %4.3f and %4.3f m respectively'%(t1,t10,xrms1,xrms10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.4:pg-432" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time per random walk is 2.045e-11 s or 20.45 ps\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "D = 2.2e-5 #Diffusion coefficient of benzene, cm2/s \n", + "x0 = 0.3 #molecular diameter of benzene, nm\n", + "\n", + "#Calculations\n", + "t = (x0*1e-9)**2/(2*D*1e-4)\n", + "\n", + "#Results\n", + "print 'Time per random walk is %4.3e s or %4.2f ps'%(t,t/1e-12)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.5:pg-434" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean free path 2.627e-07 m and collisional cross section 1.10e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "sigm = 3.6e-19 #\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "CvmbyNA = 3.*k/2\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "labda = 3*kt/(CvmbyNA*nuavg*N)\n", + "sigm = 1/(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Mean free path %4.3e m and collisional cross section %4.2e m2'%(labda, sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.6:pg-437" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional cross section 2.74e-19 m2\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 227. #Viscosity of Ar, muP\n", + "P = 101325 #Pressure, Pa\n", + "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n", + "T = 300.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n", + "\n", + "#Calculations\n", + "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n", + "N = NA*P/(R*T)\n", + "m = M*1e-3/NA\n", + "labda = 3.*eta*1e-7/(nuavg*N*m) #viscosity in kg m s units\n", + "sigm = 1./(sqrt(2)*N*labda)\n", + "\n", + "#Results\n", + "print 'Collisional cross section %4.2e m2'%(sigm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.7:pg-439" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Flow rate is 2.762e-06 m3/s\n", + "Cylinder can be used for 4.381e+06 s nearly 50.7 days\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "m = 22.7 #Mass of CO2, kg\n", + "T = 293.0 #Temperature, K\n", + "L = 1.0 #length of the tube, m\n", + "d = 0.75 #Diameter of the tube, mm\n", + "eta = 146 #Viscosity of CO2, muP\n", + "p1 = 1.05 #Inlet pressure, atm\n", + "p2 = 1.00 #Outlet pressure, atm\n", + "atm2pa = 101325 #Conversion for pressure from atm to Pa \n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "R = 8.314 #Molar Gas constant, J mol^-1 K^-1\n", + "\n", + "#Calculations\n", + "p1 = p1*atm2pa\n", + "p2 = p2*atm2pa\n", + "F = pi*(d*1e-3/2)**4*(p1**2-p2**2)/(16.*eta/1.e7*L*p2)\n", + "nCO2 = m/M\n", + "v = nCO2*R*T/((p1+p2)/2)\n", + "t = v/F\n", + "\n", + "#Results\n", + "print 'Flow rate is %4.3e m3/s'%(F)\n", + "print 'Cylinder can be used for %4.3e s nearly %3.1f days'%(t, t/(24*3600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.8:pg-441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of protein is 3.550 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "eta = 0.891 #Viscosity of hemoglobin in water, cP\n", + "T = 298.0 #Temperature, K\n", + "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n", + "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n", + "D = 6.9e-11 #Diffusion coefficient, m2/s \n", + "\n", + "#Calculations\n", + "r = k*T/(6*pi*eta*1e-3*D)\n", + "\n", + "#Results\n", + "print 'Radius of protein is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.9:pg-442" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Radius of Lysozyme particle is 1.937 nm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "s = 1.91e-13 #Sedimentation constant, s\n", + "NA = 6.02214129e+23 #mol^-1\n", + "M = 14100.0 #Molecualr wt of lysozyme, g/mol\n", + "rho = 0.998 #Density of water, kg/m3\n", + "eta = 1.002 #Viscosity lysozyme in water, cP\n", + "T = 293.15 #Temperature, K\n", + "vbar = 0.703 #Specific volume of cm3/g\n", + "\n", + "#Calculations\n", + "m = M/NA\n", + "f = m*(1.-vbar*rho)/s\n", + "r = f/(6*pi*eta)\n", + "\n", + "#Results\n", + "print 'Radius of Lysozyme particle is %4.3f nm'%(r/1e-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.10:pg-443" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAETCAYAAAAVhSD9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4lOW9//H3F2lcqlCXU5SAEINbUVBQREGJ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odPdZ0Y6B\n6zzsCnoKYflxCPvGL4t256xz94rkN2jI6yS+d9L4NsDnzfXhRfaUCovI7p1M1LGY2QGE7XqPi+7v\nA/wjGncSYW8YgPOBN8yse/T4RHd/CXjLzA41s86Jb9CA1+mW+N5J4wcBk83stJR9YpEmUGERqYeZ\ndTezmwhfS33HzP6NMC+5hh1fhR0HvBndPh54Pbq9AuhP2NzraaCbmQ0i7MrZirCZVqLdvc6CpPdO\nHL+ZsH1sdVM+r0iqaKMvkRiYWT93fyPuHCLNQR2LSDySJ/9FsoY6FhERSSl1LCIiklIqLCIiklIq\nLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklL/H8qUwV6V+bCZAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9adf8d0>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope is 3.78e-04 1/min or 6.299e-06 1/s \n", + "Sedimentation factor is 1.899e-13 s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot,show,xlabel,ylabel\n", + "import math\n", + "%matplotlib inline\n", + "\n", + "#Variable Declaration\n", + "t = array([0.0,30.0,60.0,90.0,120.0,150.0]) #Time, min\n", + "xb = array([6.00,6.07,6.14,6.21,6.28,6.35]) #Location of boundary layer, cm\n", + "rpm = 55000. #RPM of centrifuge \n", + "\n", + "#Calculations\n", + "nx = xb/xb[0]\n", + "lnx = log(nx)\n", + "A = array([ t, ones(size(t))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,lnx)[0] # obtaining the parameters\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*t+intercept # regression line\n", + "\n", + "#Results\n", + "plot(t,line,'-',t,lnx,'o')\n", + "xlabel('$ Time, min $')\n", + "ylabel('$ \\log(x_b/x_{b0}) $')\n", + "show()\n", + "sbar = (slope/60)/(rpm*2*pi/60)**2\n", + "print 'Slope is %6.2e 1/min or %4.3e 1/s '%(slope, slope/60)\n", + "print 'Sedimentation factor is %4.3e s'%(sbar)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex17.11:pg-449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Molar conductivity of MgCl2 on infinite dilution is 0.0258 S.m2/mol\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "LMg = 0.0106 #Ionic conductance for Mg, S.m2/mol\n", + "LCl = 0.0076 #Ionic conductance for Cl, S.m2/mol\n", + "nMg, nCl = 1, 2 #Coefficients of Mg and Cl \n", + "\n", + "#Calculations\n", + "LMgCl2 = nMg*LMg + nCl*LCl\n", + "\n", + "#Results\n", + "print 'Molar conductivity of MgCl2 on infinite dilution is %5.4f S.m2/mol'%(LMgCl2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_n1PODAI.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_n1PODAI.ipynb new file mode 100644 index 00000000..504b170b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_n1PODAI.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 09: Ideal and Real Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.2:pg-212" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gibbs energy change of mixing is -1.371e+04 J\n", + "Gibbs energy change of mixing is < 0, hence the mixing is spontaneous\n", + "Entropy change of mixing is 45.99 J/K\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "P = 1.0 #Pressure, bar\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "dGmix = n*R*T*(xb*log(xb)+xt*log(xt))\n", + "dSmix = -n*R*(xb*log(xb)+xt*log(xt))\n", + "\n", + "#Results\n", + "print 'Gibbs energy change of mixing is %4.3e J'%dGmix\n", + "print 'Gibbs energy change of mixing is < 0, hence the mixing is spontaneous'\n", + "print 'Entropy change of mixing is %4.2f J/K'%dSmix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.3:pg-214" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total pressure of the vapor is 69.8 torr\n", + "Benzene fraction in vapor is 0.837 \n", + "Toulene fraction in vapor is 0.163 \n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "xb = nb/n\n", + "xt = 1. - xb\n", + "P = xb*P0b + xt*P0t\n", + "y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "yt = 1.-y\n", + "\n", + "#Results\n", + "print 'Total pressure of the vapor is %4.1f torr'%P\n", + "print 'Benzene fraction in vapor is %4.3f '%y\n", + "print 'Toulene fraction in vapor is %4.3f '%yt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.4:pg-215" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass Balance: 6.75*x + 1.5*y - 5.0\n", + "Pressure and x: P - 67.5*x - 28.9\n", + "Pressure and y: y - 0.0148148148148148*(96.4*P - 2785.96)/P\n", + "Pressure is 66.8 torr\n", + "Mole fraction of benzene in liquid phase 0.561\n", + "Mole fraction of benzene in vapor phase 0.810\n" + ] + } + ], + "source": [ + "from sympy import symbols, solve\n", + "import math\n", + "#Variable Declaration\n", + "nb = 5.00 #Number of moles of Benzene, mol\n", + "nt = 3.25 #Number of moles of Toluene, mol\n", + "T = 298.15 #Temperature, K\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "P0b = 96.4 #Vapor pressure of Benzene, torr\n", + "P0t = 28.9 #Vapor pressure of Toluene, torr\n", + "nv = 1.5 #moles vaporized, mol\n", + "\n", + "#Calculations\n", + "n = nb + nt\n", + "nl = n - nv\n", + "zb = nb/n\n", + "\n", + "x,y, P = symbols('x y P')\n", + "e1 = nv*(y-zb)-nl*(zb-x)\n", + "print 'Mass Balance:', e1\n", + "e2 = P - (x*P0b + (1-x)*P0t)\n", + "print 'Pressure and x:',e2\n", + "e3 = y - (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n", + "print 'Pressure and y:', e3\n", + "equations = [e1,e2,e3]\n", + "sol = solve(equations)\n", + "\n", + "#Results\n", + "for i in sol:\n", + " if ((i[x] > 0.0 and i[x] <1.0) and (i[P] > 0.0) and (i[y]>zb and i[y]<1.0)):\n", + " print 'Pressure is %4.1f torr' %i[P]\n", + " print 'Mole fraction of benzene in liquid phase %4.3f' %i[x]\n", + " print 'Mole fraction of benzene in vapor phase %4.3f' %i[y]\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.6:pg-222" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Freezing point depression -3.94 K\n", + "Molecualr wt of solute 274.2 g/mol\n", + "Vapor pressure of solvent is reduced by a factor of 0.980\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 4.50 #Mass of substance dissolved, g\n", + "ms = 125.0 #Mass of slovent (CCl4), g\n", + "TbE = 0.65 #Boiling point elevation, °C\n", + "Kf, Kb = 30.0, 4.95 #Constants for freezing point elevation \n", + " # and boiling point depression for CCl4, K kg/mol\n", + "Msolvent = 153.8 #Molecualr wt of solvent, g/mol\n", + "#Calculations\n", + "DTf = -Kf*TbE/Kb\n", + "Msolute = Kb*m/(ms*1e-3*TbE)\n", + "nsolute = m/Msolute\n", + "nsolvent = ms/Msolvent \n", + "x = 1.0 - nsolute/(nsolute + nsolvent)\n", + "\n", + "#Results\n", + "print 'Freezing point depression %5.2f K'%DTf\n", + "print 'Molecualr wt of solute %4.1f g/mol'%Msolute\n", + "print 'Vapor pressure of solvent is reduced by a factor of %4.3f'%x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.7:pg-223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Osmotic pressure 12.23 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "csolute = 0.500 #Concentration of solute, g/L\n", + "R = 8.206e-2 #Gas constant L.atm/(mol.K)\n", + "T = 298.15 #Temperature of the solution, K\n", + "\n", + "#Calculations\n", + "pii = csolute*R*T\n", + "\n", + "#Results\n", + "print 'Osmotic pressure %4.2f atm'%pii\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.8:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.6994 atm\n", + "Activity coefficinet of CS2 1.9971 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "p0CS2 = 512.3 #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/p0CS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.9:pg-230" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity of CS2 0.1783 atm\n", + "Activity coefficinet of CS2 0.5090 atm\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n", + "pCS2 = 358.3 #Partial pressure of CS2, torr\n", + "kHCS2 = 2010. #Total pressure, torr\n", + "\n", + "#Calculations\n", + "alpha = pCS2/kHCS2\n", + "gama = alpha/xCS2\n", + "\n", + "#Results\n", + "print 'Activity of CS2 %5.4f atm'%alpha\n", + "print 'Activity coefficinet of CS2 %5.4f atm'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.10:pg-231" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Henrys constant = 143.38 torr\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "rho = 789.9 #Density of acetone, g/L\n", + "n = 1.0 #moles of acetone, mol\n", + "M = 58.08 #Molecular wt of acetone, g/mol\n", + "kHacetone = 1950 #Henrys law constant, torr\n", + "#Calculations\n", + "H = n*M*kHacetone/rho\n", + "\n", + "#Results\n", + "print 'Henrys constant = %5.2f torr'%H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.11:pg-232" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Activity coefficient = 0.969\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 0.5 #Mass of water, kg\n", + "ms = 24.0 #Mass of solute, g\n", + "Ms = 241.0 #Molecular wt of solute, g/mol\n", + "Tfd = 0.359 #Freezinf point depression, °C or K\n", + "kf = 1.86 #Constants for freezing point depression for water, K kg/mol\n", + "\n", + "#Calculations\n", + "msolute = ms/(Ms*m)\n", + "gama = Tfd/(kf*msolute)\n", + "\n", + "#Results\n", + "print 'Activity coefficient = %4.3f'%gama" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex9.12:pg-233" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of moles of nitrogen in blood at 1 and 50 bar are 2.46e-03,0.123 mol\n", + "Volume of nitrogen released from blood at reduced pressure 2.981 L\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "m = 70.0 #Mass of human body, kg\n", + "V = 5.00 #Volume of blood, L\n", + "HN2 = 9.04e4 #Henry law constant for N2 solubility in blood, bar\n", + "T = 298.0 #Temperature, K\n", + "rho = 1.00 #density of blood, kg/L\n", + "Mw = 18.02 #Molecualr wt of water, g/mol\n", + "X = 80 #Percent of N2 at sea level\n", + "p1, p2 = 1.0, 50.0 #Pressures, bar\n", + "R = 8.314e-2 #Ideal Gas constant, L.bar/(mol.K)\n", + "#Calculations\n", + "nN21 = (V*rho*1e3/Mw)*(p1*X/100)/HN2\n", + "nN22 = (V*rho*1e3/Mw)*(p2*X/100)/HN2\n", + "V = (nN22-nN21)*R*T/p1\n", + "#Results\n", + "print 'Number of moles of nitrogen in blood at 1 and 50 bar are %3.2e,%3.3f mol'%(nN21,nN22)\n", + "print 'Volume of nitrogen released from blood at reduced pressure %4.3f L'%V" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_nYm4CuE.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_nYm4CuE.ipynb new file mode 100644 index 00000000..1fc19029 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_nYm4CuE.ipynb @@ -0,0 +1,171 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1. Fundamental Concepts of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.1:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final Tyre pressure is 3.61e+05 Pa\n" + ] + } + ], + "source": [ + "import math \n", + "Pi = 3.21e5 #Recommended tyre pressure, Pa\n", + "Ti = -5.00 #Initial Tyre temperature, °C\n", + "Tf = 28.00 #Final Tyre temperature, °C\n", + "\n", + "#Calculations\n", + "Ti = 273.16 + Ti\n", + "Tf = 273.16 + Tf\n", + "pf = Pi*Tf/Ti #Final tyre pressure, Pa\n", + "\n", + "#Results\n", + "print 'Final Tyre pressure is %6.2e Pa'%pf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.2:pg-9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Moles of He=0.121, Ne=0.303 and, Xe=0.040 in mol\n", + "Mole fraction of xHe=0.261, xNe=0.652 and, xXe=0.087\n", + "Final pressure is 1.917 bar\n", + "Partial pressure of pHe=0.500, pNe=1.250 and, pXe=0.167 in bar\n" + ] + } + ], + "source": [ + "import math \n", + "phe = 1.5 #Pressure in Helium chamber, bar\n", + "vhe = 2.0 #Volume of Helium chamber, L\n", + "pne = 2.5 #Pressure in Neon chamber, bar\n", + "vne = 3.0 #Volume of Neon chamber, L\n", + "pxe = 1.0 #Pressure in Xenon chamber, bar\n", + "vxe = 1.0 #Volume of Xenon chamber, L\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "#Calculations\n", + "\n", + "nhe = phe*vhe/(R*T) #Number of moles of Helium, mol\n", + "nne = pne*vne/(R*T) #Number of moles of Neon, mol\n", + "nxe = pxe*vxe/(R*T) #Number of moles of Xenon, mol\n", + "n = nhe + nne + nxe #Total number of moles, mol\n", + "V = vhe + vne + vxe #Total volume of system, L\n", + "xhe = nhe/n\n", + "xne = nne/n\n", + "xxe = nxe/n\n", + "P = n*R*T/(V)\n", + "phe = P*xhe #Partial pressure of Helium, bar\n", + "pne = P*xne #Partial pressure of Neon, bar\n", + "pxe = P*xxe #Partial pressure of Xenon, bar\n", + "\n", + "#Results\n", + "print 'Moles of He=%4.3f, Ne=%4.3f and, Xe=%4.3f in mol'%(nhe,nne,nxe) \n", + "print 'Mole fraction of xHe=%4.3f, xNe=%4.3f and, xXe=%4.3f'%(xhe,xne,xxe)\n", + "print 'Final pressure is %4.3f bar'%P\n", + "print 'Partial pressure of pHe=%4.3f, pNe=%4.3f and, pXe=%4.3f in bar'%(phe,pne,pxe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex1.4:pg-12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure from ideal gas law = 9.98e-02 bar nad from Van der Waals equation = 9.98e-02 bar \n", + "Pressure from ideal gas law = 249.4 bar nad from Van der Waals equation = 269.9 bar \n" + ] + } + ], + "source": [ + "\n", + "import math \n", + "T = 300.0 #Nitrogen temperature, K\n", + "v1 = 250.00 #Molar volume, L\n", + "v2 = 0.1 #Molar volume, L\n", + "a = 1.37 #Van der Waals parameter a, bar.dm6/mol2 \n", + "b = 0.0387 #Van der Waals parameter b, dm3/mol\n", + "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n", + "n = 1.\n", + "#Calculations\n", + "\n", + "p1 = n*R*T/v1 \n", + "p2 = n*R*T/v2\n", + "pv1 = n*R*T/(v1-n*b)- n**2*a/v1**2\n", + "pv2 = n*R*T/(v2-n*b)- n**2*a/v2**2\n", + "\n", + "#Results\n", + "print 'Pressure from ideal gas law = %4.2e bar nad from Van der Waals equation = %4.2e bar '%(p1, pv1)\n", + "print 'Pressure from ideal gas law = %4.1f bar nad from Van der Waals equation = %4.1f bar '%(p2, pv2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_oGvJtYD.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_oGvJtYD.ipynb new file mode 100644 index 00000000..29d2cd41 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_oGvJtYD.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Enthalpy and the Second and Third Laws of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.1:pg-90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of heat engine is 0.600\n", + "Work done by heat engine is 600.0 J\n" + ] + } + ], + "source": [ + "import math\n", + "Th, Tc = 500.,200. #Temeperatures IN Which reversible heat engine works, K\n", + "q = 1000. #Heat absorbed by heat engine, J\n", + "\n", + "#Calcualtions\n", + "eps = 1.-Tc/Th\n", + "w = eps*q\n", + "\n", + "#Results\n", + "print 'Efficiency of heat engine is %4.3f'%eps\n", + "print 'Work done by heat engine is %4.1f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.4:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 24.43 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "Ti, Tf = 320.,650. #Initial and final state Temeperatures of CO2, K\n", + "vi, vf = 80.,120. #Initial and final state volume of CO2, K\n", + "A, B, C, D = 31.08,-0.01452,3.1415e-5,-1.4973e-8\n", + " #Constants in constant volume Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(vf/vi)\n", + "dS = dS1 + dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.5:pg-94" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 48.55 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 2.5 #Number of moles of CO2\n", + "Ti, Tf = 450.,800. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "A, B, C, D = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation in J, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n", + "dS2 = n*R*log(pf/pi)\n", + "dS = dS1 - dS2\n", + "#Results\n", + "print 'Entropy change of process is %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.6:pg-95" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of process is 58.2 J/(mol.K)\n", + "Ratio of pressure to temperature dependent term 2.8e-05\n", + "hence effect of pressure dependent term isvery less\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 3.0 #Number of moles of CO2\n", + "Ti, Tf = 300.,600. #Initial and final state Temeperatures of CO2, K\n", + "pi, pf = 1.00,3.00 #Initial and final state pressure of CO2, K\n", + "cpm = 27.98 #Specific heat of mercury, J/(mol.K)\n", + "M = 200.59 #Molecualr wt of mercury, g/(mol)\n", + "beta = 1.81e-4 #per K\n", + "rho = 13.54 #Density of mercury, g/cm3\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "dS1 = n*cpm*log(Tf/Ti)\n", + "dS2 = n*(M/(rho*1e6))*beta*(pf-pi)*1e5\n", + "dS = dS1 - dS2\n", + "\n", + "#Results\n", + "print 'Entropy change of process is %4.1f J/(mol.K)'%dS\n", + "print 'Ratio of pressure to temperature dependent term %3.1e\\nhence effect of pressure dependent term isvery less'%(dS2/dS1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.7:pg-99" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change of surrounding is 7.6 J/(mol.K)\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Total Entropy changeis 0.0 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -qrev\n", + "dSsys = qrev/T\n", + "dSsur = -dSsys\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Entropy change of surrounding is %4.1f J/(mol.K)'%dSsur\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Total Entropy changeis %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.8:pg-100" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Constant external pressure and initial pressure are 2.494e+05 J,and 9.977e+04 J respectively\n", + "Heat in reverssible and irreversible processes are -2285.4 J,and -3741.3 J respectively\n", + "Entropy change of system is -7.6 J/(mol.K)\n", + "Entropy change of surrounding is 12.47 J/(mol.K)\n", + "Total Entropy changeis 4.85 J/(mol.K)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "T = 300.0 #Temeperatures of Water bath, K\n", + "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "\n", + "#Calcualtions\n", + "pext = n*R*T/(vf/1e3)\n", + "pi = n*R*T/(vi/1e3)\n", + "q = pext*(vf-vi)/1e3\n", + "qrev = n*R*T*log(vf/vi)\n", + "w = -q\n", + "dSsur = -q/T\n", + "dSsys = qrev/T\n", + "dS = dSsys + dSsur\n", + "\n", + "#Results\n", + "print 'Constant external pressure and initial pressure are %4.3e J,and %4.3e J respectively'%(pext,pi)\n", + "print 'Heat in reverssible and irreversible processes are %4.1f J,and %4.1f J respectively'%(qrev,q)\n", + "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n", + "print 'Entropy change of surrounding is %4.2f J/(mol.K)'%dSsur\n", + "print 'Total Entropy changeis %4.2f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.9:pg-103" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change Sm0 for O2 is 204.8 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "\n", + "n = 1.0 #Number of moles of CO2\n", + "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n", + "D1 = 2.11e-3 #Constants in constant pressure Heat capacity equation for K<T<12.97K, in J, mol, K units\n", + "A2, B2, C2, D2 = -5.666,0.6927,-5.191e-3,9.943e-4\n", + " #Constants in constant pressure Heat capacity equation for 12.97<T<23.66, J, mol, K units\n", + "A3, B3, C3, D3 = 31.70,-2.038,0.08384,-6.685e-4\n", + " #Constants in constant pressure Heat capacity equation for 23.66<T<43.76, J, mol, K units\n", + "A4 = 46.094 #Constants in constant pressure Heat capacity equation for 43.76<T<54.39, J/(mol.K)\n", + "A5, B5, C5, D5 = 81.268,-1.1467,0.01516,-6.407e-5\n", + " #Constants in constant pressure Heat capacity equation for 54.39<T<90.20K, J, mol, K units\n", + "A6, B6, C6, D6 = 32.71,-0.04093,1.545e-4,-1.819e-7\n", + " #Constants in constant pressure Heat capacity equation for 90.20<T<298.15 KJ, mol, K units\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n", + "Ltrans1 = 93.80 #Entalpy of transition at 23.66K, J/mol\n", + "Ltrans2 = 743.0 #Entalpy of transition at 43.76K, J/mol\n", + "Ltrans3 = 445.0 #Entalpy of transition at 54.39K, J/mol\n", + "Ltrans4 = 6815. #Entalpy of transition at 90.20K, J/mol\n", + "T1 = 12.97 #Maximum applicabliltiy temeprature for first heat capacity equation, K\n", + "T12 = 23.66 #Phase Change temperature from Solid III--II, K\n", + "T23 = 43.76 #Phase Change temperature from Solid II--I, K\n", + "T34 = 54.39 #Phase Change temperature from Solid I--liquid, K\n", + "T45 = 90.20 #Phase Change temperature from liquid--gas, K\n", + "Ts = 298.15 #Std. Temeprature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "dS1 = n*integrate( (D1*T**3)/T, (T,0,T1)) \n", + "dS2 = n*integrate( (A2 + B2*T + C2*T**2 + D2*T**3)/T, (T,T1,T12)) \n", + "dS21 = Ltrans1/T12\n", + "dS3 = n*integrate( (A3 + B3*T + C3*T**2 + D3*T**3)/T, (T,T12,T23)) \n", + "dS31 = Ltrans2/T23\n", + "dS4 = n*integrate( (A4)/T, (T,T23,T34)) \n", + "dS41 = Ltrans3/T34\n", + "dS5 = n*integrate( (A5 + B5*T + C5*T**2 + D5*T**3)/T, (T,T34,T45)) \n", + "dS51 = Ltrans4/T45\n", + "dS6 = n*integrate( (A6 + B6*T + C6*T**2 + D6*T**3)/T, (T,T45,Ts))\n", + "#print dS1+dS2,dS21\n", + "#print dS3, dS31\n", + "#print dS4, dS41\n", + "#print dS5, dS51\n", + "#print dS6\n", + "dS = dS1+dS2+dS21+dS3+dS31+dS4+dS41+dS5+dS51+dS6\n", + "\n", + "#Results\n", + "print 'Entropy change Sm0 for O2 is %4.1f J/(mol.K)'%dS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex5.10:pg-105" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Entropy change for reaction at 475 K is -88.26 J/(mol.K)\n" + ] + } + ], + "source": [ + "from sympy import integrate, symbols\n", + "from math import log\n", + "n = 1.0 #Number of moles of CO2 formed, mol\n", + "p = 1. #Pressure of CO2, K\n", + "\n", + "A1, B1, C1, D1 = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n", + " #Constants in constant pressure Heat capacity equation for CO2, J/(mol.K)\n", + "A2, B2, C2, D2 = 30.81,-1.187e-2,2.3968e-5, 0.0\n", + " #Constants in constant pressure Heat capacity equation for O2, J/(mol.K)\n", + "A3, B3, C3, D3 = 31.08,-1.452e-2,3.1415e-5 ,-1.4793e-8 \n", + " #Constants in constant pressure Heat capacity equation for CO, J/(mol.K)\n", + "DSr298CO = 197.67 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298CO2 = 213.74 #Std. Entropy change for CO, J/(mol.K)\n", + "DSr298O2 = 205.138 #Std. Entropy change for CO, J/(mol.K)\n", + "Tr = 475. #Reaction temperature, K\n", + "Ts = 298.15 #Std. temperature, K\n", + "#Calcualtions\n", + "T = symbols('T')\n", + "v1,v2,v3 = 1.,1./2,1.\n", + "DSr = DSr298CO2*v1 - DSr298CO*v1 - DSr298O2*v2\n", + "DA = v1*A1-v2*A2-v3*A3\n", + "DB = v1*B1-v2*B2-v3*B3\n", + "DC = v1*C1-v2*C2-v3*C3\n", + "DD = v1*D1-v2*D2-v3*D3\n", + "dS = DSr + n*integrate( (DA + DB*T + DC*T**2 + DD*T**3)/T, (T,Ts,Tr)) \n", + "\n", + "#Results\n", + "print 'Entropy change for reaction at %4d K is %4.2f J/(mol.K)'%(Tr,dS)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_p39uorO.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_p39uorO.ipynb new file mode 100644 index 00000000..2b5ef632 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_p39uorO.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Electrolyte Solutions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex10.2:Pg-252" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ionic streangth for NaCl solution is 0.050 and for Na2SO4 solution is 0.150, mol/kg\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "import math\n", + "M = 0.050 #Molarity for NaCl and Na2SO4 solution, mol/kg\n", + "npa, zpa = 1, 1\n", + "nma, zma = 1, 1\n", + "npb, zpb = 2, 1\n", + "nmb, zmb = 1, 2\n", + "\n", + "#Calculations\n", + "Ia = M*(npa*zpa**2 + nma*zma**2)/2\n", + "Ib = M*(npb*zpb**2 + nmb*zmb**2)/2\n", + "\n", + "#Results\n", + "print 'Ionic streangth for NaCl solution is %4.3f and for Na2SO4 solution is %4.3f, mol/kg'%(Ia,Ib)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pDWrAlY.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pDWrAlY.ipynb new file mode 100644 index 00000000..887d09f2 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pDWrAlY.ipynb @@ -0,0 +1,419 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Elementary Chemical Kinetics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.2:pg-461" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Order of reaction with respect to reactant A: 2.00\n", + "Order of reaction with respect to reactant A: 1.00\n", + "Rate constant of the reaction: 3.201e+08 1./(M.s)\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "Ca0 = [2.3e-4,4.6e-4,9.2e-4] #Initial Concentration of A, M\n", + "Cb0 = [3.1e-5,6.2e-5,6.2e-5] #Initial Concentration of B, M\n", + "Ri = [5.25e-4,4.2e-3,1.68e-2] #Initial rate of reaction, M\n", + "\n", + "#Calculations\n", + "alp = log(Ri[1]/Ri[2])/log(Ca0[1]/Ca0[2])\n", + "beta = (log(Ri[0]/Ri[1]) - 2*log((Ca0[0]/Ca0[1])))/(log(Cb0[0]/Cb0[1]))\n", + "k = Ri[2]/(Ca0[2]**2*Cb0[2]**beta)\n", + "\n", + "#REsults\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%alp\n", + "print 'Order of reaction with respect to reactant A: %3.2f'%beta\n", + "print 'Rate constant of the reaction: %4.3e 1./(M.s)'%k" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.3:pg-466" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 3.381e-05 1/s\n", + "Timerequire for 60 percent decay of N2O5: 1.511e+04 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 2.05e4 #Half life for first order decomposition of N2O5, s\n", + "x = 60. #percentage decay of N2O5\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.4:pg-467 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate constant of the reaction: 1.203e-04 1/s\n", + "Timerequire for 60 percent decay of N2O5: 4.245e+03 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "t1by2 = 5760 #Half life for C14, years\n", + "\n", + "\n", + "#Calculations\n", + "k = log(2)/t1by2\n", + "t = -log(x/100)/k\n", + "\n", + "#REsults\n", + "print 'Rate constant of the reaction: %4.3e 1/s'%k\n", + "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.5:pg-472" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time required for maximum concentration of A: 13.86 s\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "kAbykI = 2.0 #Ratio of rate constants\n", + "kA = 0.1 #First order rate constant for rxn 1, 1/s \n", + "kI = 0.05 #First order rate constant for rxn 2, 1/s \n", + "#Calculations\n", + "tmax = 1/(kA-kI)*log(kA/kI)\n", + "\n", + "#Results\n", + "print 'Time required for maximum concentration of A: %4.2f s'%tmax" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.7:pg-476" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: 6.67 \n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#Variable Declaration\n", + "T = 22.0 #Temperature of the reaction,°C\n", + "k1 = 7.0e-4 #Rate constants for rxn 1, 1/s\n", + "k2 = 4.1e-3 #Rate constant for rxn 2, 1/s \n", + "k3 = 5.7e-3 #Rate constant for rxn 3, 1/s \n", + "#Calculations\n", + "phiP1 = k1/(k1+k2+k3)\n", + "\n", + "#Results\n", + "print 'Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: %4.2f '%(phiP1*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.8:pg-477" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEWCAYAAADLkvgyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVNW1x/HvhgZnjIIKNCqTKCKCiIAYsCQhIlFQE0fU\naIyKs4JTjEjHNgkaRY04GzEOUaMhMWL02UZb4oAiCLYgogQ1gsPDCXwOiOz3xymkabuaBqrq3Kr6\nfdaqRdWtc+/dfVe5tufcc/cxd0dERCSmJrEDEBERUTISEZHolIxERCQ6JSMREYlOyUhERKJTMhIR\nkegSmYzM7HQze9XMasxsXIY2Q8xsrpnNM7Pz8x2jiIhkT1nsAOoysxRwANDd3ZebWat62jQBJgA/\nABYB08zsQXefm9dgRUQkK5LYMzoZGOfuywHcfXE9bfoAr7v7W+7+NXAvMDyPMYqISBYlMRl1AQaa\n2VQze9LMetfTphz4b63P76S3iYhIAYoyTGdmVcA2tTcBDlyUjmkLd+9nZnsAfwE65j9KERHJlyjJ\nyN0HZ/rOzEYCk9LtppnZCjNr6e4f1mq2ENiu1ud26W2ZjqkCfCIia8ndLV/nSuIw3d+BQQBm1gVo\nVicRAUwDOpvZ9mbWHDgc+EdDB3V3vbLwGjt2bPQYiuml66nrmdRXviUxGU0EOppZDfBn4BgAM2tj\nZpMB3P0b4DTgMWA2cK+7vxopXhERWU+Jm9rtYXbc0fVsfxfYv9bnR4Ed8xiaiIjkSBJ7RpJgqVQq\ndghFRdczu3Q9C5fFGBvMNzPzUvg7RUSyxczwEp/AICIiJUbJSEREolMyEhGR6JSMREQkOiUjERGJ\nTslIRESiUzISEZHolIxERCQ6JSMREYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR\n6JSMREQkOiUjERGJ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WVcL/z356ZjTazd83s\n6PTncjN71cxGNhDHNsCxNLL6skhSJXE9I5FEM7MtCAlgYIYmO7r742Z2KDDMw/pYBwOXu/s8M/vE\nVy3wVtt04FF3v9PMDOgP9HX3JZlicff3zWzm+v1FIvEpGYmsJXf/GLjKzA7I0GTlyqHzfNXCgl3c\nfV76/dwM+/UBnjez5sDBwF9r7Y+ZtQW6A07oCX3q7lNRr0iKgJKRSBalVxGdBuDuM9PbOhOqJJPe\nPivD7n2A6wmVkS/21VfIxd0XAYvqnG9roAswCLgrO3+FSP7pnpFIdu3u7tPrbOsDvNCIffcAWgIP\nEpY6WCN3/8DdR7i7EpEUNCUjkeyqb8isD2HtnMw7hYkIi9z9fsLCbsPT941ESoKSkci6Wy1ZpKdz\nv1ZPuz2o1TMys/b1tOlLWB0Td/+UsNDb4CzFKZJ4SkYia8nMNjGzs4CdzOwsM9s4/VUKqK7VroeZ\nnQPsChxsZlulJyE8Xud4/YFTgTZm1jZ9vI2BX5vZDrn/i0Ti00qvIlliZqe5+4RGtNvb3Z/KR0wi\nhUI9I5EsSFdAWNjI5hvkMhaRQqSekUgWpB9wnezun8eORaQQKRmJiEh0GqYTEZHolIxERCQ6JSMR\nEYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR6P4ffTyAN3dtCVsAAAAASUVORK5C\nYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9358710>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are, -6419.8 and 14.45\n", + "Pre-exponential factor and Activation energy are 53.37 kJ/mol and 1.88e+06 1/s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg,log, exp, size\n", + "from matplotlib.pylab import plot, show, xlabel, ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "T = array([22.7,27.2,33.7,38.0])\n", + "k1 = array([7.e-4,9.8e-4,1.6e-3,2.e-3])\n", + "R = 8.314 \n", + "\n", + "#Calculations\n", + "T = T +273.15\n", + "x = 1./T\n", + "y = log(k1)\n", + "A = array([ x, ones(size(x))])\n", + "# linearly generated sequence\n", + "[slope, intercept] = linalg.lstsq(A.T,y)[0] # obtaining the parameters\n", + "\n", + "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n", + "# plotting the line\n", + "line = slope*x+intercept # regression line\n", + "#Results\n", + "plot(x,line,'-',x,y,'o')\n", + "xlabel('$ 1/T, K^{-1} $')\n", + "ylabel('$ log(k) $')\n", + "show()\n", + "Ea = -slope*R\n", + "A = exp(intercept)\n", + "print 'Slope and intercept are, %6.1f and %4.2f'%(slope, intercept)\n", + "print 'Pre-exponential factor and Activation energy are %4.2f kJ/mol and %4.2e 1/s'%(Ea/1e3, A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.9:pg-482" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 4.34e+08 1/s\n", + "Backward Rate constant is 4.34e+04 1/s\n", + "Apperent Rate constant is 4.34e+08 1/s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "Ea = 42.e3 #Activation energy for reaction, J/mol\n", + "A = 1.e12 #Pre-exponential factor for reaction, 1/s\n", + "T = 298.0 #Temeprature, K\n", + "Kc = 1.0e4 #Equilibrium constant for reaction\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "#Calculations\n", + "kB = A*exp(-Ea/(R*T))\n", + "kA = kB*Kc\n", + "kApp = kA + kB\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%kA\n", + "print 'Backward Rate constant is %4.2e 1/s'%kB\n", + "print 'Apperent Rate constant is %4.2e 1/s'%kApp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.10:pg-492" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated rate 6.4e+13 1/(M.s) is far grater than experimental value of 4.0e+07 1/(M.s), \n", + "hence the reaction is not diffusion controlled\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Variable Declaration\n", + "Dh = 7.6e-7 #Diffusion coefficient of Hemoglobin, cm2/s\n", + "Do2 = 2.2e-5 #Diffusion coefficient of oxygen, cm2/s\n", + "rh = 35. #Radius of Hemoglobin, °A\n", + "ro2 = 2.0 #Radius of Oxygen, °A\n", + "k = 4e7 #Rate constant for binding of O2 to Hemoglobin, 1/(M.s)\n", + "NA =6.022e23 #Avagadro Number\n", + "#Calculations\n", + "DA = Dh + Do2\n", + "kd = 4*pi*NA*(rh+ro2)*1e-8*DA\n", + "\n", + "#Results\n", + "print 'Estimated rate %4.1e 1/(M.s) is far grater than experimental value of %4.1e 1/(M.s), \\nhence the reaction is not diffusion controlled'%(kd,k)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex18.11:pg-494" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forward Rate constant is 9.90e+04 1/s\n", + "Backward Rate constant is -12.72 1/s\n" + ] + } + ], + "source": [ + "from math import log, e\n", + "#Variable Declaration\n", + "Ea = 104e3 #Activation energy for reaction, J/mol\n", + "A = 1.e13 #Pre-exponential factor for reaction, 1/s\n", + "T = 300.0 #Temeprature, K\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "h = 6.626e-34 #Plnak constant, Js\n", + "c = 1.0 #Std. State concentration, M\n", + "k = 1.38e-23 #,J/K\n", + "\n", + "#Calculations\n", + "dH = Ea - 2*R*T\n", + "dS = R*log(A*h*c/(k*T*e**2))\n", + "\n", + "#Results\n", + "print 'Forward Rate constant is %4.2e 1/s'%dH\n", + "print 'Backward Rate constant is %4.2f 1/s'%dS" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pFmGzk0.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pFmGzk0.ipynb new file mode 100644 index 00000000..81a699eb --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pFmGzk0.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Complex Reaction Mechanism " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.1:pg-511" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEQCAYAAACTEVJTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1VW9//HXGxQvGKaVKKg4oih4Q8Jbao6kqJ3yUh5F\nK6VDHhUUL13E+hF4SFPLJDW7mIXXSK28pCEYZywTFAQEARERFAYBFcXEGzCf3x/rC2w5Mzgz7D3f\nPTPv5+MxD/as+X73fu8B5jNrre93LUUEZmZmxdIm7wBmZtayuLCYmVlRubCYmVlRubCYmVlRubCY\nmVlRubCYmVlRbZZ3gHIgyddcm5k1UESotnb3WDIRUZYfw4YNyz1Dc8xW7vmcrWXmK+dsxc63MS4s\nZmZWVC4sZmZWVC4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39\nY/fWiIhlEfG1iHBRsaJxYTFrmBrSdrnrSNpC0tHZ430lnS7pKEnflbS3pP0kHSupt6TzsuN6Z8d8\nr64XiogngK4RMSnbzOz1SNtDH0I22S6pA7CcVFi6AIdmw1sHU/oNr8xq5cJi1jB/Aw7doO10oEpS\nZ9KE/h8j4nFgAfA28B8RMS7SdrttJe0HfBaYCHw628URSbsVPqmkLYH3sk97s34O5z+AxyUdkLU/\nE2mL4d2Bd7JjXFgsNy4sZg0QEXOAX0i6TtIASWeQdogMYCBp1761x94LnAOMLniKCuCdiPg1sApo\nGxErs4n1xzZ4uX2Bf2SP9wP+N3u8gLQV87bAj4EvZ+1PRMS07PLjnsCRxXjPZg3lHSTNikTSlcBV\nWaFoC+xF2mP8hxHxgaTts8cXZ8efQdoqdkVErJZ0VNbTMWvWXFjMiiQbCjuBtH84EfGvbHjrYOBl\nUqH5Y1Zkzib1KGqA8yKiRlLfiBibS3izInJhMTOzovIci5mZFZULi5mZFZULi5mZFZULi5mZFZUL\ni5mZFZULi5mZFZULi5mZFZULi5mZFZULi5mZFdX/B8J/v5b87GuOAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9aa4048>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Km and k2 are 10.0 mM and 1.1e+05 s-1\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "from numpy import arange,array,ones,linalg,size\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ce = 2.3e-9 #Initial value of enzyme concentration, M\n", + "r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])\n", + "CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])\n", + "\n", + "#Calculations\n", + "rinv = 1./r\n", + "CCO2inv = 1./CCO2\n", + "xlim(0,850)\n", + "ylim(0,38000)\n", + "xi = CCO2inv\n", + "A = array([ CCO2inv, ones(size(CCO2inv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters\n", + "slope = w[0]\n", + "intercept = w[1]\n", + "\n", + "line = w[0]*CCO2inv+w[1] # regression line\n", + "plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')\n", + "xlabel('$ {C_{CO}}_2, mM^{-1} $')\n", + "ylabel('$ Rate^{-1}, s/M^{-1} $')\n", + "show()\n", + "rmax = 1./intercept\n", + "k2 = rmax/Ce\n", + "Km = slope*rmax\n", + "\n", + "#Results\n", + "print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.2:pg-517" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH11JREFUeJzt3Xl4VdW5x/HvGwQH2jrUOhCEplEBrViqRlqnoFKnKk6t\nxaJFRa0KVXHAKQ3ctF5HtIqtYq3cXrXcVm8pV8WSWtMWKYooqJgwpigJ1aJCBSdM3vvHOsghJuTk\nZOfsM/w+z5MnZ5+z98mbTcIve6291jJ3R0REJApFcRcgIiL5Q6EiIiKRUaiIiEhkFCoiIhIZhYqI\niERGoSIiIpGJLVTM7FgzqzOzxWY2rpXXzzSzBYmPWWY2MNVjRUQkHhbHOBUzKwIWA0cBjcBc4Hvu\nXpe0z2Cg1t3XmtmxwHh3H5zKsSIiEo+4rlTKgCXuvsLdNwBTgWHJO7j7HHdfm9icAxSneqyIiMQj\nrlApBt5I2l7JptBozShgRprHiohIhmwVdwHtMbMhwDnAoXHXIiIiWxZXqDQAfZK2eyee20yic34y\ncKy7v9uRYxPHa2IzEZE0uLulc1xczV9zgT3NrK+Z9QC+B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8O8zsxDZ2aWqxfTDwYtJ2b2BR0vbixOp6\nAHu7++LE47p0a0wsJrUfYdJDA9a6+xx0lSIxU6iIdEBiCvC5LZ4uA/6QeH03wgp6Uze+6O7zE6/t\nSVgXfOPzC8zsBGDnxMeTwBeBbwM7ANsD9yR23+y5xJonjS1q24WwiNKRwEOd/25FOk6hItIxBySW\nmk02CChNhMbngeNbrPm+URnw/MYNM9sbGOHuwxNLtV4M3A28B/wZ+Iu7f5S4KWCz51orzN3fAr7f\nuW9PpHMUKiIds1nzkpl9BVjh7o+lcGwZ8HTS9g+ARxKP+wDvJvpaDiT0u2wAcPdFLZ8TyVa6+0uk\nbS0DpB+b95VA6E959jMHmn25lfc7iKQrFaAHsCLx+DuEdeEBerQSHq09J5J1FCoiLZhZTzO7DOhv\nZpeZ2XaJl8qBmqT9DgcuAHZJ9GdsfL4X8Kek7f3N7EpgIHCqmX0p8dL9wDGJFRcfdfclZtaXzTv9\nae05kWyllR9FUmRmo919Uvt7gpkd4e5/6eqaRLKNrlREUpAYpd7QgUO27qpaRLKZrlREUmBm3wUe\nb+OuLhFJUKiIiEhk1PwlIiKRUaiIiEhkFCoiIhIZhYqIiERGoSIiIpFRqIiISGQUKiIiEhmFioiI\nREahIiIikfl//rBLh3QxZCwAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x9acd4a8>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3\n", + "K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K\n", + "P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr\n", + "\n", + "#Calculations\n", + "Vinv = 1./Vads\n", + "Pinv =1./P\n", + "xlim(0,0.5)\n", + "ylim(0,0.2)\n", + "A = array([ Pinv, ones(size(Pinv))])\n", + "# linearly generated sequence\n", + "w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters\n", + "m = w[0]\n", + "c = w[1]\n", + "line = m*Pinv+c # regression line\n", + "plot(Pinv,line,'r-',Pinv,Vinv,'o')\n", + "xlabel('$ 1/P, Torr^{-1} $')\n", + "ylabel('$ 1/V_{abs}, cm^{-1}g $')\n", + "show()\n", + "Vm = 1./c\n", + "K = 1./(m*Vm)\n", + "\n", + "#Results\n", + "print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)\n", + "print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.4:pg-533" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFRJREFUeJzt3XuUXHWV6PHvjvgMDioIToKGJoBwQURACIjQqIwEVBjH\npaKo8UGiCPhARLm0CZO7RgGvIg9FBUVwIjg+eCgK4dFABBQTwiOIkNiGkEBUEJBGckOy7x+nmhSh\n0+mudNWpx/ezVi+qq86p2j/S6Z39+/3O2ZGZSJJUizFlByBJal0mEUlSzUwikqSamUQkSTUziUiS\namYSkSTVrKWTSEScGxHLI+L2YRz7tYi4NSLmRcQfI+LhRsQoSe0sWvk6kYjYB3gcOD8zdx7BeUcB\nu2Tmx+oWnCR1gJauRDJzDvD36uciYuuI+FVE3BIR10XEdoOcehjwo4YEKUltbKOyA6iD7wDTMnNR\nROwBfAt488CLEfEq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JJUM5OIJKlmJhFJUs1MIpKkmplEJEk1a4Z7Z0mli4jPU9wx\n+FSKW0IcBByTmfcN8/xXAJ+kuEfbo8A/gBdn5vnDPP8TFLfq6cqqexRFxEXAE8DJmXn38EckNYZJ\nRCr8DtgkM88FiIiJFP0VzljfiRGxNfBt4D2Z+XDlubOo3MRumG6huBHjBOChynu8DtgYOCEzF43g\nvaSGcTpLKuwJzAGIiM2AvYFLh3nuBRTdFx+uem4eRWIYrgnADTzzzqobU9xXywSipmUlIhVeDyyM\niMnA4cDHgVdWppleAmwCnJWZc6pPioi9KKatrlnr/S7MzP4RfH5Q3IJ7QtX79lFeCwNpWEwiUmHT\nzPwpQET8EfghRdfBf1D0sb8uM1dExEuBtwErMvPHwF7AdWu/WWb2D3Ls+iwB9omIjSiaqO1CMc0m\nNS2ns9TxImIcz/wX/9+AHTPzHmB34NrMXFF57ViKftQvqHy/GnhGxRERz4+IN1Ud+8L1fP6/AA9T\nJJEJwKTMvJmiD7ZJRE3NJCIVv6znVX1/BEXPD4DnZ+bKqte2A15LsV4BRf/3SWu937uB3qpjxw68\nEBFbDfL5uwNzs+iYtzXweFVcJhE1NZOIOlpEdFOsf2wXEUdGxJcofpEfFRETgLlrnfJAZv4eeEVE\nbJyZfwTOioj/GxEfjYjDgMsyc/Xax1YqnqvW+vw3AF8G3l55ak5mzq+sxewCvLE+I5dGh02ppBGI\niD0pqpDx67sGZLBjI2K/zHzWGorUqlxYl0YgM3+7gcc+fxTDkUpnJSJJqplrIpKkmplEJEk1M4lI\nkmpmEpEk1cwkIkmqmUlEklQzk4gkqWYmEUlSzf4/9Fa7EFJttIoAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0xa641f28>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s\n" + ] + } + ], + "source": [ + "from numpy import arange,array,ones,linalg\n", + "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n", + "%matplotlib inline\n", + "import math\n", + "\n", + "#Variable declaration\n", + "CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M\n", + "tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s\n", + "\n", + "#Calculations\n", + "Tfinv = 1./tf\n", + "xlim(0,0.006)\n", + "ylim(0,2.e7)\n", + "A = array([ CBr, ones(size(CBr))])\n", + "# linearly generated sequence\n", + "[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters\n", + "\n", + "line = m*CBr+c # regression line\n", + "plot(CBr,line,'r-',CBr,Tfinv,'o')\n", + "xlabel('$ Br_6C_6, M $')\n", + "ylabel('$ tau_f $')\n", + "show()\n", + "\n", + "#Results\n", + "print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.5:pg-536" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Separation Distance at decreased efficiency 11.53\n" + ] + } + ], + "source": [ + "from scipy.optimize import root\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = 11. #Distance of residue separation, °A\n", + "r0 = 9. #Initial Distance of residue separation, °A\n", + "EffD = 0.2 #Fraction decrease in eff\n", + "\n", + "#Calculations\n", + "Effi = r0**6/(r0**6+r**6)\n", + "Eff = Effi*(1-EffD)\n", + "f = lambda r: r0**6/(r0**6+r**6) - Eff\n", + "sol = root(f, 12)\n", + "rn = sol.x[0]\n", + "\n", + "#Results\n", + "print 'Separation Distance at decreased efficiency %4.2f'%rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.6:pg-538" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total photon energy absorbed by sample 2.7e+03 J\n", + "Photon energy absorbed at 280 nm is 7.1e-19 J\n", + "Total number of photon absorbed by sample 3.8e+21 photones\n", + "Overall quantum yield 0.40\n" + ] + } + ], + "source": [ + "#Variable Declarations\n", + "import math\n", + "mr = 2.5e-3 #Moles reacted, mol\n", + "P = 100.0 #Irradiation Power, J/s\n", + "t = 27 #Time of irradiation, s\n", + "h = 6.626e-34 #Planks constant, Js\n", + "c = 3.0e8 #Speed of light, m/s\n", + "labda = 280e-9 #Wavelength of light, m\n", + "\n", + "#Calculation\n", + "Eabs = P*t\n", + "Eph = h*c/labda\n", + "nph = Eabs/Eph #moles of photone\n", + "phi = mr/6.31e-3\n", + "\n", + "#Results\n", + "print 'Total photon energy absorbed by sample %3.1e J'%Eabs\n", + "print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph\n", + "print 'Total number of photon absorbed by sample %3.1e photones'%nph\n", + "print 'Overall quantum yield %4.2f'%phi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex19.7:pg-542" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DGS = 0.111 eV\n", + "Rate constant with barrier to electron transfer 2.66e+07 per s\n" + ] + } + ], + "source": [ + "from math import exp\n", + "#Variable Declarations\n", + "r = 2.0e9 #Rate constant for electron transfer, per s\n", + "labda = 1.2 #Gibss energy change, eV\n", + "DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "T = 298.0 #Temeprature, K\n", + "#Calculation\n", + "DGS = (DG+labda)**2/(4*labda)\n", + "k193 = r*exp(-DGS*1.6e-19/(k*T))\n", + "#Results\n", + "print 'DGS = %5.3f eV'%DGS\n", + "print 'Rate constant with barrier to electron transfer %3.2e per s'%k193" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pYROsHW.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pYROsHW.ipynb new file mode 100644 index 00000000..351d347c --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pYROsHW.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Importance of State Functions: Internal Energy and Enthalpy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.2:pg-49" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure increase in capillary 100.0 bar\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "betaOH = 11.2e-4 #Thermal exapnasion coefficient of ethanol, °C\n", + "betagl = 2.00e-5 #Thermal exapnasion coefficient of glass, °C\n", + "kOH = 11.0e-5 #Isothermal compressibility of ethanol, /bar\n", + "dT = 10.0 #Increase in Temperature, °C\n", + "\n", + "#Calcualtions\n", + "vfbyvi = (1+ betagl*dT)\n", + "dP = betaOH*dT/kOH-(1./kOH)*log(vfbyvi)\n", + "\n", + "#Results\n", + "print 'Pressure increase in capillary %4.1f bar'%dP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.4:pg-53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum detectable temperature change of gas +- 6.0 °C\n" + ] + } + ], + "source": [ + "import math\n", + "cpsubysy = 1000 #Specific heat ration of surrounding and system\n", + "Tpreci = 0.006 #Precision in Temperature measurement, °C\n", + "\n", + "#Calcualtions\n", + "dtgas = -cpsubysy*(-Tpreci)\n", + "\n", + "#Results\n", + "print 'Minimum detectable temperature change of gas +-%4.1f °C'%dtgas" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.6:pg-54" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dUT = 24.4 J: This is wrongly reported in book\n", + "dUV = 4174.1 J\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "\n", + "n = 1.0 #number of mole of N2, mol \n", + "Ti = 200.0 #Intial Temperature, K\n", + "Pi = 5.00 #Initial pressure, bar\n", + "Tf = 400.0 #Intial Temperature, K\n", + "Pf = 20.0 #Initial pressure, bar\n", + "a = 0.137 #van der Waals constant a, Pa.m3/(mol2)\n", + "b = 3.87e-5 #van der Waals constant b, m3/(mol)\n", + "A, B, C, D = 22.5, -1.187e-2,2.3968e-5, -1.0176e-8\n", + " #Constants in Cvm equation J, K and mol\n", + "vi = 3.28e-3 #initial volume, m3/mol\n", + "vf = 7.88e-3 #Final volume, m3/mol\n", + "\n", + "#Calculations\n", + "T = symbols('T')\n", + "dUT = n**2*a*(1./vi-1./vf)\n", + "dUV = integrate( A + B*T + C*T**2 + D*T**3, (T,Ti,Tf))\n", + "\n", + "#Results\n", + "print 'dUT = %4.1f J: This is wrongly reported in book'%dUT\n", + "print 'dUV = %4.1f J'%dUV" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.7:pg-57" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dH = 46.8 kJ\n", + "qp = 30.8 kJ\n", + "Error in calculations 34.3\n" + ] + } + ], + "source": [ + "from sympy import symbols, integrate\n", + "\n", + "import math\n", + "m = 143.0 #Mass of graphite, g \n", + "Ti = 300.0 #Intial Temperature, K\n", + "Tf = 600.0 #Intial Temperature, K\n", + "A, B, C, D, E = -12.19,0.1126,-1.947e-4,1.919e-7,-7.8e-11\n", + " #Constants in Cvm equation J, K and mol\n", + "M = 12.01\n", + "\n", + "#Calculations\n", + "\n", + "T = symbols('T')\n", + "dH = (m/M)*integrate( A + B*T + C*T**2 + D*T**3 + E*T**4, (T,Ti,Tf))\n", + "expr = A + B*T + C*T**2 + D*T**3 + E*T**4\n", + "cpm = expr.subs(T,300.)\n", + "qp = (m/M)*cpm*(Tf-Ti)\n", + "err = abs(dH-qp)/dH\n", + "#Results\n", + "print 'dH = %6.1f kJ'%(dH/1000)\n", + "print 'qp = %6.1f kJ'%(qp/1000)\n", + "print 'Error in calculations %4.1f'%(err*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex3.9:pg-59" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enthalpy change for change in state of methanol is 39.9 kJ\n" + ] + } + ], + "source": [ + "import math\n", + "m = 124.0 #Mass of liquid methanol, g\n", + "Pi = 1.0 #Initial Pressure, bar\n", + "Ti = 298.0 #Intial Temperature, K\n", + "Pf = 2.5 #Final Pressure, bar\n", + "Tf = 425.0 #Intial Temperature, K\n", + "rho = 0.791 #Density, g/cc\n", + "Cpm = 81.1 #Specifi heat, J/(K.mol)\n", + "M = 32.04\n", + "\n", + "#Calculations\n", + "n = m/M\n", + "DH = n*Cpm*(Tf-Ti)+ m*(Pf-Pi)*1e-6/rho\n", + "\n", + "#Results\n", + "print 'Enthalpy change for change in state of methanol is %4.1f kJ'%(DH/1000)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pmrshQK.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pmrshQK.ipynb new file mode 100644 index 00000000..cfc07351 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_pmrshQK.ipynb @@ -0,0 +1,287 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Kinetic Theory of Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.1:pg-407" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Most probable speed of Ne and Krypton at 298 K are 498, 244 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "MNe = 0.020 #Molecular wt of Ne, kg/mol\n", + "MKr = 0.083 #Molecular wt of Kr, kg/mol\n", + "\n", + "#Calculations\n", + "vmpNe = sqrt(2*R*T/MNe)\n", + "vmpKr = sqrt(2*R*T/MKr)\n", + "\n", + "#Results\n", + "print 'Most probable speed of Ne and Krypton at 298 K are %4.0f, %4.0f m/s'%(vmpNe,vmpKr)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.2:pg-411" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum, average, root mean square speed of Ar\n", + "at 298 K are 352, 397, 431 m/s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperatureof Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "\n", + "\n", + "#Calculations\n", + "vmp = sqrt(2*R*T/M)\n", + "vave = sqrt(8*R*T/(M*pi))\n", + "vrms = sqrt(3*R*T/M)\n", + "\n", + "#Results\n", + "print 'Maximum, average, root mean square speed of Ar\\nat 298 K are %4.0f, %4.0f, %4.0f m/s'%(vmp,vave,vrms)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.4, Page Numbe 413" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Collisions 2.45e+27 per s\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "\n", + "#Calculations\n", + "Zc = P*NA/sqrt(2*pi*R*T*M)\n", + "Nc = Zc*V \n", + "#Results\n", + "print 'Number of Collisions %4.2e per s'%(Nc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.5:pg-414" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure after 1 hr of effusion is 9.996e-03 Pa\n" + ] + } + ], + "source": [ + "from math import sqrt, pi,exp\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.040 #Molecular wt of Ar, kg/mol\n", + "P0 = 1013.25 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "V = 1.0 #Volume of Container, L\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "t = 3600 #time of effusion, s\n", + "A = 0.01 #Area, um2\n", + "\n", + "#Calculations\n", + "A = A*1e-12\n", + "V = V*1e-3\n", + "expo = (A*t/V)*(k*T/(2*pi*M/NA))\n", + "P = P0*exp(-expo)\n", + "#Results\n", + "print 'Pressure after 1 hr of effusion is %4.3e Pa'%(P/101325)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.6:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Single particle collisional frequency is 6.9e+09 per s\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "M = 0.044 #Molecular wt of CO2, kg/mol\n", + "P = 101325 #Pressure, N/m2\n", + "NA = 6.022e23 #Number of particles per mol\n", + "sigm = 5.2e-19 #m2\n", + "\n", + "#Calculations\n", + "zCO2 = (P*NA/(R*T))*sigm*sqrt(2)*sqrt(8*R*T/(pi*M)) \n", + "#Results\n", + "print 'Single particle collisional frequency is %4.1e per s'%(zCO2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex16.7:pg-417" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collisional frequency is 3.14e+34 m-3s-1\n" + ] + } + ], + "source": [ + "from math import sqrt, pi\n", + "\n", + "#Variable Declaration\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "T = 298 #Temperature of Gas, K\n", + "MAr = 0.04 #Molecular wt of Ar, kg/mol\n", + "MKr = 0.084 #Molecular wt of Kr, kg/mol\n", + "pAr = 360 #Partial Pressure Ar, torr\n", + "pKr = 400 #Partial Pressure Kr, torr\n", + "rAr = 0.17e-9 #Hard sphere radius of Ar, m\n", + "rKr = 0.20e-9 #Hard sphere radius of Kr, m\n", + "NA = 6.022e23 #Number of particles per mol\n", + "k = 1.38e-23 #Boltzmann constant, J/K\n", + "\n", + "#Calculations\n", + "pAr = pAr*101325/760\n", + "pKr = pKr*101325/760\n", + "p1 = pAr*NA/(R*T)\n", + "p2 = pKr*NA/(R*T)\n", + "sigm = pi*(rAr+rKr)**2\n", + "mu = MAr*MKr/((MAr+MKr)*NA)\n", + "p3 = sqrt(8*k*T/(pi*mu)) \n", + "zArKr = p1*p2*sigm*p3\n", + "\n", + "#Results\n", + "print 'Collisional frequency is %4.2e m-3s-1'%(zArKr)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_rZBRh0H.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_rZBRh0H.ipynb new file mode 100644 index 00000000..bb478dec --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_rZBRh0H.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 07: Properties of Real Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex7.3:pg-175" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(V-Videal) -6.49 L\n", + "Percentage error -58.73\n" + ] + } + ], + "source": [ + "\n", + "import math\n", + "m = 1.0 #Mass of Methane, kg\n", + "T = 230 #Temeprature of Methane, K\n", + "P = 68.0 #Pressure, bar \n", + "Tc = 190.56 #Critical Temeprature of Methane\n", + "Pc = 45.99 #Critical Pressure of Methane\n", + "R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n", + "M = 16.04 #Molecular wt of Methane\n", + "\n", + "#Calcualtions\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "z = 0.63 #Methane compressibility factor\n", + "n = m*1e3/M\n", + "V = z*n*R*T/P\n", + "Vig = n*R*T/P\n", + "DV = (V - Vig)/V\n", + "\n", + "#Results\n", + "print '(V-Videal) %4.2f L'%(V-Vig)\n", + "print 'Percentage error %5.2f'%(DV*100)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_uhvyTbu.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_uhvyTbu.ipynb new file mode 100644 index 00000000..7f1b328b --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_uhvyTbu.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Electrochemical Cells, Batteries, and Fuel Cells" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.1:pg-265" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The potential of H+/H2 half cell 0.0083 V\n" + ] + } + ], + "source": [ + "from math import log, sqrt\n", + "\n", + "#Variable Declaration\n", + "aH = 0.770 #Activity of \n", + "fH2 = 1.13 #Fugacity of Hydrogen gas\n", + "E0 = 0.0 #Std. electrode potential, V\n", + "n = 1.0 #Number of electrons transfered\n", + "\n", + "#Calculations\n", + "E = E0 - (0.05916/n)*log(aH/sqrt(fH2),10)\n", + "\n", + "#Results\n", + "print 'The potential of H+/H2 half cell %5.4f V'%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.2:pg-266" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.689 1.019\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E0r1 = -0.877 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s) \n", + "E0r2 = -1.660 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s)\n", + "E0r3 = +0.071 #Std Electrod potential for Rx3 : AgBr (s) + e- ------> Ag(s) +Br- (aq.)\n", + "\n", + "#Calculations\n", + "#3Fe(OH)2 (s)+ 2Al (s) <---------> 3Fe (s) + 6(OH-) + 2Al3+\n", + "E0a = 3*E0r1 + (-2)*E0r2\n", + "#Fe (s) + 2OH- + 2AgBr (s) -------> Fe(OH)2 (s) + 2Ag(s) + 2Br- (aq.)\n", + "E0b = -E0r1 + (2)*E0r3\n", + "\n", + "#Results\n", + "print '%5.3f %5.3f'%(E0a,E0b)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.3:pg-267" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E0 for overall reaction is -0.041 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = 0.771 #Rx1 : Fe3+ + e- -----> Fe2+\n", + "E02 = -0.447 #Rx2 : Fe2+ + 2e- -----> Fe\n", + "F = 96485 #Faraday constant, C/mol\n", + "n1,n2,n3 = 1.,2.,3.\n", + "\n", + "#Calculations\n", + "dG01 = -n1*F*E01\n", + "dG02 = -n2*F*E02\n", + " #For overall reaction\n", + "dG0 = dG01 + dG02\n", + "E0Fe3byFe = -dG0/(n3*F)\n", + "\n", + "#Results\n", + "print 'E0 for overall reaction is %5.3f V'%(E0Fe3byFe)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.4:pg-268" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Std. entropy change of reaction from dE0bydT is -2.32e+02 and\n", + "Std entropy values is -2.41e+02 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E01 = +1.36 #Std. electrode potential for Cl2/Cl\n", + "dE0bydT = -1.20e-3 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "S0H = 0.0 #Std. entropy J/(K.mol) for H+ ,Cl-,H2, Cl2 \n", + "S0Cl = 56.5\n", + "S0H2 = 130.7\n", + "S0Cl2 = 223.1\n", + "nH, nCl, nH2, nCl2 = 2, 2, -1,-1\n", + "#Calculations\n", + "dS01 = n*F*dE0bydT\n", + "dS02 =nH*S0H + nCl*S0Cl + nH2*S0H2 + nCl2*S0Cl2\n", + "\n", + "#Results\n", + "print 'Std. entropy change of reaction from dE0bydT is %4.2e and\\nStd entropy values is %4.2e V'%(dS01,dS02)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.5:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.55e+37\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "E0 = +1.10 #Std. electrode potential for Danniel cell, V\n", + " #Zn(s) + Cu++ -----> Zn2+ + Cu\n", + "T = 298.15 #V/K\n", + "F = 96485 #Faraday constant, C/mol\n", + "n = 2.\n", + "R = 8.314 #Gas constant, J/(mol.K)\n", + "\n", + "#Calculations\n", + "K = exp(n*F*E0/(R*T))\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(K)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.6:pg-269" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium constant for reaction is 1.57e-10\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +0.29 #Cell emf, V\n", + "n = 2.\n", + "\n", + "#Calculations\n", + "Ksp = 10**(-n*E/0.05916)\n", + "\n", + "#Results\n", + "print 'Equilibrium constant for reaction is %4.2e'%(Ksp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex11.8:pg-272" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cell potentials for Zn, Ag, Au are 2.27 V, 0.71 V, and -0.18 V\n", + "Zn has positive cell potential of 2.272 V and Can be oxidized bypermangnate ion\n", + "Ag has positive cell potential of 0.710 V and Can be oxidized bypermangnate ion\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "E = +1.51 #EMF for reduction of permangnet, V\n", + "E01 = -0.7618 #Zn2+ + 2e- --------> Zn (s)\n", + "E02 = +0.7996 #Ag+ + e- --------> Ag (s)\n", + "E03 = +1.6920 #Au+ + e- --------> Au (s) \n", + "\n", + "#Calculations\n", + "EZn = E - E01\n", + "EAg = E - E02\n", + "EAu = E - E03\n", + "animals = {\"parrot\": 2, \"fish\": 6}\n", + "Er = {\"Zn\":EZn,\"Ag\":EAg,\"Au\":EAu}\n", + "#Results\n", + "print 'Cell potentials for Zn, Ag, Au are %4.2f V, %4.2f V, and %4.2f V'%(EZn, EAg,EAu)\n", + "for i in Er:\n", + " if Er[i] >0.0:\n", + " print '%s has positive cell potential of %4.3f V and Can be oxidized bypermangnate ion' %(i,Er[i])\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_wQuh21z.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_wQuh21z.ipynb new file mode 100644 index 00000000..430c21a8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_wQuh21z.ipynb @@ -0,0 +1,484 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Probability" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.1:pg-295" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of picking up any one ball is 1.0\n" + ] + } + ], + "source": [ + "import math\n", + "#Varible declaration\n", + "n = range(1,51,1)\n", + "Prob = 0\n", + "for x in n:\n", + " Prob = 1./len(n) + Prob\n", + "\n", + "#Results\n", + "print 'Probability of picking up any one ball is %3.1f'%Prob" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.2:pg-296" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of one (heart)card picked from a std. stack of 52 cards is 1/4\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "import math\n", + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "nheart = 13 #Number of cards with hearts\n", + "\n", + "#Calculations\n", + "Pe = Fraction(nheart,n)\n", + "\n", + "#Results\n", + "print 'Probability of one (heart)card picked from a std. stack of %d cards is'%n,Pe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.3:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of Five card arrangment from a deck of 52 cards is 311875200\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "import math\n", + "#Calculations\n", + "TotalM = n*(n-1)*(n-2)*(n-3)*(n-4)\n", + "#Results\n", + "print 'Total number of Five card arrangment from a deck of 52 cards is %d'%TotalM" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.4:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Possible spin states for excited state are 4\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "n1 = 2 #Two spin states for 1st electron in orbit 1\n", + "n2 = 2 #Two spin states for 2nd electron in orbit 2\n", + "\n", + "#Calculation\n", + "M = n1*n1\n", + "\n", + "#Results\n", + "print 'Possible spin states for excited state are %2d'%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.5:pg-298" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible permutations for 5 player to play are 95040\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 12 #Total Number of players \n", + "j = 5 #Number player those can play match\n", + "\n", + "#Calculation\n", + "P = factorial(n)/factorial(n-j)\n", + "\n", + "#Results\n", + "print 'Maximum Possible permutations for 5 player to play are %8d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.6:pg-299" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible 5-card combinations are 2598960\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 52 #Number of cards in std . pack\n", + "j = 5 #Number of cards in subset\n", + "\n", + "#Calculation\n", + "C = factorial(n)/(factorial(j)*factorial(n-j))\n", + "\n", + "#Results\n", + "print 'Maximum Possible 5-card combinations are %8d'%C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.7:pg-300" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of quantum states are 15\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "x = 6 #Number of electrons\n", + "n = 2 #Number of states\n", + "\n", + "#Calculation\n", + "P = factorial(x)/(factorial(n)*factorial(x-n))\n", + "\n", + "#Results\n", + "print 'Total number of quantum states are %3d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.8:pg-301" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of getting 25 head out of 50 tossing is 0.112\n", + "Probability of getting 10 head out of 50 tossing is 9.124e-06\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "n = 50 #Number of separate experiments\n", + "j1 = 25 #Number of sucessful expt with heads up\n", + "j2 = 10 #Number of sucessful expt with heads up\n", + "\n", + "#Calculation\n", + "C25 = factorial(n)/(factorial(j1)*factorial(n-j1))\n", + "PE25 = Fraction(1,2)**j1\n", + "PEC25 = (1-Fraction(1,2))**(n-j1)\n", + "P25 = C25*PE25*PEC25\n", + "\n", + "C10 = factorial(n)/(factorial(j2)*factorial(n-j2))\n", + "PE10 = Fraction(1,2)**j2\n", + "PEC10 = (1-Fraction(1,2))**(n-j2)\n", + "P10 = C10*PE10*PEC10\n", + "\n", + "#Results\n", + "print 'Probability of getting 25 head out of 50 tossing is %4.3f'%(float(P25))\n", + "print 'Probability of getting 10 head out of 50 tossing is %4.3e'%(float(P10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.9:pg-302" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " N ln(N!) ln(N!)sterling Error\n", + " 10 15.10 13.03 2.08\n", + " 50 148.48 145.60 2.88\n", + "100 363.74 360.52 3.22\n" + ] + } + ], + "source": [ + "from math import factorial, log\n", + "#Variable Declaration\n", + "N = [10,50,100] #Valures for N\n", + "\n", + "#Calculations\n", + "print ' N ln(N!) ln(N!)sterling Error'\n", + "for i in N:\n", + " lnN = log(factorial(i))\n", + " lnNs = i*log(i)-i\n", + " err = abs(lnN-lnNs)\n", + " print '%3d %5.2f %5.2f %4.2f'%(i,lnN,lnNs, err)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.10:pg-305" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of receiving any card 1/52\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "fi = 1 #Probability of receiving any card\n", + "n = 52 #Number od Cards\n", + "\n", + "#Calculations\n", + "sum = 0\n", + "for i in range(52):\n", + " sum = sum + fi\n", + "\n", + "Pxi = Fraction(fi,sum)\n", + "\n", + "#Results\n", + "print 'Probability of receiving any card', Pxi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.11:pg-307" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of Px considering it as discrete function 20.4\n", + "Sum of Px considering it as contineous function 19.9\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from scipy import integrate\n", + "#Variable Declaration\n", + "\n", + "#Calculations\n", + "fun = lambda x: exp(-0.05*x)\n", + "Pt = 0\n", + "for i in range(0,101):\n", + " Pt = Pt + fun(i)\n", + " \n", + "Ptot = integrate.quad(fun, 0.0, 100.)\n", + "\n", + "#Results\n", + "print 'Sum of Px considering it as discrete function %4.1f'%Pt\n", + "print 'Sum of Px considering it as contineous function %4.1f'%Ptot[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.12:pg-308" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from sympy import Symbol\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = Symbol('r') #Radius of inner circle\n", + "C = [5,2,0]\n", + "#Calculations\n", + "A1 = pi*r**2\n", + "A2 = pi*(2*r)**2 - A1\n", + "A3 = pi*(3*r)**2 - (A1 + A2)\n", + "At = A1 + A2 + A3\n", + "f1 = A1/At\n", + "f2 = A2/At\n", + "f3 = A3/At\n", + "sf = f1 + f2 + f3\n", + "\n", + "ns = (f1*C[0]+f2*C[1]+f3*C[2])/sf\n", + "\n", + "#Results\n", + "print 'A1, A2, A3: ', A1,', ', A2,', ', A3\n", + "print 'f1, f2, f3: ', f1,f2,f3\n", + "print 'Average payout $', round(float(ns),2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xaYpfMh.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xaYpfMh.ipynb new file mode 100644 index 00000000..430c21a8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xaYpfMh.ipynb @@ -0,0 +1,484 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Probability" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.1:pg-295" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of picking up any one ball is 1.0\n" + ] + } + ], + "source": [ + "import math\n", + "#Varible declaration\n", + "n = range(1,51,1)\n", + "Prob = 0\n", + "for x in n:\n", + " Prob = 1./len(n) + Prob\n", + "\n", + "#Results\n", + "print 'Probability of picking up any one ball is %3.1f'%Prob" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.2:pg-296" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of one (heart)card picked from a std. stack of 52 cards is 1/4\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "import math\n", + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "nheart = 13 #Number of cards with hearts\n", + "\n", + "#Calculations\n", + "Pe = Fraction(nheart,n)\n", + "\n", + "#Results\n", + "print 'Probability of one (heart)card picked from a std. stack of %d cards is'%n,Pe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.3:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of Five card arrangment from a deck of 52 cards is 311875200\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "n = 52 #Total cards\n", + "import math\n", + "#Calculations\n", + "TotalM = n*(n-1)*(n-2)*(n-3)*(n-4)\n", + "#Results\n", + "print 'Total number of Five card arrangment from a deck of 52 cards is %d'%TotalM" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.4:pg-297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Possible spin states for excited state are 4\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "n1 = 2 #Two spin states for 1st electron in orbit 1\n", + "n2 = 2 #Two spin states for 2nd electron in orbit 2\n", + "\n", + "#Calculation\n", + "M = n1*n1\n", + "\n", + "#Results\n", + "print 'Possible spin states for excited state are %2d'%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.5:pg-298" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible permutations for 5 player to play are 95040\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 12 #Total Number of players \n", + "j = 5 #Number player those can play match\n", + "\n", + "#Calculation\n", + "P = factorial(n)/factorial(n-j)\n", + "\n", + "#Results\n", + "print 'Maximum Possible permutations for 5 player to play are %8d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.6:pg-299" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Possible 5-card combinations are 2598960\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "n = 52 #Number of cards in std . pack\n", + "j = 5 #Number of cards in subset\n", + "\n", + "#Calculation\n", + "C = factorial(n)/(factorial(j)*factorial(n-j))\n", + "\n", + "#Results\n", + "print 'Maximum Possible 5-card combinations are %8d'%C" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.7:pg-300" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of quantum states are 15\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "x = 6 #Number of electrons\n", + "n = 2 #Number of states\n", + "\n", + "#Calculation\n", + "P = factorial(x)/(factorial(n)*factorial(x-n))\n", + "\n", + "#Results\n", + "print 'Total number of quantum states are %3d'%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.8:pg-301" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of getting 25 head out of 50 tossing is 0.112\n", + "Probability of getting 10 head out of 50 tossing is 9.124e-06\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "n = 50 #Number of separate experiments\n", + "j1 = 25 #Number of sucessful expt with heads up\n", + "j2 = 10 #Number of sucessful expt with heads up\n", + "\n", + "#Calculation\n", + "C25 = factorial(n)/(factorial(j1)*factorial(n-j1))\n", + "PE25 = Fraction(1,2)**j1\n", + "PEC25 = (1-Fraction(1,2))**(n-j1)\n", + "P25 = C25*PE25*PEC25\n", + "\n", + "C10 = factorial(n)/(factorial(j2)*factorial(n-j2))\n", + "PE10 = Fraction(1,2)**j2\n", + "PEC10 = (1-Fraction(1,2))**(n-j2)\n", + "P10 = C10*PE10*PEC10\n", + "\n", + "#Results\n", + "print 'Probability of getting 25 head out of 50 tossing is %4.3f'%(float(P25))\n", + "print 'Probability of getting 10 head out of 50 tossing is %4.3e'%(float(P10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.9:pg-302" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " N ln(N!) ln(N!)sterling Error\n", + " 10 15.10 13.03 2.08\n", + " 50 148.48 145.60 2.88\n", + "100 363.74 360.52 3.22\n" + ] + } + ], + "source": [ + "from math import factorial, log\n", + "#Variable Declaration\n", + "N = [10,50,100] #Valures for N\n", + "\n", + "#Calculations\n", + "print ' N ln(N!) ln(N!)sterling Error'\n", + "for i in N:\n", + " lnN = log(factorial(i))\n", + " lnNs = i*log(i)-i\n", + " err = abs(lnN-lnNs)\n", + " print '%3d %5.2f %5.2f %4.2f'%(i,lnN,lnNs, err)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.10:pg-305" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of receiving any card 1/52\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "\n", + "#Variable Declaration\n", + "fi = 1 #Probability of receiving any card\n", + "n = 52 #Number od Cards\n", + "\n", + "#Calculations\n", + "sum = 0\n", + "for i in range(52):\n", + " sum = sum + fi\n", + "\n", + "Pxi = Fraction(fi,sum)\n", + "\n", + "#Results\n", + "print 'Probability of receiving any card', Pxi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.11:pg-307" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of Px considering it as discrete function 20.4\n", + "Sum of Px considering it as contineous function 19.9\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from scipy import integrate\n", + "#Variable Declaration\n", + "\n", + "#Calculations\n", + "fun = lambda x: exp(-0.05*x)\n", + "Pt = 0\n", + "for i in range(0,101):\n", + " Pt = Pt + fun(i)\n", + " \n", + "Ptot = integrate.quad(fun, 0.0, 100.)\n", + "\n", + "#Results\n", + "print 'Sum of Px considering it as discrete function %4.1f'%Pt\n", + "print 'Sum of Px considering it as contineous function %4.1f'%Ptot[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex12.12:pg-308" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from sympy import Symbol\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "r = Symbol('r') #Radius of inner circle\n", + "C = [5,2,0]\n", + "#Calculations\n", + "A1 = pi*r**2\n", + "A2 = pi*(2*r)**2 - A1\n", + "A3 = pi*(3*r)**2 - (A1 + A2)\n", + "At = A1 + A2 + A3\n", + "f1 = A1/At\n", + "f2 = A2/At\n", + "f3 = A3/At\n", + "sf = f1 + f2 + f3\n", + "\n", + "ns = (f1*C[0]+f2*C[1]+f3*C[2])/sf\n", + "\n", + "#Results\n", + "print 'A1, A2, A3: ', A1,', ', A2,', ', A3\n", + "print 'f1, f2, f3: ', f1,f2,f3\n", + "print 'Average payout $', round(float(ns),2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xseHUNW.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xseHUNW.ipynb new file mode 100644 index 00000000..04d54ef7 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_xseHUNW.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 02: Heat, Work, Internal Energy, Enthalpy, and The First Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.1:pg-20" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part a: Work done in expansion is -16.2 kJ\n", + "Part b: Work done in expansion of bubble is -1.73 J\n", + "Part c: Work done in paasing the cuurent through coil is 1.39 kJ\n", + "Part d: Work done stretching th fiber is -1.12 J\n" + ] + } + ], + "source": [ + "import math #Part a\n", + "vi = 20.0 #Initial volume of ideal gas, L\n", + "vf = 85.0 #final volume of ideal gas, L\n", + "Pext = 2.5 #External Pressure against which work is done, bar\n", + "\n", + "#Calculations\n", + "w = -Pext*1e5*(vf-vi)*1e-3\n", + "\n", + "#Results\n", + "print 'Part a: Work done in expansion is %6.1f kJ'%(w/1000)\n", + "\n", + "import math #Part b\n", + "ri = 1.00 #Initial diameter of bubble, cm\n", + "rf = 3.25 #final diameter of bubble, cm\n", + "sigm = 71.99 #Surface tension, N/m\n", + "\n", + "#Calculations\n", + "w = -2*sigm*4*math.pi*(rf**2-ri**2)*1e-4\n", + "\n", + "#Results\n", + "print 'Part b: Work done in expansion of bubble is %4.2f J'%w\n", + "\n", + "import math #Part c\n", + "i = 3.20 #Current through heating coil, A \n", + "v = 14.5 #fVoltage applied across coil, volts\n", + "t = 30.0 #time for which current is applied,s\n", + "\n", + "#Calculations\n", + "w = v*i*t\n", + "\n", + "#Results\n", + "print 'Part c: Work done in pasing the cuurent through coil is %4.2f kJ'%(w/1000)\n", + "\n", + "import math #Part d\n", + "k = 100.0 #Constant in F = -kx, N/cm \n", + "dl = -0.15 #stretch , cm\n", + "\n", + "#Calculations\n", + "w = -k*(dl**2-0)/2\n", + "\n", + "#Results\n", + "print 'Part d: Work done stretching th fiber is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.2:pg-22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat added to the water 24.00 kJ\n", + "Work done in vaporizing liquid is -1703.84 J\n" + ] + } + ], + "source": [ + "import math \n", + "m = 100.0 #Mass of water, g \n", + "T = 100.0 #Temperature of water, °C\n", + "Pext = 1.0 #External Pressure on assembly, bar\n", + "x = 10.0 #percent of water vaporised at 1 bar,-\n", + "i = 2.00 #current through heating coil, A\n", + "v = 12.0 #Voltage applied, v\n", + "t = 1.0e3 #time for which current applied, s \n", + "rhol = 997 #Density of liquid, kg/m3\n", + "rhog = 0.59 #Density of vapor, kg/m3\n", + "\n", + "#Calculations\n", + "q = i*v*t\n", + "vi = m/(rhol*100)*1e-3\n", + "vf = m*(100-x)*1e-3/(rhol*100) + m*x*1e-3/(rhog*100)\n", + "w = -Pext*(vf-vi)*1e5\n", + "#Results\n", + "print 'Heat added to the water %4.2f kJ'%(q/1000)\n", + "print 'Work done in vaporizing liquid is %4.2f J'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.3:pg-27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat removed by water at constant pressure 89.03 kJ\n" + ] + } + ], + "source": [ + "import math #Part d\n", + "m = 1.5 #mass of water in surrounding, kg \n", + "dT = 14.2 #Change in temperature of water, °C or K\n", + "cp = 4.18 #Specific heat of water at constant pressure, J/(g.K)\n", + "\n", + "#Calculations\n", + "qp = m*cp*dT\n", + "\n", + "#Results\n", + "print 'Heat removed by water at constant pressure %4.2f kJ'%qp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.4:pg-32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For reverssible Isothermal expansion\n", + "Work done = -1.93e+02 J\n", + "For Single step reverssible expansion\n", + "Work done = -9.22e+03 J\n", + "For Two step reverssible expansion\n", + "Work done = -1.29e+04 J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "import math \n", + "n = 2.0 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, bar.L/(mol.K)\n", + "#For reverssible Isothermal expansion \n", + "Pi1 = 25.0 #Initial Pressure of ideal gas, bar\n", + "Vi1 = 4.50 #Initial volume of ideal gas, L\n", + "Pf1 = 4.50 #Fianl Pressure of ideal gas, bar\n", + "Pext = 4.50 #External pressure, bar \n", + "Pint = 11.0 #Intermediate pressure, bar\n", + "\n", + "#Calcualtions reverssible Isothermal expansion \n", + "T1 = Pi1*Vi1/(n*R)\n", + "Vf1 = n*R*T1/Pf1\n", + "w = -n*R*T1*log(Vf1/Vi1)\n", + "\n", + "#Results\n", + "print 'For reverssible Isothermal expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Single step irreverssible expansion \n", + "\n", + "w = -Pext*1e5*(Vf1-Vi1)*1e-3\n", + "\n", + "#Results\n", + "print 'For Single step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n", + "\n", + "#Calcualtions Two step irreverssible expansion \n", + "Vint = n*R*T1/(Pint)\n", + "w = -Pint*1e5*(Vint-Vi1)*1e-3 - Pf1*1e5*(Vf1-Vint)*1e-3\n", + "\n", + "#Results\n", + "print 'For Two step reverssible expansion'\n", + "print 'Work done = %4.2e J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.5:pg-37" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Path q w DU DH \n", + "1-2 139463.96 -39840.00 99623.96 139463.96\n", + "2-3 -99623.96 0.00 -99623.96 -139463.96\n", + "3-1 -5343.33 5343.33 0.00 0.00\n", + "Overall 34496.67 -34496.67 0.00 0.00\n", + "all values are in J\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "n = 2.5 #moles of ideal gas\n", + "R = 0.08314 #Ideal gas constant, bar.L/(mol.K)\n", + "cvm = 20.79 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "p1 = 16.6 #Pressure at point 1, bar\n", + "v1 = 1.00 #Volume at point 1, L\n", + "p2 = 16.6 #Pressure at point 2, bar\n", + "v2 = 25.0 #Volume at point 2, L \n", + "v3 = 25.0 #Volume at point 3, L\n", + "\n", + "#Calculations\n", + "T1 = p1*v1/(n*R)\n", + "T2 = p2*v2/(n*R)\n", + "T3 = T1 #from problem statement\n", + " #for path 1-2\n", + "DU12 = n*cvm*(T2-T1)\n", + "w12 = -p1*1e5*(v2-v1)*1e-3\n", + "q12 = DU12 - w12\n", + "DH12 = DU12 + n*R*(T2-T1)*1e2\n", + "\n", + " #for path 2-3\n", + "w23 = 0.0\n", + "DU23 = q23 = n*cvm*(T3-T2)\n", + "DH23 = -DH12\n", + "\n", + "\n", + " #for path 3-1\n", + "DU31 = 0.0 #Isothemal process\n", + "DH31 = 0.0\n", + "w31 = -n*R*1e2*T1*log(v1/v3)\n", + "q31 = -w31\n", + "\n", + "DU = DU12+DU23+DU31\n", + "w = w12+w23+w31\n", + "q = q12+q23+q31\n", + "DH = DH12+DH23+DH31\n", + "\n", + "#Results\n", + "print 'For Path q w DU DH '\n", + "print '1-2 %7.2f %7.2f %7.2f %7.2f'%(q12,w12,DU12,DH12)\n", + "print '2-3 %7.2f %7.2f %7.2f %7.2f'%(q23,w23,DU23,DH23)\n", + "print '3-1 %7.2f %7.2f %7.2f %7.2f'%(q31,w31,DU31,DH31)\n", + "print 'Overall %7.2f %7.2f %7.2f %7.2f'%(q,w,DU,DH)\n", + "print 'all values are in J'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.6:pg-38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The final temperature at end of adiabatic procees is 268.5 K\n", + "The enthalpy change of adiabatic procees is -2937.0 J\n", + "The Internal energy change of adiabatic procees is -1762.2 J\n", + "The work done in expansion of adiabatic procees is -1762.2 J\n" + ] + } + ], + "source": [ + "\n", + "import math #Part d\n", + "n = 2.5 #moles of ideal gas\n", + "R = 8.314 #Ideal gas constant, J/(mol.K)\n", + "cvm = 12.47 #Heat Capacity at constant volume, J/(mol.K)\n", + "\n", + "pext = 1.00 #External Pressure, bar\n", + "Ti = 325. #Initial Temeprature, K\n", + "pi = 2.50 #Initial Pressure, bar\n", + "pf = 1.25 #Final pressure, bar \n", + "\n", + "#Calculations Adiabatic process q = 0; DU = w\n", + "q = 0.0 \n", + "Tf = Ti*(cvm + R*pext/pi)/(cvm + R*pext/pf )\n", + "DU = w = n*cvm*(Tf-Ti)\n", + "DH = DU + n*R*(Tf-Ti)\n", + "\n", + "#Results\n", + "print 'The final temperature at end of adiabatic procees is %4.1f K'%Tf\n", + "print 'The enthalpy change of adiabatic procees is %4.1f J'%DH\n", + "print 'The Internal energy change of adiabatic procees is %4.1f J'%DU\n", + "print 'The work done in expansion of adiabatic procees is %4.1f J'%w\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex2.7:pg-40" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature of cloud 265.2 K\n", + "You can expect cloud\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + " #Part d\n", + "h1 = 1000.0 #initial Altitude of cloud, m \n", + "hf = 3500.0 #Final Altitude of cloud, m \n", + "p1 = 0.802 #Pressure at h1, atm \n", + "pf = 0.602 #Pressure at hf, atm\n", + "T1 = 288.0 #Initial temperature of cloud, K\n", + "cp = 28.86 #Specific heat of air, J/mol.K\n", + "R = 8.314 #Gas constant, J/mol.K\n", + "\n", + "#Calculations\n", + "Tf = exp(-(cp/(cp-R)-1)/(cp/(cp-R))*log(p1/pf))*T1\n", + "#Results\n", + "print 'Final temperature of cloud %4.1f K'%Tf\n", + "if Tf < 273:\n", + " print 'You can expect cloud'\n", + "else:\n", + " print 'You can not expect cloud'" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_yCvUz4t.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_yCvUz4t.ipynb new file mode 100644 index 00000000..058c9da8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_yCvUz4t.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Boltzmann Distribution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.1:pg-321" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The observed weight 1.37e+28 compared to 1.01e+29\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "\n", + "aH = 40 #Number of heads\n", + "N = 100 #Total events\n", + "\n", + "#Calculations\n", + "aT = 100 - aH\n", + "We = factorial(N)/(factorial(aT)*factorial(aH))\n", + "Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))\n", + "\n", + "#Results\n", + "print 'The observed weight %5.2e compared to %5.2e'%(We,Wexpected)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.2:pg-322" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At maximum value of ln(W)\n", + "Values of N1 : 6162, N2: 2676 and N3: 1162 \n", + "Maximum value of ln(W)= 9012\n" + ] + } + ], + "source": [ + "from sympy import symbols, diff, log\n", + "\n", + "#Varialbe declaration\n", + "n = 10000 #Total number of particles\n", + "\n", + "\n", + "#Calcualtions\n", + "def ster(i):\n", + " return i*log(i)-i\n", + "\n", + "n1, n2, n3, W = symbols('n1 n2 n3 W',positive=True)\n", + "\n", + "n2 = 5000 - 2*n3\n", + "n1 = 10000 - n2 -n3\n", + "logW = ster(n) - ster(n1) - ster(n2) - ster(n3) \n", + "fun = diff(logW, n3)\n", + "dfun = diff(fun, n3)\n", + "x0 = 10.0\n", + "err = 1.0\n", + "while err>0.001:\n", + " f = fun.subs(n3,x0)\n", + " df = dfun.subs(n3,x0)\n", + " xnew = x0 - f/df\n", + " err = abs(x0-xnew)/x0\n", + " x0 = xnew\n", + "\n", + "x0 = int(x0)\n", + "N2 = n2.subs(n3,x0)\n", + "N3 = x0\n", + "n1 = n1.subs(n3,x0)\n", + "N1 = n1.subs(n2,N2)\n", + "lnW = logW.subs(n3,N3)\n", + "\n", + "#Results\n", + "print 'At maximum value of ln(W)'\n", + "print 'Values of N1 : %4d, N2: %4d and N3: %4d '%(N1, N2,N3)\n", + "print 'Maximum value of ln(W)= %6d'%lnW" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.3:pg-326" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.048 i.e. 4.8 percent\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.633 #Probabilities of Energy level 1,2,3 \n", + "p1 = 0.233\n", + "p2 = 0.086\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f i.e.%4.1f percent'%(p4,p4*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.4:pg-327" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.222\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.394 #Probabilities of Energy level 1,2,3 \n", + "p1by2 = 0.239\n", + "p2 = 0.145\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1by2+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f'%(p4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.5:pg-333" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Partition function is 1.577\n", + "Probability of occupying the second vibrational state n=2 is 0.085\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "I2 = 208 #Vibrational frequency, cm-1 \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "#Calculation\n", + "q = 1./(1.-exp(-h*c*I2/(k*T)))\n", + "p2 = exp(-2*h*c*I2/(k*T))/q\n", + "\n", + "#Results\n", + "print 'Partition function is %4.3f'%(q)\n", + "print 'Probability of occupying the second vibrational state n=2 is %4.3f'%(p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.6:pg-334" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Occupation Number is 0.999990\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "B = 1.45 #Magnetic field streangth, Teslas \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K \n", + "gnbn = 2.82e-26 #J/T\n", + "#Calculation\n", + "ahpbyahm = math.exp(-gnbn*B/(k*T))\n", + "\n", + "#Results\n", + "print 'Occupation Number is %7.6f'%(ahpbyahm)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zG1ujSS.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zG1ujSS.ipynb new file mode 100644 index 00000000..058c9da8 --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zG1ujSS.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Boltzmann Distribution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.1:pg-321" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The observed weight 1.37e+28 compared to 1.01e+29\n" + ] + } + ], + "source": [ + "from math import factorial\n", + "\n", + "#Variable Declaration\n", + "\n", + "aH = 40 #Number of heads\n", + "N = 100 #Total events\n", + "\n", + "#Calculations\n", + "aT = 100 - aH\n", + "We = factorial(N)/(factorial(aT)*factorial(aH))\n", + "Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))\n", + "\n", + "#Results\n", + "print 'The observed weight %5.2e compared to %5.2e'%(We,Wexpected)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.2:pg-322" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At maximum value of ln(W)\n", + "Values of N1 : 6162, N2: 2676 and N3: 1162 \n", + "Maximum value of ln(W)= 9012\n" + ] + } + ], + "source": [ + "from sympy import symbols, diff, log\n", + "\n", + "#Varialbe declaration\n", + "n = 10000 #Total number of particles\n", + "\n", + "\n", + "#Calcualtions\n", + "def ster(i):\n", + " return i*log(i)-i\n", + "\n", + "n1, n2, n3, W = symbols('n1 n2 n3 W',positive=True)\n", + "\n", + "n2 = 5000 - 2*n3\n", + "n1 = 10000 - n2 -n3\n", + "logW = ster(n) - ster(n1) - ster(n2) - ster(n3) \n", + "fun = diff(logW, n3)\n", + "dfun = diff(fun, n3)\n", + "x0 = 10.0\n", + "err = 1.0\n", + "while err>0.001:\n", + " f = fun.subs(n3,x0)\n", + " df = dfun.subs(n3,x0)\n", + " xnew = x0 - f/df\n", + " err = abs(x0-xnew)/x0\n", + " x0 = xnew\n", + "\n", + "x0 = int(x0)\n", + "N2 = n2.subs(n3,x0)\n", + "N3 = x0\n", + "n1 = n1.subs(n3,x0)\n", + "N1 = n1.subs(n2,N2)\n", + "lnW = logW.subs(n3,N3)\n", + "\n", + "#Results\n", + "print 'At maximum value of ln(W)'\n", + "print 'Values of N1 : %4d, N2: %4d and N3: %4d '%(N1, N2,N3)\n", + "print 'Maximum value of ln(W)= %6d'%lnW" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.3:pg-326" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.048 i.e. 4.8 percent\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.633 #Probabilities of Energy level 1,2,3 \n", + "p1 = 0.233\n", + "p2 = 0.086\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f i.e.%4.1f percent'%(p4,p4*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.4:pg-327" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Probability of finding an oscillator at energy level of n>3 is 0.222\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "p0 = 0.394 #Probabilities of Energy level 1,2,3 \n", + "p1by2 = 0.239\n", + "p2 = 0.145\n", + "\n", + "#Calculation\n", + "p4 = 1. -(p0+p1by2+p2)\n", + "\n", + "#Results\n", + "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f'%(p4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.5:pg-333" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Partition function is 1.577\n", + "Probability of occupying the second vibrational state n=2 is 0.085\n" + ] + } + ], + "source": [ + "from math import exp\n", + "\n", + "#Variable Declaration\n", + "I2 = 208 #Vibrational frequency, cm-1 \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K\n", + "#Calculation\n", + "q = 1./(1.-exp(-h*c*I2/(k*T)))\n", + "p2 = exp(-2*h*c*I2/(k*T))/q\n", + "\n", + "#Results\n", + "print 'Partition function is %4.3f'%(q)\n", + "print 'Probability of occupying the second vibrational state n=2 is %4.3f'%(p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.6:pg-334" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Occupation Number is 0.999990\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "B = 1.45 #Magnetic field streangth, Teslas \n", + "T = 298 #Molecular Temperature, K\n", + "c = 3.00e10 #speed of light, cm/s\n", + "h = 6.626e-34 #Planks constant, J/K\n", + "k = 1.38e-23 #Boltzman constant, J/K \n", + "gnbn = 2.82e-26 #J/T\n", + "#Calculation\n", + "ahpbyahm = math.exp(-gnbn*B/(k*T))\n", + "\n", + "#Results\n", + "print 'Occupation Number is %7.6f'%(ahpbyahm)\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zKb7eGR.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zKb7eGR.ipynb new file mode 100644 index 00000000..860afddf --- /dev/null +++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapte_zKb7eGR.ipynb @@ -0,0 +1,172 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 08: Phase Diagrams and the Relative Stability of Solids, Liquids, and Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.2:Pg.No-195" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Latent heat of vaporization of benzene at 20°C 30.7 kJ/mol\n", + "Entropy Change of vaporization of benzene at 20°C 86.9 J/mol\n", + "Triple point temperature = 267.3 K for benzene\n", + "Triple point pressure = 3.53e+03 Pa for benzene\n" + ] + } + ], + "source": [ + "from math import log, exp\n", + "\n", + "import math\n", + "Tn = 353.24 #normal boiling point of Benzene, K\n", + "pi = 1.19e4 #Vapor pressure of benzene at 20°C, Pa\n", + "DHf = 9.95 #Latent heat of fusion, kJ/mol\n", + "pv443 = 137. #Vapor pressure of benzene at -44.3°C, Pa\n", + "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n", + "Pf = 101325 #Std. atmospheric pressure, Pa\n", + "T20 = 293.15 #Temperature in K\n", + "P0 = 1.\n", + "Pl = 10000.\n", + "Ts = -44.3 #Temperature of solid benzene, °C\n", + "\n", + "#Calculations\n", + "Ts = Ts + 273.15\n", + "#Part a\n", + "\n", + "DHv = -(R*math.log(Pf/pi))/(1./Tn-1./T20)\n", + "#Part b\n", + "\n", + "DSv = DHv/Tn\n", + "DHf = DHf*1e3\n", + "#Part c\n", + "\n", + "Ttp = -DHf/(R*(math.log(Pl/P0)-math.log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))\n", + "Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325\n", + "\n", + "#Results\n", + "print 'Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol'%(DHv/1000)\n", + "print 'Entropy Change of vaporization of benzene at 20°C %3.1f J/mol'%DSv\n", + "print 'Triple point temperature = %4.1f K for benzene'%Ttp\n", + "print 'Triple point pressure = %4.2e Pa for benzene'%Ptp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.3:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force exerted by one leg 5.428e-05 N\n" + ] + } + ], + "source": [ + "from math import cos, pi\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 1.2e-4 #Radius of hemisphere, m\n", + "theta = 0.0 #Contact angle, rad\n", + "\n", + "#Calculations\n", + "DP = 2*gama*cos(theta)/r\n", + "F = DP*pi*r**2\n", + "\n", + "#Results\n", + "print 'Force exerted by one leg %5.3e N'%F" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex8.4:Pg.No-200" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Height to which water can rise by capillary action is 0.74 m\n", + "This is very less than 100.0 n, hence water can not reach top of tree\n" + ] + } + ], + "source": [ + "from math import cos\n", + "\n", + "\n", + "gama = 71.99e-3 #Surface tension of water, N/m\n", + "r = 2e-5 #Radius of xylem, m\n", + "theta = 0.0 #Contact angle, rad\n", + "rho = 997.0 #Density of water, kg/m3\n", + "g = 9.81 #gravitational acceleration, m/s2\n", + "H = 100 #Height at top of redwood tree, m\n", + "\n", + "#Calculations\n", + "h = 2*gama/(rho*g*r*cos(theta))\n", + "\n", + "#Results\n", + "print 'Height to which water can rise by capillary action is %3.2f m'%h\n", + "print 'This is very less than %4.1f n, hence water can not reach top of tree'%H" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |