summaryrefslogtreecommitdiff
path: root/sample_notebooks/MayurSabban/ChapterNo04.ipynb
blob: c6f434bb6acfdda3b2507c54d33e5abf13ca92c9 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 02 : Capacitance Of Transmission Lines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1, Page No 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "D = 20.0 #in ft\n",
      "f = 60.0 #in Hz\n",
      "\n",
      "#From Table A.1 and A.3\n",
      "d = 0.642 \t\t\t#in inches\n",
      "X_a = 0.1074e6 \t\t#in ohm-mi\n",
      "X_d = 0.0889e6 \t\t#in ohm-mi\n",
      "\n",
      "#finding radius\n",
      "r = d/(2*12) \t\t#divided by 12 convert in to ft\n",
      "\n",
      "#Calculations\n",
      "print('Calculations using conductor spacing and radius')\n",
      "X_c = 1.779 * math.log(D/r)/f\n",
      "B_c = 1 / X_c\n",
      "print(\" Capactive reatance = %.4fe6 ohm mi to neutral \" %X_c)\n",
      "print(\" Capactive susceptance = %.4fe-6 mho/mi to neutral \" %B_c)\n",
      "\n",
      "#calculations using capacitive reactance at 1-ft spacing and spacing factor\n",
      "print('Calculations using capacitive reactance at 1-ft spacing and spacing factor')\n",
      "X_c1 = X_a + X_d\n",
      "print(\" Capactive reatance = %.4fe6 ohm mi per conductor \" %(X_c1/10**6))\n",
      "X_c11 = 2 * X_c1\n",
      "B_c1 = 1 / X_c11\n",
      "\n",
      "#Results\n",
      "print(\" Line-to-line capactive reatance = %.4fe6 ohm mi \" %(X_c11/10**6))\n",
      "print(\" Line-to-line capactive susceptance = %.4fe-6 mho mi \" %(B_c1*10**6))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Calculations using conductor spacing and radius\n",
        " Capactive reatance = 0.1962e6 ohm mi to neutral \n",
        " Capactive susceptance = 5.0970e-6 mho/mi to neutral \n",
        "Calculations using capacitive reactance at 1-ft spacing and spacing factor\n",
        " Capactive reatance = 0.1963e6 ohm mi per conductor \n",
        " Line-to-line capactive reatance = 0.3926e6 ohm mi \n",
        " Line-to-line capactive susceptance = 2.5471e-6 mho mi \n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2, Page No 80"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "D_12 = 20.0\t\t\t#in ft\n",
      "D_23 = D_12\n",
      "D_31 = 38.0\t\t\t#in ft\n",
      "f = 60.0\t\t\t#in Hz\n",
      "V = 220e3\t\t\t#in volts\n",
      "l = 175\t\t\t\t#in mi\n",
      "k = 8.85e-12\t\t#permittivity in F/m\n",
      "#From tables A.1 and A.3\n",
      "d = 1.108#in inches\n",
      "X_a1 = 0.0912e6#in ohm mi\n",
      "X_d1 = 0.0952e6#in ohm mi\n",
      "\n",
      "#Calculations\n",
      "r = d / ( 2 * 12)#division by 12 to convert in to ft\n",
      "D_eq = (D_12*D_23*D_31)**(1.0/3)\n",
      "C_n = (2*math.pi*k)/math.log(D_eq/r)\n",
      "X_c = 1.0/(2*math.pi*f*C_n*1609)\t\t#division by 1609 to convert to ohm mi\n",
      "\n",
      "print(\" Capacitance = %.4fe-12 F/m \" %(C_n*1e12))\n",
      "print(\" Capacitive reactance = %.4fe6 ohm mi \" %(X_c/1e6))\n",
      "\n",
      "#Calculations From tables\n",
      "X_c1 = X_a1 + X_d1\n",
      "print('Using capacitive reactance at 1-ft spacing and spacing factor')\n",
      "print(\" Capacitive reactance = %.4fe6 ohm mi \" %(X_c1/1e6))\n",
      "X_c_l = X_c1/l\t\t\t#Capacitive reactance for 175mi\n",
      "I_chg = 2*math.pi*f*V*C_n*1609/math.sqrt(3.0)\n",
      "I_chg_l = I_chg * l\n",
      "Q =math.sqrt(3)*V*I_chg_l\n",
      "\n",
      "\n",
      "#Results\n",
      "print('For a lenght of 175mi')\n",
      "print(\" Capacitive reactance = %.4f ohm to neutral \" %X_c_l)\n",
      "print(\" Charging current per mile = %.3f A/mi \" %I_chg)\n",
      "print('For a lenght of 175mi')\n",
      "print(\" Charging current = %.0f A \" %I_chg_l)\n",
      "print(\" Total charging megavolt-amperes = %.1f Mvar \" %(Q/1e6))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Capacitance = 8.8472e-12 F/m \n",
        " Capacitive reactance = 0.1863e6 ohm mi \n",
        "Using capacitive reactance at 1-ft spacing and spacing factor\n",
        " Capacitive reactance = 0.1864e6 ohm mi \n",
        "For a lenght of 175mi\n",
        " Capacitive reactance = 1065.1429 ohm to neutral \n",
        " Charging current per mile = 0.682 A/mi \n",
        "For a lenght of 175mi\n",
        " Charging current = 119 A \n",
        " Total charging megavolt-amperes = 45.5 Mvar \n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3, Page No 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "d = 0.45   #in m\n",
      "k = 8.85e-12  #in F/m\n",
      "D_ab = 8  #in m\n",
      "D_bc = D_ab\n",
      "D_ca = 16   #in m\n",
      "f = 60  #in Hz\n",
      "\n",
      "#From tables\n",
      "D = 1.382   #in inches\n",
      "\n",
      "#Calculations\n",
      "r = D*0.3048/(2.0*12)  #divison by 12 to convert in to ft\n",
      "                           #multiplication by 0.3048 to convert ft to m\n",
      "D_b_sC = math.sqrt( r * d)\n",
      "D_eq = (D_ab * D_bc * D_ca)**(1/3)\n",
      "C_m = 2* math.pi*k/math.log(D_eq / D_b_sC)\n",
      "X_c = 1e-3/(2*math.pi*f*C_m)  #1e-3     #to convert m to km\n",
      "\n",
      "#Results\n",
      "print(\" Capacitance = %.3fe-12 F/m \" %(C_m * 1e12))\n",
      "print(\" Capacitive reactance = %.4fe6 ohm km per phase to neutral\" %(X_c/1e6))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Capacitance = 22.972e-12 F/m \n",
        " Capacitive reactance = 0.1155e6 ohm km per phase to neutral\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4 Page No 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "f = 60.0\t\t#in Hz\n",
      "k = 8.85e-12\t#in F/m\n",
      "D_eq = 16.1\t\t#in ft\n",
      "D_a_a1 = 26.9\n",
      "D_b_b1 = 21.0\n",
      "D_c_c1 = D_a_a1 #in ft\n",
      "\n",
      "#From Table A.1\n",
      "d = 0.680#in inches\n",
      "\n",
      "#calculations\n",
      "r = d /(2*12)\n",
      "D_p_sC = (math.sqrt(D_a_a1 * r) * math.sqrt(D_b_b1 * r) * math.sqrt(D_c_c1 * r))**(1.0/3)\n",
      "C_n = 2 * math.pi * k / math.log(D_eq / D_p_sC)\n",
      "B_c = 2 * math.pi * f * C_n * 1609.0\t#1609 to convert from m to mi\n",
      "\n",
      "#Results\n",
      "print(\"printprint Capacitance = %.3fe-12 F/m printprint\" %(C_n*1e12))\n",
      "print(\"printprint Capacitive susceptance = %.2fe-6 mho per mi per phase to neutral\" %(B_c*1e6))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "printprint Capacitance = 18.812e-12 F/m printprint\n",
        "printprint Capacitive susceptance = 11.41e-6 mho per mi per phase to neutral\n"
       ]
      }
     ],
     "prompt_number": 17
    }
   ],
   "metadata": {}
  }
 ]
}