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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 21: Elecromagnetics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex21.1:pg-1037"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Wavelength of the Electromagnetic wave is lamda= 294.0 meters\n"
]
}
],
"source": [
" #Example 21_1\n",
" \n",
" \n",
" #To find the wavelength of the electromagnetic wave\n",
"v=3*10.0**8 #Units in meters/sec\n",
"f=1.02*10**6 #Units in Hz\n",
"lamda=v/f #Units in Meters\n",
"print \"The Wavelength of the Electromagnetic wave is lamda=\",round(lamda),\" meters\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex21.2:pg-1038"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The value of the magnetic field is Bo=\n",
"1.4e-11\n",
"T\n"
]
}
],
"source": [
" #Example 21_2\n",
" \n",
" \n",
" #To find the value of magnetic field\n",
"eo=4.2*10**-3 #units in V/m\n",
"c=3*10**8 #Units in meters/sec\n",
"bo=eo/c #Units in T\n",
"print \"The value of the magnetic field is Bo=\"\n",
"print bo\n",
"print \"T\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex21.3:pg-1039"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The value of Eo= 0.02448 N/C\n",
" The value of Bo= 8.16124749653e-11\n",
"T\n"
]
}
],
"source": [
" #Example 21_3\n",
"import math \n",
" #To find the values of Eo and Bo in the wave\n",
"power=1000 #Units in W\n",
"r=10000 #units in meters\n",
"area=4*math.pi*r**2 #units in meter**2\n",
"P_a=power/area #unts in W/meter**2\n",
"c=3*10**8 #units in meters/sec\n",
"eeo=8.85*10**-12 #units in C**2/N*meter**2\",round( ,5),\" \n",
"eo=math.sqrt((2*P_a)/(c*eeo)) #units in N/C\n",
"bo=eo/c #Units in T\n",
"print \"The value of Eo=\",round(eo,5),\" N/C\\n The value of Bo=\",\n",
"print bo\n",
"print \"T\"\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
}
|