summaryrefslogtreecommitdiff
path: root/Modern_Physics_By_G.Aruldas/Chapter6_3.ipynb
blob: fa8615c71f0660364153bd5f1698c69986563108 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:8884b20a8f08880d4a94501a9f3a466664f30ca1f04c541fe7d3a232f87a24bc"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "6: Quantum mechanics of simple systems"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.1, Page number 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from scipy.integrate import quad\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "a=2*10**-10;    #length of square well(m)\n",
      "\n",
      "#Calculation\n",
      "def intg(x):\n",
      "    return (2/a)*(math.sin(math.pi*x/a))**2\n",
      "\n",
      "S=quad(intg,0,0.25*10**-10)[0]     #probability of finding the electron\n",
      "\n",
      "#Result\n",
      "print \"probability of finding the electron is\",round(S,4)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "probability of finding the electron is 0.0125\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.2, Page number 96"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "new0=6.43*10**13;   #frequency(Hz)\n",
      "e=1.6*10**-19;   #conversion factor from J to eV\n",
      "mew=1.1385*10**-26;     #reduced mass(kg)\n",
      "\n",
      "#Calculation\n",
      "E0=h*new0/2;   #zero point energy(J)\n",
      "E0=E0/e;   #zero point energy(eV)\n",
      "k=4*math.pi**2*new0**2*mew;   #force constane(N/m)\n",
      "\n",
      "#Result\n",
      "print \"zero point energy is\",round(E0,3),\"eV\"\n",
      "print \"force constane is\",round(k),\"N/m\"\n",
      "print \"answer varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "zero point energy is 0.133 eV\n",
        "force constane is 1858.0 N/m\n",
        "answer varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.6, Page number 104"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "m1=19.9217*10**-27;    #mass of carbon atom(kg)\n",
      "m2=26.5614*10**-27;    #mass of oxygen atom(kg)\n",
      "r=1.131*10**-10;   #separation(m)\n",
      "hbar=1.054*10**-34;\n",
      "e=1.6*10**-19;   #conversion factor from J to eV\n",
      "\n",
      "#Calculation\n",
      "mew=(m1*m2)/(m1+m2);    #reduced mass(kg)\n",
      "I=mew*r**2;    \n",
      "deltaE=hbar**2/I;    #energy difference(J)\n",
      "deltaE=deltaE/e;     #energy difference(eV)\n",
      "\n",
      "#Result\n",
      "print \"energy difference is\",round(deltaE*10**4,2),\"*10**-4 eV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy difference is 4.77 *10**-4 eV\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.7, Page number 105"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "m1=1;\n",
      "m2=0;\n",
      "m3=-1;     #m-components\n",
      "l=1;\n",
      "\n",
      "#Calculation\n",
      "L=math.sqrt(l*(l+1));    #length of vector\n",
      "theta1=math.acos(m1/L);   #orientation for m=1(radian)\n",
      "theta1=theta1*180/math.pi;   #orientation for m=1(degrees)\n",
      "theta2=math.acos(m2/L);   #orientation for m=0(radian)\n",
      "theta2=theta2*180/math.pi;   #orientation for m=0(degrees)\n",
      "theta3=math.acos(m3/L);   #orientation for m=-1(radian)\n",
      "theta3=theta3*180/math.pi;   #orientation for m=-1(degrees)\n",
      "\n",
      "#Result\n",
      "print \"orientation for m=1 is\",theta1,\"degrees\"\n",
      "print \"orientation for m=0 is\",theta2,\"degrees\"\n",
      "print \"orientation for m=-1 is\",theta3,\"degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "orientation for m=1 is 45.0 degrees\n",
        "orientation for m=0 is 90.0 degrees\n",
        "orientation for m=-1 is 135.0 degrees\n"
       ]
      }
     ],
     "prompt_number": 22
    }
   ],
   "metadata": {}
  }
 ]
}