summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter10.ipynb
blob: a9cbc233b667e1de18d492c8e6286c1dc545a39e (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:1d13a558dd2cc62e2c7ada350fc7a07d9283efcbc790578d0711fd6c96f50df0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10: Statistical Physics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1, page no. 340"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "\n",
      "n1 = 1        #Ground state\n",
      "n2 = 2        #First excited state\n",
      "n3 = 3        #second excited state\n",
      "T = 300       #room temperature(K)\n",
      "kb = 8.617 * 10 **-5 #Boltzmann constant(eV/K)\n",
      "\n",
      "#Calculation\n",
      "\n",
      "E1 = -13.6 / n1 ** 2\n",
      "g1 = 2 * n1 ** 2\n",
      "E2 = -13.6 / n2 ** 2\n",
      "g2 = 2 * n2 ** 2\n",
      "E3 = -13.6 / n3 ** 2\n",
      "g3 = 2 * n3 ** 2\n",
      "N3 = g3 * math.exp(-E3/(kb*T))\n",
      "N2 = g2 * math.exp(-E2/(kb*T))\n",
      "N1 = g1 * math.exp(-E1/(kb*T))\n",
      "ratio1 = N2 / N1\n",
      "ratio2 = N3 / N1\n",
      "\n",
      "#results\n",
      "\n",
      "print \"(a) We can see that n2/n1=\",round(ratio1),\"and n3/n1=\",round(ratio2),\"essentially all atoms are in ground state.\"\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "T = 20000           #Temperature(K)\n",
      "\n",
      "#Calculation\n",
      "\n",
      "N3 = g3 * math.exp(-E3/(kb*T))\n",
      "N2 = g2 * math.exp(-E2/(kb*T))\n",
      "N1 = g1 * math.exp(-E1/(kb*T))\n",
      "ratio1 = N2 / N1\n",
      "ratio2 = N3 / N1\n",
      "\n",
      "#result\n",
      "\n",
      "print \"(b) n2/n1=\",round(ratio1,5),\"and n3/n1=\",round(ratio2,5)\n",
      "\n",
      "\n",
      "ratio3 = N3 / N2\n",
      "\n",
      "print \"(c) S(3->2)/S(2->1)=\",round(ratio3,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) We can see that n2/n1= 0.0 and n3/n1= 0.0 essentially all atoms are in ground state.\n",
        "(b) n2/n1= 0.01076 and n3/n1= 0.00809\n",
        "(c) S(3->2)/S(2->1)= 0.75\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2, page no. 345"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "m = 3.34 * 10 ** -27    #mass of hydrogen(kg)\n",
      "kbT = 3.77 * 10 ** -21  #kb * T (eV)\n",
      "N = 6.02 * 10 ** 23     #avogadro's number\n",
      "V = 22.4 * 10 ** -3     #Volume of H2 gas (m^3)\n",
      "h = 1.055 * 10 ** -34   #Planck's constant (J.s)\n",
      "\n",
      "#Calculation\n",
      "\n",
      "r = (N/V)* h ** 3 / (8 * (m * kbT)**1.5)\n",
      "\n",
      "#result\n",
      "\n",
      "print \"(a) (N/V)h^3/(8*(mkbT)^3/2)=\",round(r/10**-8,2),\"X10^-8 is much less than 1, we conclude that even hydrogen is described by Maxwell-Boltzmann statistics.\"\n",
      "\n",
      "\n",
      "\n",
      "#Variable declaration\n",
      "\n",
      "d = 10.5     #density of silver (g/cm^3)\n",
      "mw = 107.9   #Molar weight of silver (g/mol)\n",
      "me = 9.109*10**-31 #mass of electron(kg)\n",
      "kbT = 4.14 * 10 ** -21 #kb*T (J)\n",
      "\n",
      "#Calculation\n",
      "\n",
      "Ns = (d/mw)* N * 10 ** 6\n",
      "r = (Ns)* h ** 3 / (8 * (me * kbT)**1.5)\n",
      "\n",
      "#result\n",
      "\n",
      "print \"(b) (N/V)h^3/(8*(mkbT)^3/2)=\",round(r/8,2),\"is greater than 1, we conclude that the Maxwell-Boltzmann statistics does not hold for electrons of silver.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) (N/V)h^3/(8*(mkbT)^3/2)= 8.83 X10^-8 is much less than 1, we conclude that even hydrogen is described by Maxwell-Boltzmann statistics.\n",
        "(b) (N/V)h^3/(8*(mkbT)^3/2)= 4.64 is greater than 1, we conclude that the Maxwell-Boltzmann statistics does not hold for electrons of silver.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3, page no. 352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "\n",
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "kB = 8.62 * 10 ** -5    #Boltzmann constant(eV/K)\n",
      "T1 = 3000               #Cavity walls temperature(K)\n",
      "T2 = 3.00               #Cavity walls temperature(K)\n",
      "hc = 1.24 * 10 ** -4    #product of planck's constant and speed of light (eV.cm)\n",
      "integration = 2.40      #value of integral(z^2/e^z-1,0,+inf)\n",
      "\n",
      "#Calculation\n",
      "\n",
      "NbyV_at_3000 = 8* math.pi * (kB * T1/hc)**3 * integration\n",
      "NbyV_at_3 = 8* math.pi * (kB * T2/hc)**3 * integration\n",
      "\n",
      "#result\n",
      "\n",
      "print \"N/V at 3000K is\",round(NbyV_at_3000/10**11,2),\"X 10^11 photons/cm^3. Likewise N/V at 3.00 K is\",round(NbyV_at_3/10**2,2),\"X 10^2 photons/cm^3\"\n",
      "print \"Therefore the photon density decreases by a factor of\",round(NbyV_at_3000/NbyV_at_3/10**9),\" X 10^9 when the temperature drops from 3000K to 3.00K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "N/V at 3000K is 5.47 X 10^11 photons/cm^3. Likewise N/V at 3.00 K is 5.47 X 10^2 photons/cm^3\n",
        "Therefore the photon density decreases by a factor of 1.0  X 10^9 when the temperature drops from 3000K to 3.00K\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}