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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 9 : Kirchoff's Laws"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example No. 9_1 Page No. 268"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Branch 3 Current I3 = 4.5 Amps\n"
]
}
],
"source": [
"# Apply Kirchhoff’s current law to solve for the unknown current, I3.\n",
"\n",
"# Given data\n",
"\n",
"I1 = 2.5# # Branch 1 Current=2.5 Amps\n",
"I2 = 8# # Branch 2 Current=8 Amps\n",
"I4 = 6# # Branch 3 Current=6 Amps\n",
"I5 = 9# # Branch 4 Current=9 Amps\n",
"\n",
"# I1+I2+I3-I4-I5 = 0 Sum of all currents at node is ZERO\n",
"# I1+I2+I3 = I4+I5 Total Incomming Current = Total Outgoing Current\n",
"\n",
"I3 = I4+I5-I1-I2#\n",
"print 'The Branch 3 Current I3 = %0.1f Amps'%I3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example No. 9_2 Page No. 275"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Voltage V(AG) = 7.20 Volts\n",
"The Voltage V(BG) = -1.80 Volts\n"
]
}
],
"source": [
"# Apply Kirchhoff’s voltage law to solve for the voltages V(AG) & V(BG).\n",
"\n",
"# Given data\n",
"\n",
"V1 = 18.# # Source Voltage 1=18 Volts\n",
"V2 = 18.# # Source Voltage 2=18 Volts\n",
"R1 = 120.# # Resistor 10=120 Ohms\n",
"R2 = 100.# # Resistor 2=100 Ohms\n",
"R3 = 180.# # Resistor 3=180 Ohms\n",
"\n",
"Vt = V1+V2#\n",
"Rt = R1+R2+R3#\n",
"\n",
"I = Vt/Rt#\n",
"\n",
"VR1 = I*R1#\n",
"VR2 = I*R2#\n",
"VR3 = I*R3#\n",
"\n",
"# V1+V2-VR1-VR2-VR3=0 Sum of all Voltages in loop is ZERO\n",
"# V1+V2 = VR1+VR2+VR3 Total Applied Voltage = Total Dropped Voltage in Resistors\n",
"\n",
"Vt = VR1+VR2+VR3#\n",
"\n",
"VAG = VR2+VR3-V2#\n",
"print 'The Voltage V(AG) = %0.2f Volts'%VAG\n",
"\n",
"VBG = V1-VR1-VR2#\n",
"print 'The Voltage V(BG) = %0.2f Volts'%VBG"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|