summaryrefslogtreecommitdiff
path: root/sample_notebooks/ChandraShiva/CHAPTER1.ipynb
blob: b6d6656fe553ddf5d158daca879f9c47031fc044 (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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
{
 "metadata": {
  "name": "",
  "signature": "sha256:a93d445dad4ffd499630570fa7ced24b4b25ee06fcd5352ae47d0eb721a47db5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER1 : WHAT MACHINES AND TRANSFORMERS HAVE IN COMMON"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E01 : Pg 16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "horsepower=2.5  # rating of induction motor in horsepower at half load\n",
      "Vl=230. # terminal voltage of motor in volts\n",
      "Il=7.   # load current of motor in amperes\n",
      "pf=0.8 # power factor of the machine\n",
      "Pin=sqrt(3.)*Vl*Il*pf # input power in watts\n",
      "print\"Pin=\",Pin,\"W\"# The answer may vary due to roundoff error\n",
      "Whp=746. # watts per hp\n",
      "Pout=horsepower*Whp # output power in watts\n",
      "print\"Pout=\",Pout,\"W\"\n",
      "print\"n=\",Pout/Pin# The answer may vary due to roundoff error # efficiency of the machine\n",
      "print\"Losses=Pin-Pout=\",Pin-Pout,\"W\"# The answer may vary due to roundoff error # losses in the machine in watts"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pin= 2230.88144015 W\n",
        "Pout= 1865.0 W\n",
        "n= 0.835992431707\n",
        "Losses=Pin-Pout= 365.881440149 W\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E02 : Pg 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# the below exmaple is an extension of Ex1_1.sce\n",
      "from math import sqrt \n",
      "Vl=230. # terminal voltage of machine in volts\n",
      "Il=7. # current drawn by machine in amperes\n",
      "pf=0.8 # power factor of machine\n",
      "Pin=sqrt(3.)*Vl*Il*pf # from Ex1_1 # input power in watts\n",
      "Losses=365. # in watts\n",
      "Pout=Pin-Losses # output power in watts\n",
      "Whp=746. # watts per hp\n",
      "print\"n=1-(Losses/Input)=\",1.-(Losses/Pin) # The answer may vary due to roundoff error # efficiency of the machine\n",
      "print\"Pout=\",Pout,\"W\"# The answer may vary due to roundoff error\n",
      "print\"Pout=\",Pout/Whp,\"hp\"# The asnwer may vary due to roundoff error # output power in horsepower"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "n=1-(Losses/Input)= 0.836387540175\n",
        "Pout= 1865.88144015 W\n",
        "Pout= 2.50118155516 hp\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E03 : Pg 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt,pi \n",
      "f=60. # frequency of voltage source in Hz\n",
      "x=1.9 # Steinmetz coefficient\n",
      "V=80. # applied sinusoidal voltage in volts\n",
      "t=100. # no of turns wound on a coil\n",
      "hc=500. # hysteresis coefficient \n",
      "w=2.*pi*f # angular frequency in rads/sec\n",
      "phimax=(sqrt(2.)*V)/(t*w)# maximum value of flux in the core in webers\n",
      "print\"phimax=\",phimax,\"Wb\"# the answer may vary due to roundoff error\n",
      "A1=0.0025 # cross-sectional area of core in metre square\n",
      "Bmax1=phimax/A1 # flux density in core A in tesla\n",
      "print\"Bmax=\",Bmax1,\"T\"# the answer may vary due to roundoff error\n",
      "lfe1=0.5 # mean flux path length of core A in meters\n",
      "VolA=A1*lfe1 # volume of core A in metre cube\n",
      "print\"VolA=\",VolA,\"metre cube\"\n",
      "# for core A\n",
      "Ph1=VolA*f*hc*(Bmax1**x) # hysteresis loss in core A in watts\n",
      "print\"Ph=\",Ph1,\"W\"# the answer may vary due to roundoff error\n",
      "# for core B\n",
      "A2=A1*3. # cross sectional area of core B in metre square\n",
      "lfe2=0.866 # mean flux path length of core B in metres\n",
      "Bmax2=phimax/A2 # flux density in core B in tesla\n",
      "VolB=A2*lfe2 # volume of core B in metre cubes\n",
      "Ph2=VolB*f*hc*(Bmax2**x) # hysteresis loss of core B in watts\n",
      "print\"Ph=\",Ph2,\"W\"# the answer may vary due to roundoff error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "phimax= 0.00300105438719 Wb\n",
        "Bmax= 1.20042175488 T\n",
        "VolA= 0.00125 metre cube\n",
        "Ph= 53.0597985532 W\n",
        "Ph= 34.1904136606 W\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E04 : Pg 18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "V1=240. # voltage applied to a winding of transformer(three phase) in volts\n",
      "f1=60. # initial applied frequency in Hz\n",
      "f2=30. # reduced frequency in Hz\n",
      "Phe1=400. # core loss in watts at f1 frequency\n",
      "Phe2=169. # core losses in watts at f2 frequency\n",
      "print\"V2=\",(f2*V1)/f1,\"V\"# voltage at 30 Hz frequency\n",
      "print\"Ph+e/f=Ch+Ce*f\"# equation for claculating  hysteresis and eddy current loss coefficients\n",
      "#a=[1 f1;1 f2] # left hand side matix for the equation above\n",
      "#b=[Phe1/f1;Phe2/f2] # right hand side matrix for the equation above\n",
      "#c=inv(a)*b\n",
      "Ch=4.6#c(1,:)# hysteresis loss coefficient in W/Hz\n",
      "Ce=0.0344#c(2,:)# eddy current loss coefficient in W/(Hz*Hz)\n",
      "print\"Ph=\",Ch*f1,\"W\"# ans may vary due to roundoff error # hysteresis loss in watts at 60 Hz\n",
      "print\"Pe=\",round(Ce*f1*f1),\"W\"# ans may vary due to roundoff error # eddy current loss at 60 Hz in watts"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V2= 120.0 V\n",
        "Ph+e/f=Ch+Ce*f\n",
        "Ph= 276.0 W\n",
        "Pe= 124.0 W\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E05 : Pg 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt \n",
      "Pk=75. # core loss of transfomer in watts\n",
      "R=0.048 # internal resistance in ohms\n",
      "V2=240.#  secondary voltage in volts\n",
      "I2=sqrt(Pk/R)# secondary current in amperes\n",
      "print\"I2=\",round(I2),\"A\"# ans may vary due to roundoff error\n",
      "print\"|S|=V2*I2=\",round(V2*I2),\"VA\"# The answer in the textbook is wrong # output volt ampere of transformer"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "I2= 40.0 A\n",
        "|S|=V2*I2= 9487.0 VA\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E06 : Pg 22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "sfl=1746 # speed at full load in rev/min\n",
      "snl=1799.5 # speed at no load in rev/min\n",
      "print\"Voltage Regulation=\",round((snl-sfl)/sfl,5) # the ans may vary due to round of error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage Regulation= 0.03064\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E07 : Pg 22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Vnl=27.3 # no load voltage in volts\n",
      "Vfl1=24.   # full load voltage at power factor 1 in volts\n",
      "print\"(Vnl-Vfl/Vfl)=\",(Vnl-Vfl1)/Vfl1# ans may vary due to roundoff error\n",
      "Vfl2=22.1 # full load voltage at power factor 0.7 in volts\n",
      "print\"Voltage Regulation=\",round((Vnl-Vfl2)/Vfl1,4)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(Vnl-Vfl/Vfl)= 0.1375\n",
        "Voltage Regulation= 0.2167\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}