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
|
{
"metadata": {
"name": "",
"signature": "sha256:07d1a1891f05681129f5b923a45c9d13a9e8c4e25902a3f29878a40044aa6a7c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3 : Circuit Laws"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3 Page No : 45"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Given\n",
"#Equivalent resistance of three resistors is 750 ohm\")\n",
"#values of two resistors are 40 ohm and 410 ohm\")\n",
"Req = 750;\n",
"R1 = 40;\n",
"R2 = 410;\n",
"\n",
"#For series resistance \n",
"#Req = R1+R2+R3\")\n",
"#On solving for R3\n",
"R3 = Req-R1-R2\n",
"print \"Value of third ohmic resistor is %d ohm\"%(R3)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Value of third ohmic resistor is 300 ohm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4 Page No : 49"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"#Example 3.4\")\n",
"# Given\n",
"#values of two capacitors are 2uF and 10uF\")\n",
"C1 = 2*10**-6;\n",
"C2 = 10*10**-6;\n",
"#For two capacitors in series\n",
"#Ceq = (C1*C2)/(C1+C2)\")\n",
"#On solving for Ceq\n",
"Ceq = ((C1*C2)/(C1+C2))*10**6\n",
"print \"Value of equivalent capacitance is %3.2fuF\"%(Ceq)\n",
"\n",
"#If C2 = 10pF\")\n",
"C2 = 10*10**-12;\n",
"\n",
"Ceq = ((C1*C2)/(C1+C2))*10**12\n",
"print \"Value of equivalent capacitance is %3.2fpF\"%(Ceq)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Value of equivalent capacitance is 1.67uF\n",
"Value of equivalent capacitance is 10.00pF\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.5 Page No : 53"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"#Example 3.5\")\n",
"# Given\n",
"#a)\")\n",
"#values of two resistors are 60 ohm and 60 ohm\")\n",
"R1 = 60;\n",
"R2 = 60.;\n",
"#If resistors are parallel\")\n",
"Req = (R1*R2)/(R1+R2)\n",
"print \"Value of equivalent resistance is %d ohm\"%(Req)\n",
"\n",
"#b)\")\n",
"#values of three equal resistors are 60 ohm\")\n",
"R1 = 60.;\n",
"R2 = 60.;\n",
"R3 = 60.;\n",
"#If resistors are parallel\")\n",
"x = 1/R1+1/R2+1/R3\n",
"Req = 1/x;\n",
"print \"Value of equivalent resistance is %d ohm\"%(Req)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Value of equivalent resistance is 30 ohm\n",
"Value of equivalent resistance is 20 ohm\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.6 Page No : 55"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"#Example 3.6\")\n",
"\n",
"# Given\n",
"#values of two inductors are 3mH and 6 mH\")\n",
"L1 = 3*10**-3;\n",
"L2 = 6*10**-3;\n",
"#If inductors are parallel\")\n",
"Leq = ((L1*L2)/(L1+L2))*10**3\n",
"print \"Value of equivalent inductance is %3.1f mH\"%(Leq)\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Value of equivalent inductance is 2.0 mH\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.7 Page No : 60"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"#Example 3.7\")\n",
"\n",
"# Given\n",
"#Total resistance of three resistors is 50 ohm\")\n",
"R = 50;\n",
"#Output voltage is 10 percent of the input voltage\")\n",
"#Let v be input voltage and v1 be output voltage\n",
"#Let v1/v = V\n",
"V = 0.1;\n",
"#As V = R1/(Total resistance)\n",
"\n",
"#Solving for R1\n",
"R1 = V*R;\n",
"#As R = R1+R2\n",
"#Solving for R2\n",
"R2 = R-R1;\n",
"\n",
"# Results\n",
"print \"R1 = %dohm R2 = %dohm\"%(R1,R2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"R1 = 5ohm R2 = 45ohm\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.8 Page No : 65"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"#Example 3.8\")\n",
"\n",
"# Given\n",
"#Total current is 30mA\")\n",
"#Branch currents are 20mA and 10mA\")\n",
"#Equivalent resistance is equal to or greater than 10 ohm\")\n",
"\n",
"#From Fig 3.6\n",
"#Current flowing through R1 be i1 and let it be equal to 10mA\n",
"#Current flowing through R2 be i2 and let it be equal to 20mA\n",
"i1 = 10*10**-3;\n",
"i2 = 20*10**-3;\n",
"i = 30*10**-3;\n",
"\n",
"# Calculation\n",
"#Let R1/(R1+R2) = X1 (1)\n",
"#Let R2/(R1+R2) = X2 (2)\n",
"X1 = i1/i;\n",
"X2 = i2/i;\n",
"#Let R1*R2(R1+R2) = Y (3)\n",
"\n",
"# Results\n",
"#Given that \n",
"print \" Given\"\n",
"#R1*R2(R1+R2)> = 10\")\n",
"#Solving (1),(2) and (3) we get\n",
"print \"R1> = %dohmR2> = %dohm\"%(15,30)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Given\n",
"R1> = 15ohmR2> = 30ohm\n"
]
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}
|