summaryrefslogtreecommitdiff
path: root/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter14.ipynb
blob: e0d13aeefb8a72cd6badd06a47c4cabfc59f0437 (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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 14: Inductance and Magnetic Fields"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.1, Page 280"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnetic Field Strength, H = 7.96 A/m\n"
     ]
    }
   ],
   "source": [
    "#Initialization\n",
    "i=5                          #current in ampere\n",
    "l=0.628                      #circumference\n",
    "\n",
    "\n",
    "#Calculation\n",
    "h=i/l                           #magnetic field strength\n",
    "\n",
    "#Results\n",
    "print'Magnetic Field Strength, H = %.2f A/m'%h"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.2, Page 283"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a) Magnetomotive Force, H = 3000.00 ampere-turns\n",
      "(b) Magnetic Field Strength, H = 7500.00 A/m\n",
      "(c) B = 9.42 mT\n",
      "(d) Toal Flux, phi = 2.83 uWb\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#Initialization\n",
    "i=6                          #current in ampere\n",
    "n=500                       #turns\n",
    "l=0.4                      #circumference\n",
    "uo=4*math.pi*10**-7          #epsilon zero constant\n",
    "a=300*10**-6                 #area\n",
    "\n",
    "#Calculation\n",
    "f=n*i                          #Magnetomotive Force\n",
    "h=f/l                           #magnetic field strength\n",
    "b=uo*h                          #magnetic induction\n",
    "phi=b*a                          #flux\n",
    "\n",
    "#Results\n",
    "print'(a) Magnetomotive Force, H = %.2f ampere-turns'%f\n",
    "print'(b) Magnetic Field Strength, H = %.2f A/m'%h\n",
    "print'(c) B = %.2f mT'%(b*10**3)\n",
    "print'(d) Toal Flux, phi = %.2f uWb'%(phi*10**6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.3, Page 285"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Voltage, V = 30 mV\n"
     ]
    }
   ],
   "source": [
    "#Initialization\n",
    "l=10*10**-3                   #inductance in henry\n",
    "di=3\n",
    "\n",
    "\n",
    "#Calculation\n",
    "v=l*di                            #voltage         \n",
    "\n",
    "#Results\n",
    "print'Voltage, V = %d mV'%(v*10**3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.4, Page 287"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Inductance,L = 30 uH\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#Initialization\n",
    "n=400                        #turns\n",
    "l=200*10**-3                 #circumference\n",
    "uo=4*math.pi*10**-7          #epsilon zero constant\n",
    "a=30*10**-6                 #area\n",
    "\n",
    "#Calculation\n",
    "L=(uo*a*n**2)/l                #Inductance in henry               \n",
    "\n",
    "#Results\n",
    "print'Inductance,L = %d uH'%(L*10**6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.5, Page 289"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a) Inductance in series,L = 30 uH\n",
      "(b) Inductance in parallel,L = 6.67 uH\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#Initialization\n",
    "l1=10                #Inductance in henry       \n",
    "l2=20                #Inductance in henry       \n",
    "\n",
    "#Calculation\n",
    "ls=l1+l2                #Inductance in henry               \n",
    "lp=((l1*l2)*(l1+l2)**-1)    #Inductance in henry       \n",
    "#Results\n",
    "print'(a) Inductance in series,L = %d uH'%ls\n",
    "print'(b) Inductance in parallel,L = %.2f uH'%lp"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 14.6, Page 293"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Stored Energy = 125 mJ\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#Initialization\n",
    "l=10**-2                #Inductance in henry       \n",
    "i=5                  #current in ampere    \n",
    "\n",
    "#Calculation\n",
    "s=0.5*l*i**2           #stored energy\n",
    "\n",
    "#Results\n",
    "print'Stored Energy = %d mJ'%(s*10**3)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "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.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}