using a computational approach for efficient calculations ... poster tb.pdf · david j. griffiths...
TRANSCRIPT
Abstract Results
Discussion
Using a Computational Approach for Efficient Calculations of Electrostatic Fields in Two Dimensions
Kristopher D. Valdez
Department of Physics, McMurry University, Abilene, TX 79697
References
\
Method
Finding an electrostatic field of a given configuration of electric charges is a laborious task in any and every way. To achieve this goal, the Laplace equation for electrostatic potential must be solved using an appropriate set of boundary conditions. This solution can be found using several different methods; experimental measurements can be performed, approximations based on the symmetry of the configuration of electric charges can give analytical solutions, or other various numerical methods can be employed. This research explores which method is the most efficient when calculating fields from potentials for cylindrically symmetrical problems in two dimensions. The conclusion is that a numerical approach reduces the amount of equipment needed and the time spent on calculations, making this approach the most efficient.
11
15
19
23
27
31
3539
0
1
2
3
4
5
6
7
8
9
10
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41
Y(C
M)
EL
EC
TR
IC F
IEL
D(V
/CM
)
X(CM)
Experimental
0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10
The electric potential and electric field were graphed in MS-Excel after taking many data points by hand. The experimental graphs show the smooth graph found; the appearance of the graphs are a product of the high precision obtained when taking the experimental approach.
The major upside to solving the problem using a numerical approach is that it takes much less time. The main problem with all three of the programs was that they treated the configuration as an ideal situation, but all three programs simulated the electric potential well. The results of the Gauss-Seidel method were the closest to the experimental data found, took much less time than the first program, and only took a few seconds more to run than the Over-Successive method. It took 1750 iterations to reach the best solution the program could compute, half that of the Jacobi method. Although the Over-Successive method only took 1200 iterations to reach its best possible solution, the solution was not as accurate as that of the Gauss-Seidel method. In fact, the time saved was a few seconds per run. After all the time spent optimizing the “weight” value used in the averaging function, it was decided that the Over-Successive method was not as accurate and not as efficient as the Gauss-Seidel method.
The experimental portion of the project was studied by using conductive paper and conductive paint to recreate the problem. Then, electric potentials were measured across the surface of the paper, a graph of the potentials on the surface of the paper was made. These potentials were then used to find the electric field with the equations below, but instead of derivatives, finite differences were used:
𝐸𝑥 =−𝜕𝑉
𝜕𝑥, 𝐸𝑦 =
−𝜕𝑉
𝜕𝑦→ 𝐸𝑥 =
−𝛥𝑉
𝛥𝑥, 𝐸𝑦 =
−𝛥𝑉
𝛥𝑦→ 𝐸 = 𝐸𝑥
2 + 𝐸𝑦2
Boundary conditions were used with Poisson’s equation to solve the problem analytically and numerically. This was solved for rectangular coordinates, plus there was no electric charge present (ρ=0):
𝜕2𝑉
𝜕𝑋2+
𝜕2𝑉
𝜕𝑌2= 0
The conductive paper (XY plane) was recreated with an array, V(i,j). The first derivative of the potential with respect to position was approximated by the change in potential from one point to another, in all four directions (left, right, above, and below the point be evaluated) divided by h. The distance between the points, h, was 5mm. The second derivative was found to be:
𝑉 𝑖+1,𝑗 −𝑉(𝑖,𝑗)
ℎ2-𝑉 𝑖,𝑗 −𝑉(𝑖−1,𝑗)
ℎ2+
𝑉 𝑖,𝑗+1 −𝑉(𝑖,𝑗)
ℎ2-𝑉 𝑖,𝑗 −𝑉(𝑖,𝑗−1)
ℎ2= 0
This was simplified to find the algorithm for the program written in FORTRAN to find V(i,j). This equation, a simple averaging function, was used for the iteration process to find electric potential at the next step based on its values on the previous step:
𝑉 𝑖, 𝑗 =1
4[𝑉 𝑖 + 1, 𝑗 + 𝑉 𝑖 − 1, 𝑗 + 𝑉 𝑖, 𝑗 + 1 + 𝑉 𝑖, 𝑗 − 1 ]
Series1
Series6
Series11
Series16Series21
Series26
0
1
2
3
4
5
6
7
8
9
10
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39
Y(c
m)
Vo
lta
ge
(V)
X (cm)
Jacobi- 3500 iterations
0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10
Series1
Series8
Series15
Series22
Series29
01234
5
6
7
8
9
10
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41
Y (
cm)
Vo
lta
ge
(V)
X (cm)
Gauss-Seidel – 1750 iterations
0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10
Jacobi method
𝑉𝑖, 𝑗
=1
4[𝑉
𝑖 + 1, 𝑗+ 𝑉
𝑖 − 1, 𝑗+ 𝑉
𝑖, 𝑗 + 1+ 𝑉
𝑖, 𝑗 − 1]
Potential values were not updated until an entire sweep was applied at each point
Gauss-Seidel method
𝑉𝑖, 𝑗
𝑛𝑒𝑤 =1
4[𝑉
𝑖 + 1, 𝑗𝑜𝑙𝑑 + 𝑉
𝑖 − 1, 𝑗𝑛𝑒𝑤
+𝑉𝑖, 𝑗 + 1
𝑜𝑙𝑑 + 𝑉𝑖, 𝑗 − 1
𝑛𝑒𝑤]
Potential values are updated as soon as they are available.
Series1
Series7
Series13
Series19
Series25Series31
0
1
2
3
4
5
6
7
8
9
10
11
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41
Y (
cm)
Vo
lta
ge
(V)
X (cm)
Successive Over-Relaxation - 1200
0-1 1-2 2-3 3-4 4-5 5-6 6-7 7-8 8-9 9-10 10-11
Successive Over-Relaxation Method
𝑉𝑖, 𝑗
𝑛𝑒𝑤 = 𝑉𝑖, 𝑗
𝑜𝑙𝑑 + 𝜔𝑟(𝑖,𝑗)
𝑟(𝑖,𝑗) =1
4[𝑉
𝑖 + 1, 𝑗𝑜𝑙𝑑 + 𝑉
𝑖 − 1, 𝑗𝑛𝑒𝑤
+𝑉𝑖, 𝑗 + 1
𝑜𝑙𝑑 + 𝑉𝑖, 𝑗 − 1
𝑛𝑒𝑤] − 𝑉(𝑖,𝑗)𝑜𝑙𝑑
Similar to Gauss-Seidel, but includes a relaxation parameter to increase speed
of convergence
Landau Rubin H., Paez Manuel J., Bordeianu Cristian C., Computational Physics. Problem Solving with Computers
David J. Griffiths Introduction to Electrodynamics, Fourth Edition
Introduction
A long metal pipe of circular cross-section and radius R is divided into four equal sections. Three of them are grounded and the fourth section is maintained at constant potential V0.
V=V0
x
yFind:A)Electric potential inside of the pipeB)Electric potential outside of the pipeC)Electric field inside of the pipeD)Electric field outside of the pipe
“Exact” analytical solutions can be found for solutions of these problems. However, any “exact” solution of this sort is based on a series of infinite number of terms. How many terms are actually needed to have this solution working with reasonable precision? Instead the following steps were taken:
1. Using conductive paint and conductive paper, draw this configuration on paper and measure the electric potential. Use the potential to find the electric field.
2. Solve the problem numerically using the Finite Difference Method. Try using different techniques; Jacobi method, Gauss-Seidel method, and the Over-Relaxation method. Keep track of the precision. See which method works the “best”.
3. Compare the results of each numerical method versus the results from the experimental method.
Results
5
15
25
35
45
55
65
75
85
95
105
115
125
135
145
00.050.1
0.150.2
0.250.3
0.350.4
0.450.5
0.550.6
0.650.7
0.750.8
0.85
0.9
0.95
1
1.05
1.1
1.15
1.2
1.25
1.3
1.35
1.4
1.45
1.5
1.55
200
195
190
185
180
175
170
165
160
155
150
145
140
135
130
125
120
115
110
105
100
95
90
85
80
75
70
65
60
55
50
45
40
35
30
25
20
15
10 5
Y(m
m)
Fie
ld (
V/m
)
X(mm)
Experimental
11
14
17
20
23
26
29
32
35
38
41
0
1
2
3
4
5
6
7
8
9
10
11
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
Y(c
m)
Po
ten
tia
l(V
)
X(cm)
Experimental