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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 25: Electric Potential"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 25.1: Sample_Problem_1.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"\n",
"//Given that\n",
"E = 150 //in N/C\n",
"d = -520 //in meter\n",
"\n",
"//Sample Problem 25-1\n",
"printf('**Sample Problem 25-1**\n')\n",
"W = E*(-e)*d\n",
"deltaU = -W\n",
"printf('The change in potential energy is %eJ', deltaU)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 25.3: Sample_Problem_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"\n",
"//Given that\n",
"d = 1.3 //in meter\n",
"q1 = 12*10^-9 //in C\n",
"q2 = -24*10^-9 //in C\n",
"q3 = +31*10^-9 //in C\n",
"q4 = 17*10^-9 //in C\n",
"\n",
"//Sample Problem 25-3\n",
"printf('**Sample Problem 25-3**\n')\n",
"V = EPotential(q1+q2+q3+q4, d/sqrt(2))\n",
"printf('The electric potential at point P is equal to %eV', V)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 25.4: Sample_Problem_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"\n",
"//Given that\n",
"n = 12\n",
"qT = -n*e\n",
"R = 1 //(say)\n",
"\n",
"//Sample Problem 25-4a\n",
"printf('**Sample Problem 25-4a**\n')\n",
"V = EPotential(qT, R)\n",
"printf('The electric potential at the center is equal to %e/R Volts', V)\n",
"\n",
"//Sample Problem 25-4b\n",
"printf('**Sample Problem 25-4b**\n')\n",
"printf('It does not change in this configuration')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 25.6: Sample_Problem_6.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"\n",
"//Given that\n",
"d = 12*10^-2 //in cm\n",
"q = 150*10^-9 //in C\n",
"q1 = +q\n",
"q2 = -4*q\n",
"q3 = +2*q\n",
"\n",
"//Sample Problem 25-6\n",
"printf('**Sample Problem 25-6**\n')\n",
"U = EPotential(q1, d)*q2 + EPotential(q2, d)*q3 + EPotential(q3, d)*q1\n",
"printf('The electric potential energy of the system is equal to %eJ', U)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|