summaryrefslogtreecommitdiff
path: root/Generation_Of_Electrical_Energy_by_B._R._Gupta/Chaper12.ipynb
blob: e57b4fb8165b0ab0b002deefa2395d72ce0fb012 (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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
{
 "metadata": {
  "name": "",
  "signature": "sha256:b9d84b1a6a0dbb810fc6a5bae05f1ff37f6ce977a8c979c290e417ab5d5dbdef"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Ch-12, Parallel Operation of alternators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.1 Page 243"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "p=4000  #given kva of alternator\n",
      "fnl1=50  #frequency on no load\n",
      "fl1=47.5 #frequency on load\n",
      "fnl2=50 #frequency on no load on second alternator\n",
      "fl2=48  #frequency on load on second alternator\n",
      "l=6000 #load given two to alternator\n",
      "df1=fnl1-fl1  #change in 1 alternator frequency\n",
      "df2=fnl2-fl2  #change in 2 alternator frequency\n",
      "l1=df2*(l)/(df2+df1)  #load on 1 alternator\n",
      "print 'a'\n",
      "l2=l-l1\n",
      "print \" load on 1 alternator %.2fkW \\n load on 2 alternator %.2fkW\"%(l1,l2)\n",
      "ml1=df2*p/df1   #load on 1 machine when machine 2 on full load\n",
      "ll=ml1+p  \n",
      "print 'b'\n",
      "print \" load supplied by machine 1 with full load on machine2 %dkW \\n total load is %dkW\"%(ml1,l1) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a\n",
        " load on 1 alternator 2666.67kW \n",
        " load on 2 alternator 3333.33kW\n",
        "b\n",
        " load supplied by machine 1 with full load on machine2 3200kW \n",
        " total load is 2666kW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.2 page 243"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt, atan, acos, pi, sin\n",
      "l1=3000 #load on 1 machine\n",
      "pf1=0.8  #pf on 1 machine\n",
      "i2=150  #current on  2 machine\n",
      "z1=0.4+12*1J  #synchronour impedence\n",
      "z2=0.5+10*1J\n",
      "vt=6.6  #terminal voltage\n",
      "al=l1/2  #active load on each machine\n",
      "cosdb=al/(vt*i2*sqrt(3)) #cos db\n",
      "db=acos(cosdb)*180/pi  #angle in digree\n",
      "ib=i2*complex(cosdb,-sin(db*pi/180))  #current in complex number\n",
      "it=l1/(vt*pf1*sqrt(3))  #total current\n",
      "itc=complex(it*pf1,-it*sin(acos(pf1)))  #total current in complex\n",
      "ia=itc-ib  \n",
      "pfa=atan(ia.imag/ia.real)  #pf of current a\n",
      "ea=(vt/sqrt(3))+ia*(z1)/1000  #voltage a\n",
      "pha=atan(ea.imag/ea.real)*180/pi  #phase angle of unit a\n",
      "print \"induced emf of a machine a %.2f+%.2fi =%fkV per phase\"%(ea.real,ea.imag,abs(ea))\n",
      "eb=(vt/sqrt(3))+ib*(z2)/1000  #voltage b\n",
      "phb=atan(eb.imag/eb.real)*180/pi  #phase angle of unit b\n",
      "print \"\\ninduced emf of a machine b %.2f+%.2fi =%fkV per phase\"%(eb.real,eb.imag,abs(eb))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "induced emf of a machine a 5.35+1.52i =5.565708kV per phase\n",
        "\n",
        "induced emf of a machine b 4.60+1.28i =4.776461kV per phase\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.3 Page 244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import cos\n",
      "e1=3000 ;ph1=20 ;e2=2900; ph2=0 #given induced emf of two machines\n",
      "z1=2+20*1J ;z2=2.5+30*1J #impedence of two synchronous machine\n",
      "zl=10+4*1J #load impedence\n",
      "e11=e1*(cos(ph1*pi/180)+sin(ph1*pi/180)*1J)\n",
      "e22=e2*(cos(ph2*pi/180)+sin(ph2*pi/180)*1J)\n",
      "Is=(e11-e22)*zl/(z1*z2+(z1+z2)*zl)\n",
      "print \"current is %.2f%.2fiA =%.2fA\"%((Is).real,(Is).imag,abs(Is))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "current is 10.37-4.56iA =11.33A\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.4 Page 244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "z=10+5*1J  #load\n",
      "e1=250 ;e2=250 #emf of generator\n",
      "z1=2*1J; z2=2*1J #synchronous impedence\n",
      "v=(e1*z2+z1*e2)/((z1*z2/z)+z1+z2) \n",
      "vph=atan(v.imag/v.real)*180/pi #substitution the value in equation 12.10\n",
      "i1=(z2*e1+(e1-e2)*z)/(z1*z2+(z1+z2)*z); iph=atan((i1).imag/(i1).real)*180/pi #substitution the value in equation 12.7\n",
      "pf1=cos(pi/180*(vph-iph))\n",
      "pd=v*i1*pf1\n",
      "z=10+5*1J  #load\n",
      "e1=250 ;e2=250 #emf of generator\n",
      "z1=2*1J; z2=2*1J #synchronous impedence\n",
      "v=(e1*z2+z1*e2)/((z1*z2/z)+z1+z2) \n",
      "vph=atan(v.imag/v.real)*180/pi #substitution the value in equation 12.10\n",
      "i1=(z2*e1+(e1-e2)*z)/(z1*z2+(z1+z2)*z) \n",
      "iph=atan(i1.imag/i1.real)*180/pi #substitution the value in equation 12.7\n",
      "pf1=cos(pi/180*(vph-iph))\n",
      "pd=v*i1*pf1\n",
      "print \"terminal voltage %.2fV \\ncurrent supplied by each %.2fA \\npower factor of each %.3f lagging \\npower delivered by each %.4fKW\"%(abs(v),abs(i1),abs(pf1),abs(pd))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "terminal voltage 239.68V \n",
        "current supplied by each 10.72A \n",
        "power factor of each 0.894 lagging \n",
        "power delivered by each 2297.7941KW\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.5 Page 247"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "po=5 #mva rating\n",
      "v=10 #voltage in kv\n",
      "n=1500 ;ns=n/60 #speed\n",
      "f=50 #freaquency\n",
      "pfb=0.8#power factor in b\n",
      "x=0.2*1J #reactance of machine\n",
      "md=0.5 #machanical displacement\n",
      "#no load\n",
      "v=1 ;e=1 \n",
      "p=4\n",
      "spu=v*e/abs(x); sp=spu*po*1000 ;mt=(pi*p)/(180*2)\n",
      "spm=sp*mt #synchronous power in per mech.deree\n",
      "st=spm*md*1000/(2*ns*pi)\n",
      "print '(a)'\n",
      "print \" synchronous power %dkW \\n synchronous torque for %.1f displacement %dN-M\"%(spm,md,st)\n",
      "print '(b) full load'\n",
      "ee=e+x*(pfb-sin(acos(pfb))*1J)\n",
      "spb=v*abs(ee)*cos(atan(ee.imag/ee.real))/abs(x)  #synchronous power \n",
      "sppm=spb*po*1000*mt #synchronous power per mech.degree\n",
      "stp=sppm*md*1000/(2*pi*ns)#synchrounous torque under load\n",
      "print \" synchronous power %dkW \\n synchronous torque for %.1f displacement %dN-M\"%(sppm,md,stp)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        " synchronous power 872kW \n",
        " synchronous torque for 0.5 displacement 2777N-M\n",
        "(b) full load\n",
        " synchronous power 977kW \n",
        " synchronous torque for 0.5 displacement 3111N-M\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.6 page 248"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "po=2*10**6 ;p=8 ;n=750; v=6000 ;x=6*1J ;pf=0.8 #given \n",
      "i=po/(v*sqrt(3))\n",
      "e=(v/sqrt(3))+i*x*(pf-sin(acos(pf))*1J)\n",
      "mt=p*pi/(2*180)\n",
      "cs=cos(atan(e.imag/e.real))\n",
      "ps=abs(e)*v*sqrt(3)*cs*mt/(1000*abs(x))\n",
      "ns=n/60\n",
      "ts=ps*1000/(2*pi*ns)\n",
      "print \" synchronous power %.1fkW per mech.degree \\n synchrounous torque %dN-m\"%(ps,ts)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " synchronous power 502.7kW per mech.degree \n",
        " synchrounous torque 6666N-m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example 12.7 page 248"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "i=100 ;pf=-0.8 ;v=11*1000 ;x=4*1J ;ds=10; pfc=-0.8 #given,currents,power factor,voltage,reactance,delta w.r.t steem supply,pf of alternator\n",
      "e=(v/sqrt(3))+(i*x*(pf-sin(acos(pf))*1J))\n",
      "print 'a'\n",
      "ph=atan(e.imag/e.real)*180/pi\n",
      "print \" open circuit emf %dvolts per phase and %.2f degree\"%(abs(e),ph)\n",
      "d=ds-ph\n",
      "eee=round(abs(e)/100)*100\n",
      "ic=round(abs(eee)*sin(d*pi/180)/abs(x))\n",
      "iis=(eee**2-(abs(x)*ic)**2)**(0.5)\n",
      "Is=(iis-v/sqrt(3))/abs(x)\n",
      "tad=Is/ic\n",
      "d=atan(tad)*180/pi\n",
      "ii=ic/cos(d*pi/180)\n",
      "pff=cos(d*pi/180)\n",
      "print 'b.'\n",
      "print \" current %.1fA \\n power factor %.3f\"%(ii,pff)\n",
      "print 'c.'\n",
      "ia=ii*pff/abs(pfc)\n",
      "print \"current %.2fA\"%(ia)\n",
      "\n",
      "ia=ii*pff/abs(pfc)\n",
      "print \"current %.2fA\"%(ia)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a\n",
        " open circuit emf 6598volts per phase and -2.78 degree\n",
        "b.\n",
        " current 365.6A \n",
        " power factor 0.998\n",
        "c.\n",
        "current 456.25A\n",
        "current 456.25A\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}