summaryrefslogtreecommitdiff
path: root/Physics_for_BSc(Paper-3)/Chapter4.ipynb
blob: 3a0be6287af971841b3f96db58dc05a9561bd8cb (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:50315b4dee267422712255a4580dea3156e39933e372f17694b3cb35adb8e098"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "4: Capacitors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.1, Page number 91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r=6750*10**3;    #radius of earth(m)\n",
      "#let x=4*pi*epsilon0\n",
      "x=1/(9*10**9);  \n",
      "\n",
      "#Calculation\n",
      "C=x*r;    #capacitance(F)\n",
      "C=C*10**6;    #capacitance(micro F)\n",
      "\n",
      "#Result\n",
      "print \"capacitance is\",C,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "capacitance is 750.0 micro F\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.2, Page number 91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "C1=20*10**-6;    #capacitance(F)\n",
      "V1=500;    #potential(V)\n",
      "C2=10*10**-6;   #capacitance(F)\n",
      "V2=200;    #potential(V)\n",
      "\n",
      "#Calculation\n",
      "q1=C1*V1;   #charge on 1st capacitor(C)\n",
      "q2=C2*V2;   #charge on 2nd capacitor(C)\n",
      "C=C1+C2;   #resultant capacitance(C)\n",
      "V=(q1+q2)/C;   #combined potential(V)\n",
      "\n",
      "#Result\n",
      "print \"combined potential is\",V,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "combined potential is 400.0 V\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.3, Page number 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "Cp=5;   #resultant capacitance in parallel(micro F)\n",
      "Cs=1.2;   #resultant capacitance in series(micro F)\n",
      "\n",
      "#Calculation\n",
      "C1C2=Cp*Cs;    #product of capacitance(micro F)\n",
      "C1_C2=math.sqrt((Cp**2)-(4*C1C2));    #difference of capacitance(micro F)\n",
      "twoC1=Cp+C1_C2;   \n",
      "C1=twoC1/2;   \n",
      "twoC2=Cp-C1_C2;\n",
      "C2=twoC2/2;\n",
      "\n",
      "#Result\n",
      "print \"values of capacitors are\",C1,\"micro F and\",C2,\"micro F\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "values of capacitors are 3.0 micro F and 2.0 micro F\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.4, Page number 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "C=0.2*10**-6;   #capacitance(F)\n",
      "V=2;   #potential(V)\n",
      "\n",
      "#Calculation\n",
      "U=(1/2)*C*(V**2);    #energy stored(J)\n",
      "\n",
      "#Result\n",
      "print \"energy stored is\",U,\"J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy stored is 4e-07 J\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.5, Page number 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "A=1;   #area of plates(m**2)\n",
      "k=7;   #dielectric constant\n",
      "d=0.01*10**-2;   #distance between plates(m)\n",
      "V=300;    #potential(V)\n",
      "epsilon0=8.85*10**-12;   #dielectric permittivity of free space\n",
      "\n",
      "#Calculation\n",
      "C=k*epsilon0*A/d;    #capacitance(F)\n",
      "E=(1/2)*C*(V**2);    #energy stored in capacitor(J)\n",
      "\n",
      "#Result\n",
      "print \"energy stored in capacitor is\",round(E*10**3,3),\"*10**-3 J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy stored in capacitor is 27.877 *10**-3 J\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.6, Page number 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "A=2;    #area(m**2)\n",
      "d=1*10**-2;   #distance(m)\n",
      "V0=6000;   #potential(V)\n",
      "V=2000;    #potential(V)\n",
      "epsilon0=8.85*10**-12;   #dielectric permittivity of free space\n",
      "\n",
      "#Calculation\n",
      "C0=epsilon0*A/d;    #capacitance when there is no dielectric(F)\n",
      "Q=C0*V0;    #charge on each plate(C)\n",
      "C=Q/V;      #capacitance when there is dielectric(F)\n",
      "k=C/C0;   #dielectric constant\n",
      "E0=V0/d;   #electric field intensity with air medium(V/m)\n",
      "E=V/d;    #electric field intensity with dielectric(V/m)\n",
      "\n",
      "#Result\n",
      "print \"capacitance when there is no dielectric is\",C0*10**9,\"nF\"\n",
      "print \"charge on each plate is\",Q,\"C\"\n",
      "print \"capacitance when there is dielectric is\",C*10**9,\"nF\"\n",
      "print \"dielectric constant is\",k\n",
      "print \"electric field intensity with air medium is\",E0/10**5,\"*10**5 V/m\"\n",
      "print \"electric field intensity with dielectric is\",E/10**5,\"*10**5 V/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "capacitance when there is no dielectric is 1.77 nF\n",
        "charge on each plate is 1.062e-05 C\n",
        "capacitance when there is dielectric is 5.31 nF\n",
        "dielectric constant is 3.0\n",
        "electric field intensity with air medium is 6.0 *10**5 V/m\n",
        "electric field intensity with dielectric is 2.0 *10**5 V/m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.7, Page number 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "k=5.4;   #dielectric constant\n",
      "E=10**6;   #electric field intensity(V/m)\n",
      "A=50*10**-4;   #area(m**2)\n",
      "epsilon0=8.85*10**-12;   #dielectric permittivity of free space\n",
      "d=5*10**-3;   #distance(m)\n",
      "\n",
      "#Calculation\n",
      "u=(1/2)*k*epsilon0*(E**2);    #energy density(J/m**3)\n",
      "\n",
      "#Result\n",
      "print \"energy density is\",u,\"J/m**3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy density is 23.895 J/m**3\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}