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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 23: Electric Fields"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 23.2: Sample_Problem_2.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"Q = 1 //(say)\n",
"q1 = +2*Q\n",
"q2 = -2*Q\n",
"q3 = -4*Q\n",
"d = 1 //(say)\n",
"theta = dtor(30)\n",
"\n",
"//Sample Problem 23-2\n",
"printf('**Sample Problem 23-2**\n')\n",
"E1 = coulomb(q1, 1, d)*[cos(theta), sin(theta)]\n",
"E2 = coulomb(q2, 1, d)*[-cos(theta), sin(theta)]\n",
"E3 = coulomb(q3, 1, d)*[-cos(theta), -sin(theta)]\n",
"E = E1 + E2 + E3\n",
"printf('The net electric field at origin is equal to %eQ/d^2 N/C', norm(E))"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 23.3: Sample_Problem_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('electrostatics.sci', -1)\n",
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"Q = 1 //(say)\n",
"A = dtor(120)\n",
"r = 1 //(say)\n",
"\n",
"//Sample Problem 23-3\n",
"printf('**Sample Problem 23-3**\n')\n",
"Eunit_angle = coulomb(Q/A, 1, r)\n",
"//overall only x-component will survive\n",
"E = integrate('Eunit_angle*cos(theta)', 'theta', -A/2, A/2)\n",
"printf('The electric field due to arc at point P is equal to %eQ/r^2 N/C', E)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 23.4: Sample_Problem_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"m = 1.3*10^-10 //in kg\n",
"Q = 1.5*10^-13 //in C\n",
"Vx = 18 //in m/s\n",
"L = 1.6*10^-2 //in meter\n",
"E = 1.4*10^6 //in N/C\n",
"\n",
"//Sample Problem 23-4\n",
"printf('**Sample Problem 23-4**\n')\n",
"a = E*Q/m\n",
"t = L/Vx\n",
"dv = 0.5*a*t^2 //vertical drop\n",
"printf('The vertical drop of the drop is equal to %fmm', dv*10^3)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 23.5: Sample_Problem_5.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"P = 6.2*10^-30 //in C.m\n",
"\n",
"//Sample Problem 23-5a\n",
"printf('**Sample Problem 23-5a**\n')\n",
"q = 10*e\n",
"l = P/q\n",
"printf('The effective ditance between the positive & negative center is %em\n', l)\n",
"\n",
"//Sample Problem 23-5b\n",
"printf('\n**Sample Problem 23-5b**\n')\n",
"E = 1.5*10^4 //in N/C\n",
"T = 2*E*q*l/2\n",
"printf('The net torque on the dipole is %eN.m\n', T)\n",
"\n",
"//Sample Problem 23-5c\n",
"printf('\n**Sample Problem 23-5c**\n')\n",
"W = -(P*E*(cos(dtor(180)) - cos(0)))\n",
"printf('The work done by the external agent is equal to %eJ', W)"
]
}
],
"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
}
|