summaryrefslogtreecommitdiff
path: root/Thermodynamics,_Statistical_Thermodynamics,_&_Kinetics/Chapter15.ipynb
blob: e19500e1f9333e892c6a6435c41c4949d38a2d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
 "metadata": {
  "name": "",
  "signature": "sha256:f8110fb6016a142f9c7bb6eab2fb7171930a565929eb5cb2f65ff0d315425e0a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 15: Statistical Thermodyanamics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example Problem 15.2, Page Number 362"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log\n",
      "\n",
      "#Variable Declaration\n",
      "hnu = 1.00e-20\n",
      "NA = 6.023e23\n",
      "k = 1.38e-23\n",
      "U = 1.00e3\n",
      "n = 1\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)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For Internal energy to be 1000.0 J temperature will be 449.0 K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example Problem 15.3, Page Number 367"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "\n",
      "#Variable Declaration\n",
      "g0 = 3.0\n",
      "c = 3.00e8\n",
      "h = 6.626e-34\n",
      "NA = 6.023e23\n",
      "k = 1.38e-23\n",
      "labda = 1263e-9\n",
      "T = 500.\n",
      "n = 1.0\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 partition function UE is %4.3e J'%UE"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Energy of excited state is 1.57e-19\n",
        "Electronic partition function qE is 3.000e+00\n",
        "Electronic partition function UE is 3.922e-06 J\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example Problem 15.5, Page Number 376"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log, pi, sqrt\n",
      "\n",
      "#Variable Declaration\n",
      "Mne = 0.0201797\n",
      "Mkr = 0.0837980\n",
      "Vmne = 0.0224\n",
      "Vmkr = 0.0223\n",
      "h = 6.626e-34\n",
      "NA = 6.023e23\n",
      "k = 1.38e-23\n",
      "T = 298\n",
      "R = 8.314\n",
      "n = 1.0\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"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example Problem 15.8, Page Number 381"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log, pi\n",
      "\n",
      "#Variable Declaration\n",
      "M = 0.040\n",
      "h = 6.626e-34\n",
      "NA = 6.023e23\n",
      "k = 1.38e-23\n",
      "T = 298.15\n",
      "P = 1e5\n",
      "R = 8.314\n",
      "n = 1.0\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)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "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"
       ]
      }
     ],
     "prompt_number": 39
    }
   ],
   "metadata": {}
  }
 ]
}