summaryrefslogtreecommitdiff
path: root/A_Textbook_Of_Engineering_Physics/Chapter5_1.ipynb
blob: f43892194db391eafeaf274e13795b6d664ce50a (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:550f2c4f76d815d509a9a81031b8891ad0f830da6727cb50a9ec9ad3c5c39d1e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter5 Electron Oprtics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg 72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 5.1\n",
      "##Electron refraction, calculation of potential difference\n",
      "\n",
      "##given values\n",
      "V1=250.;##potential by which electrons are accelerated in Volts\n",
      "alpha1=50*math.pi/180.;##in degree\n",
      "alpha2=30*math.pi/180.;##in degree\n",
      "b=math.sin(alpha1)/math.sin(alpha2);\n",
      "##calculation\n",
      "V2=(b**2.)*V1;\n",
      "a=V2-V1;\n",
      "print'%s %.1f %s'%('potential difference(in volts) is:',a,'');\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "potential difference(in volts) is: 336.8 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2 -pg94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "##Example 5.2&5.3\n",
      "import math\n",
      "##Cyclotron, calculation of magnetic induction,maximum energy\n",
      "##given values\n",
      "f=12*(10**6);##oscillator frequency in Hertz\n",
      "r=.53;##radius of the dee in metre\n",
      "q=1.6*10**-19;##Deuteron charge in C\n",
      "m=3.34*10**-27;##mass of deuteron in kg\n",
      "##calculation\n",
      "B=2*math.pi*f*m/q;##\n",
      "print'%s %.2f %s'%('magnetic induction (in Tesla) is:',B,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetic induction (in Tesla) is: 1.57 \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Cyclotron, calculation of magnetic induction,maximum energy\n",
      "##given values\n",
      "f=12.*(10**6);##oscillator frequency in Hertz\n",
      "r=.53;##radius of the dee in metre\n",
      "q=1.6*10**-19;##Deuteron charge in C\n",
      "m=3.34*10**-27;##mass of deuteron in kg\n",
      "##calculation\n",
      "B=2*math.pi*f*m/q;##\n",
      "\n",
      "E=B**2*q**2.*r**2./(2.*m);\n",
      "print'%s %.2e %s'%('maximum energy to which deuterons can be accelerated (in J) is',E,'')\n",
      "E1=E*6.24*10**18/10**6.;##conversion of energy into MeV\n",
      "print'%s %.1f %s'%('maximum energy to which deuterons can be accelerated (in MeV) is',E1,'');\n",
      "print('in text book ans is given wrong')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum energy to which deuterons can be accelerated (in J) is 2.67e-12 \n",
        "maximum energy to which deuterons can be accelerated (in MeV) is 16.6 \n",
        "in text book ans is given wrong\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg99"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 5.4\n",
      "##Mass spectrograph, calculation of linear separation of lines formed on photographic plates\n",
      "\n",
      "##given values;\n",
      "E=8.*10**4;##electric field in V/m\n",
      "B=.55##magnetic induction in Wb/m*2\n",
      "q=1.6*10**-19;##charge of ions\n",
      "m1=20.*1.67*10**-27;##atomic mass of an isotope of neon\n",
      "m2=22.*1.67*10**-27;##atomic mass of other isotope of neon\n",
      "##calculation\n",
      "x=2*E*(m2-m1)/(q*B**2);##\n",
      "print'%s %.3f %s'%('separation of lines (in metre) is:',x,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "separation of lines (in metre) is: 0.011 \n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}