summaryrefslogtreecommitdiff
path: root/backup/Principles_of_Physics_by_F.J.Bueche_version_backup/Chapter18.ipynb
blob: 30da03c65e5909166b52d6fefd2c3c7a571ead93 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 18:Magnetism"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex18.1:pg-901"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The force on the wire is F= 0.000958363  N\n"
     ]
    }
   ],
   "source": [
    "  #Example 18_1\n",
    "import math \n",
    "  \n",
    "#To find the force on the wire\n",
    "b=2*10**-4        #Units in T\n",
    "i=20           #Units in A\n",
    "l=0.3          #Units in meters\n",
    "theta=53                #Units in degrees\n",
    "thetaa=math.sin(theta*math.pi/180)        #Units in Radians     \n",
    "f=b*i*l*thetaa               #Units in N\n",
    "print \"The force on the wire is F=\",round(f,9),\" N\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Ex18.2:pg-902"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The magnitude of magnetic field is B= 0.2609  T\n"
     ]
    }
   ],
   "source": [
    "  #Example 18_2\n",
    " \n",
    "  \n",
    "  #To find the magnitude of the magnetic field\n",
    "m=1.67*10**-27          #Units in Kg\n",
    "v=10**6           #Units in meters/sec\n",
    "r=4*10**-2            #Units in Meters\n",
    "q=1.6*10**-19           #Units in C or eV\n",
    "b=(m*v)/(r*q)           #Units in T\n",
    "print \"The magnitude of magnetic field is B=\",round(b,4),\" T\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Ex18.3:pg-903"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The magnetic field exerts a force of q*v*B upwards on the particle.\n",
      "The particle doesnot deflect because the two forces are equal\n",
      "Hence v=(E/B)\n",
      "A particle with this speed will pass through the region of the crossfields and undeflected\n"
     ]
    }
   ],
   "source": [
    "  #Example 18_3\n",
    " \n",
    "  \n",
    "#To show that the particles does not deflect from its straight line path\n",
    "print \"The magnetic field exerts a force of q*v*B upwards on the particle.\\nThe particle doesnot deflect because the two forces are equal\\nHence v=(E/B)\\nA particle with this speed will pass through the region of the crossfields and undeflected\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Ex18.4:pg-903"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of B is= 1.2  G\n"
     ]
    }
   ],
   "source": [
    "  #Example 18_4\n",
    " \n",
    "  \n",
    "#To calculate the value of B at a radial distance of 5 cm\n",
    "u=4*math.pi*10**-7        #Units in T m/A\n",
    "i=30         #Units in A\n",
    "r=0.05           #Units in Meters\n",
    "b=(u*i)/(2*math.pi*r)           #Units in T\n",
    "b=b*10**4            #Units in G\n",
    "print \"The value of B is=\",round(b,2),\" G\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Ex18.5:pg-904"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The magnetic moment of Hydrogen atom is=\n",
      "9.319e-24\n",
      "A meters**2\n"
     ]
    }
   ],
   "source": [
    "  #Example 18_5\n",
    " \n",
    "  \n",
    "#To find the magnetic moment of hydrogen atom\n",
    "r=0.53*10**-10        #Units in meters\n",
    "a=math.pi*r**2         #Units in meters**2\n",
    "q=1.6*10**-19            #Units in C\n",
    "f=6.6*10**15          #Units in sec**-1\n",
    "i=q*f            #Units in A\n",
    "u=i*a            #Units in A meter**2\n",
    "print \"The magnetic moment of Hydrogen atom is=\"\n",
    "print round(u,27)\n",
    "print \"A meters**2\"\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
}