Numerical Solution to Laplace Equation; Estimation of...
Transcript of Numerical Solution to Laplace Equation; Estimation of...
Chapter 3
Numerical Solution to LaplaceEquation; Estimation of Capacitance
3.1 Introduction
Solving Laplace equation in practical applications often requires numerical methods. In this Chap-
ter, a few typical methods are explained. The finite difference methods (FDM) exploits the fact
that if the scalar potential Φ satisfies the Laplace equation, the potential at (x, y, z) can be approx-
imated by the average of the 6 potentials at (x+ h, y, z) , (x− h, y, z) , (x, y + h, z) , (x, y − h, z) ,(x, y, z + h), ) (x, y, z − h) where h is a small distance compared with the system size. For two
dimensional problems, the average involves four potentials at (x± h, y) , (x, y ± h) . The error of
FDM is of order h4 and the accuracy of this method improves as a smaller size h is chosen at the
cost of computation time. Another well known method is the Finite Element Method (FEM). This
method is based on the Thomson’s theorem that the electrostatic energy becomes minimum if the
potential Φ satisfies Laplace equation. Laplace equation is in fact Euler’s equation to minimize
electrostatic energy in variational principle. FEM has been fully developed in the past 40 years
together with the rapid increase in the speed of computation power.
3.2 Finite Difference Method
The basic element in numerically solving the Laplace equation is as follows. Consider a two-
dimensional potential problem such as the one we analyzed in Chapter 2. If the potential satisfies
the Laplace equation (∂2
∂x2+
∂2
∂y2
)Φ (x, y) = 0
the potential at the center of four surrounding potentials is equal to the algebraic average of the
four potentials, namely,
Φ(x, y) ' 1
4[Φ1 + Φ2 + Φ3 + Φ4] (3.1)
1
where
Φ1, Φ3 = Φ(x± h, y) (3.2)
Φ2, Φ4 = Φ(x, y ± h) (3.3)
The proof is straightforward. We may Taylor expand Φ(x± h, y) and Φ(x, y ± h) as
Φ(x± h, y) ' Φ(x, y)± h∂Φ
∂x+h2
2
∂2Φ
∂x2± h3
3!
∂3Φ
∂x3+h4
4!
∂4Φ
∂x4· · · (3.4)
Φ(x, y ± h) ' Φ(x, y)± h∂Φ
∂x+h2
2
∂2Φ
∂y2± h3
3!
∂3Φ
∂y3+h4
4!
∂4Φ
∂y4· · · (3.5)
assuming that h is a small distance. Adding these four equations, we obtain,
Φ(x+ h, y) + Φ(x− h, y) + Φ(x, y + h) + Φ(x, y − h)
' 4Φ(x, y) + h2
[∂2Φ
∂x2+∂2Φ
∂y2
]+O(h4) (3.6)
But by assumption, Φ satisfies Laplace equation,
∂2Φ
∂x2+∂2Φ
∂y2= 0 (3.7)
Therefore, within accuracy to order h4 , we obtain Eq. (3.1). Accuracy is obviously improved by
letting h suffi ciently small, but excessively small values of h will make computation time consuming.
h
hh h
Φ 0 Φ 1
Φ 2
Φ 3
Φ 4
Figure 3-1: In charge free region where the potential Φ satisfies two dimensional Laplace equation∂2Φ∂x2
+ ∂2Φ∂y2
= 0, the potential Φ0 at the center is given by the algebraic average of the four surrounding
potentials Φ0 = 14 (Φ1 + Φ2 + Φ3 + Φ4) .
Let us apply the theorem to the example shown in Fig. 2.2 and repeated here. Since we know
analytic solution, we can check the accuracy of the numerical method. We assume a square cross-
section with side a. For h, we choose h = a/4 and assign a total of 9 “mesh points”(actually they
are “rods”extending in z direction) in the x− y plane as shown in Fig. 3.3. The potentials at themesh points on the boundary are known, and correspond to the boundary values. For the mesh
2
V
00
0a
b
x
y
Figure 3-2: Rectangular conducting cylinder with the top plate at Φ = V.
Φ 9 = Φ 7
100
0 0
0
V
Φ 1 Φ 2 Φ 3 = Φ 1
Φ 4 Φ 5 Φ 6 = Φ 4
Φ 7 Φ 8
Figure 3-3: Unknown potentials at the mesh points. Note there are 6 unknowns because of thesymmetry.
point 1, the potential Φ1 is given in terms of the four surrounding potentials as
Φ1 =1
4(100 + Φ2 + Φ4 + 0) (3.8)
Similarly,
Φ2 =1
4(100 + Φ1 + Φ3 + Φ5) =
1
4(100 + 2Φ1 + Φ5) (3.9)
Φ4 =1
4(0 + Φ1 + Φ5 + Φ7) (3.10)
Φ5 =1
4(Φ2 + 2Φ4 + Φ8) (3.11)
Φ7 =1
4(Φ4 + Φ8) (3.12)
Φ8 =1
4(Φ5 + 2Φ7) (3.13)
These are 6 simultaneous equations for 6 unknowns Φ1 = Φ3, Φ2,Φ4 = Φ6,Φ5,Φ7 = Φ9 and Φ8. In
3
matrix form,
4 −1 −1 0 0 0
−2 4 0 −1 0 0
−1 0 4 −1 −1 0
0 −1 −2 4 0 −1
0 0 −1 0 4 −1
0 0 0 −1 −2 4
Φ1
Φ2
Φ4
Φ5
Φ7
Φ8
=
100
100
0
0
0
0
(3.14)
Solutions are
Φ1 = 42.86,Φ2 = 52.68,Φ4 = 18.75,Φ5 = 25.0,Φ7 = 7.14,Φ8 = 9.82
all in volts.
100
0 0
0
V
42.86 52.86 42.86
18.75 25.00 18.75
7.14 9.82 7.14
Figure 3-4: Solutions for the mesh potentials Φ1˜Φ9.
Let us compare the result with the analytic solution worked out in Chapter 2. When a = b, the
solution is
Φ(x, y) =4V
π
∑n odd
1
n
1
sinh (nπ)sin(nπax)
sinh(nπay)
(3.15)
Equipotential surfaces are shown in Fig. 3.5 for the case V = 100 V. The potential Φ1 at x =
a/4, y = 3a/4 is
Φ1 = Φ(x =a
4, y =
3
4a)
=400
π
∑n odd
1
n
1
sinh (nπ)sin(nπ
4
)sinh
(3nπ
4
)= 43.2 V
4
The error in the numerical method is about 0.7 % which would decrease if a smaller mesh size is
chosen. Since h = a/4 in this example, the expected error is of order(1
4
)4
= 0.4%
0
0.2
0.4
0.6
0.8
1
y
0.2 0.4 0.6 0.8 1x
Figure 3-5: Potential inside a square (a = b) cylinder. The top plate is at V = 100 volt. Equi-potential surafces are, from top, Φ = 50, 25, 10, 5 V.
There is an alternative way to solve the system of equations in 3.14 which is much more effi cient
and less time consuming. In the so-called relaxation method, some guestimate values are initially
assigned for the unknown potentials. Then, we iterate calculations of averages for each mesh point
until Eq. (3.1) is satisfied for all mesh points. Initial guesses can be very rough, although the
closer they are to the final values, the less number of iterations will be required. In the example,
the number of unknown potentials is actually 6 because of the symmetry about the midplane. We
assign 6 unknown potentials as shown in Fig 3.5. Such observation greatly reduces computation
time. A MATLAB program for 30 iterations is as follows:
>> clear
V1(1)=0;
V2(1)=0;
V3(1)=0;
V4(1)=0;
V5(1)=0;
V6(1)=0;
for j=1:30
V1(j+1)=(100+V2(j)+V3(j))/4;
5
V2(j+1)=(100+V1(j)+V1(j)+V4(j))/4;
V3(j+1)=(V1(j)+V4(j)+V5(j))/4;
V4(j+1)=(V3(j)*2+V2(j)+V6(j))/4;
V5(j+1)=(V3(j)+V6(j))/4;
V6(j+1)=(V4(j)+V5(j)*2)/4;
end
>> [(1:31)’, V1’,V2’,V3’,V4’,V5’,V6’]
The results are identical to those obtained by solving the simultaneous equations. In this
example, a relatively large mesh size is chosen to illustrate the numerical procedure. A smaller
mesh size can be chosen in practical applications in order to improve accuracy.
Assignment of mesh points does not have to be square-like. If a mesh size in the x direction is
hx, and that in the y direction is hy, the center potential is to be modified as
Φ(x, y) =1
2(h2x + h2
y
) [h2y (Φ(x+ hx) + Φ(x− hx))
+h2x (Φ(y + hy) + Φ(y − hy))
](3.16)
and the same numerical procedure can still be applied. Such nonuniform mesh assignment becomes
necessary when the ratio a/b is an irrational number.
Example 1 Potential due to periodic anode
Figure 3-6: Cross-section of long cylinder with periodic anode structure.
Consider a conducting cylinder having a cross-section as shown in Fig. 3-6. The periodic upper
electrode is at a potential V and the flat lower electrode is grounded. In order to apply the finite
element method, we divide the cross section into sub-sections and allocate 10 nodes points as shown.
6
Applying Eq. (3.1) to the potentials Φi(i = 1− 10), we obtain
4Φ1 = 100 + Φ2 + 2Φ3,
4Φ2 = Φ1 + 2Φ4,
4Φ3 = 100 + Φ1 + Φ4 + Φ5,
4Φ4 = Φ2 + Φ3 + Φ6,
4Φ5 = 100 + Φ4 + Φ6 + Φ9,
4Φ6 = Φ4 + Φ5 + Φ10,
4Φ7 = 300 + Φ8,
4Φ8 = 200 + Φ7 + Φ9,
4Φ9 = 2Φ5 + Φ8 + Φ10,
4Φ10 = 2Φ6 + Φ9.
Solutions are: Φ1 = 63.7, Φ2 = 31.0, Φ3 = 61.8, Φ4 = 30.2, Φ5 = 53.5, Φ6 = 27.9, Φ7 = 97.1,
Φ8 = 88.2, Φ9 = 55.7, Φ10 = 27.9 all in Volts. A larger number of node points will improve
accuracy.
3.3 Graphical Method
Capacitance per unit length of cylindrical capacitors having odd cross sections can be estimated
using graphical method. To become familiar with the method, let us consider the capacitance of a
parallel plate capacitor,
C = ε0A
d= ε0
ab
d(3.17)
The capacitance per unit length along b direction is
C
b= ε0
a
d(3.18)
which can be interpreted as a capacitance consisting of a unit in parallel and d units in series as
illustrated in Fig. 3.7. Each unit has unit area and its axial capacitance is C/l = ε0. In charge free
regions, the equi potential surfaces and electric field lines are normal to each other, the unit cross
section can be approximated by a circle touching to neighboring circles.
Let us consider cylindrical capacitors as shown in Fig. 3.8. The first case has circular electrodes
with outer radius 4a and inner radius 2a which are eccentric by a. We can draw 5.2 circles for the
top half. Therefore, the capacitance is
C
l= ε0
10.4
1= 10.4ε0 (3.19)
7
3
4
2.5
4
Figure 3-7: Capacitance per unit length is ε0 × (number of parallel unit capacitors)/(number ofseries unit capacitors).
For this case, analytic formula is known
C
l=
2πε0
cosh−1
(a2 + b2 − d2
2ab
) =2πε0
cosh−1
(19
16
) = 10.5ε0 (3.20)
and the graphical method gives a reasonable estimate.
4a 2a
a
Figure 3-8: Eccentric cylindrical capacitor. 5.2 circles can be drawn in the upper half and thecapacitance per unit length is about 10.4ε0.
The inductance per unit length of a transmission line having the same cross-section is given by
L
l=
1
c2C/l ==
1
(3× 108)2 × 10.5× 8.85× 10−12= 1.2× 10−7 H/m
and the characteristic impedance is
Z =
√L/l
C/l=
√1.2× 10−7 H/m
10.5× 8.85× 10−12 F/m= 35.9 Ω
The case shown in Fig. 3.9 has a square inner electrode with edge 4a and circular outer electrode
8
with radius 4a. In one quadrant, 6 parallel units and 2 series units can be drawn. Then
C
l= ε0
24
2= 12ε0 (3.21)
Figure 3-9: Cross-section of a cylindrical capacitor with square inner electrode (side 2a) and circularouter electrode (radius 2a).
3.4 Capacitance of Circular Disk
The problem of thin circular disk was solved by Cavendish in the 18-th century who found the
following formula
C = 8ε0a (3.22)
where a is the disk radius. This means that if a charge q is given to the disk, its potential relative
to Φ = 0 at ∞ is raised to
V =q
C=
q
8ε0a(3.23)
Comparing with the case of a sphere
V =q
4πε0a(3.24)
the difference in the two potentials by the factor π/2 can be attributed to the geometrical change
and stems from
cot−1 (0) =π
2
A disk is a limiting case of an oblate spheroid (a sphere compressed in the axial direction).
The so-called oblate spheroidal coordinates (η, θ, φ) may be best suited for boundary value prob-
lems involving spheroidal electrodes. The oblate spheroidal coordinates (η, θ, φ) are related to the
9
cartesian coordinates (x, y, z) throughx = a cosh η sin θ sinφ
y = a cosh η sin θ sinφ
z = a sinh η cos θ
(3.25)
where a is a positive constant. Since
x2 + y2 = a2 cosh2 η sin2 θ (3.26)
z2 = a2 sinh2 η cos2 θ (3.27)
we find (note cos2 θ + sin2 θ = 1, cosh2 η − sinh2 η = 1)
x2 + y2
a2 cosh2 η+
z2
a2 sinh2 η= 1 (3.28)
x2 + y2
a2 sin2 θ− z2
a2 cos2 θ= 1 (3.29)
Eq. (3.28) indicates that a η = const. surface is an oblate spheroid. In the limit η → 0, the
spheroid degenerates to a thin disk having a radius a. For large η, cosh η ' sinh η, and η =const.
surface approaches a sphere with radius r = a cosh η.
Let us calculate the metric coeffi cients for the oblate spheroidal coordinates, (η, θ, φ). Recalling
the definition of metric coeffi cient in Chapter 1, we find
hη =
√(∂x
∂η
)2
+
(∂y
∂η
)2
+
(∂z
∂η
)2
= a√
cosh2 η − sin2 θ (3.30)
hθ = hη
hφ = a cosh η sin θ
(Calculations are left for an exercise.) Then, Laplace equation in the oblate spheroidal coordinates
becomes
∇2Φ =1
hηhθhφ
[∂
∂η
(hθhφhη
∂Φ
∂η
)+
∂
∂θ
(hηhφhθ
∂Φ
∂θ
)+
∂
∂φ
(hηhφhφ
∂Φ
∂φ
)]=
1
a2(cosh2 η − sin2 θ)
[∂2
∂η2+ tanh η
∂
∂η+
∂2
∂θ2 + cot θ∂
∂θ
]Φ
+1
a2(cosh2 η sin2 θ)
∂2Φ
∂φ2
= 0
This looks complicated, and the reader may be wondering what merit we gain by introducing
10
the exotic coordinates. In fact, the oblate spheroidal coordinates enormously simplify potential
problems associated with an oblate spheroidal electrode (including conducting disk) because Laplace
equation becomes one dimensional depending on the variable η only. Such simplification can neverbe achieved in the usual coordinates (cartesian, cylindrical and spherical). It should be recalled
that the spherical coordinates are most convenient when boundary surfaces are spherical. For exotic
boundary surfaces, often exotic coordinates are best suited.
Consider an electrode having a shape of oblate spheroid. Its surface is described by η = η0
(const.), and we assume the electrode is at a potential Φ = V . Thus, the boundary condition is
Φ(η0) = V.
The potential outside the electrode should be a function of η only,
Φ = Φ(η)
and Laplace equation in Eq. (??) becomes one dimensional,
d
dη
(cosh η
dΦ
dη
)Φ = 0 (3.31)
Integrating once,dΦ
dη=constcosh η
(3.32)
Further integration yields
Φ(η) = const. cot−1(sinh η),
where use has been made of
d
dηcot−1(sinh η) = − cosh η
1 + sinh2 η= − 1
cosh η.
The boundary condition, Φ = V at η = η0 determines the constant,
const. =V
cot−1(sinh η0),
and the final solution for the potential becomes
Φ(η) = Vcot−1(sinh η)
cot−1(sinh η0)(3.33)
For a thin conducting disk of radius a, η0 = 0. Since
cot−1(0) =π
2,
11
the potential due to a charged conducting disk is given by
Φ(η) =2V
πcot−1(sinh η) (3.34)
C =q
V= 8ε0a (F) (3.35)
3.5 Capacitance of Square Plate (Method of Integral Equation)
In this section, we will estimate the capacitance of a square conductor plate of side a. Mathemati-
cally speaking, this problem constitutes an integral equation for the potential Φ, which is constant
at the conductor,
Φ =1
4πε0
∮σ(r′)
|r− r′|dS′ = − 1
4π
∮1
|r− r′|∂Φ
∂n′dS′ = V = constant, (3.36)
where
σ = ε0En = −ε0∂Φ
∂n,
is the unknown surface charge density. The capacitance can be found from
C =1
Φ
∫σdS. (3.37)
As a very rough estimate, we recall that the capacitance of a circular disk of radius a is given
by
C = 8ε0a, (3.38)
and approximate the capacitance of the square plate by
C = 8ε0reff = 8ε0 × 0.564a, (3.39)
where reff is the radius of a circular disk having the same area as the plate,
πr2eff = a2, reff = 0.564a.
The numerical method given below yields C ' 8ε0 × 0.547a.
The capacitance is the ratio between the total charge Q and the plate potential V , C = Q/V.
We divide the plate into n× n sub-areas of equal size each with side a/n. Each sub-plate is at anequal potential V but charges on the sub-plates differ. To illustrate the procedure, we choose n = 5
(25 sub-areas) as shown in Fig. 3-10. Because of symmetry, there are 6 unknown charges to be
found. The potential on each sub-plate can be calculated by summing contributions from charges
on all sub-plates including the charge on itself. The self-potential of one unit can be estimated as
follows. Consider a square plate of side δ carrying a uniform surface charge density σ (C/m2). The
12
Figure 3-10: A square conducting plate of side a is divided into 25 sub-areas. Because of symmetry,the number of unknown potentials is reduced to 6.
potential at the center of the plate can be found from
Φ =σ
4πε0
∫ δ/2
−δ/2dx
∫ δ/2
−δ/2dy
1√x2 + y2
=σ
4πε04
∫ δ/2
0
[ln(√
x2 + δ2 + δ)− lnx
]dx
=σ
4πε04δ ln
(1 +√
2)
=q
4πε0δ× 4 ln
(1 +√
2)
=q
4πε0δ× 3.5255, (3.40)
where q = σδ2 is the charge carried by the sub-plate. With this preparation, we can write down
the potential of sub-plate A as follows:
4πε0ΦAδ =
(3.5255 +
2
4+
1
4√
2
)qA +
(2 +
2
3+
2√17
+2
5
)qB +
(1 +
2√20
)qC
+
(1√2
+2√10
+1
3√
2
)qD +
(2√5
+2√13
)qE +
1
2√
2qF
= 4.2023qA + 3.5517qB + 1.4472qC + 1.5753qD + 1.4491qE + 0.3536qF . (3.41)
13
Similarly
4πε0ΦBδ =
(1 +
1
3+
1√17
+1
5
)qA +
(3.5255 +
1
2+
1√2
+1
4+
2√10
+1
3√
2+
1√13
)qB
+
(1 +
1√5
+1√13
+1√17
)qC +
(1 +
1√5
+1
3+
1√13
)qD
+
(1√2
+1
2+
1√5
+1√10
)qE +
1√5qF
= 1.7759qA + 6. 1281qB + 1. 967 1qC + 2. 057 9qD + 1. 970 5qE + 0.447 21qF (3.42)
4πε0ΦCδ =
(2
2+
2√20
)qA +
(2 +
2√5
+2√13
+2√17
)qB +
(3.5255 +
2
2√
2+
1
4
)qC
+
(2√2
+2√10
)qD +
(1 +
2√5
+1
3
)qE +
1
2qF
= 1. 447 2qA + 3. 9342qB + 4. 482 6qC + 2. 046 7qD + 2. 227 8qE + 0.5qF (3.43)
4πε0ΦDδ =
(1√2
+2√10
+1
3√
2
)qA +
(2 +
2√5
+2
3+
2√13
)qB +(
2√2
+2√10
)qC +
(3.5255 +
2
2+
1
2√
2
)qD +
(2 +
2√5
)qE +
1√2qF
= 1. 575 3qA + 4. 115 8qB + 2. 046 7qC + 4. 879 1qD + 2. 894 4qE + 0.707 11qF(3.44)
4πε0ΦEδ =
(2√5
+2√13
)qA +
(1 +
2√2
+1√2
+2√10
)qB +
(1 +
2√5
+1
3
)qC
+
(2 +
2√5
)qD +
(3.5255 +
√2 +
1
2
)qE + qF
= 1. 449 1qA + 3. 753 8qB + 2. 227 8qC + 2. 894 4qD + 5. 439 7qE + qF (3.45)
4πε0ΦF δ =4
2√
2qA +
8√5qB + 2qC +
4√2qD + 4qE + 3.5255qF
= 1. 414 2qA + 3. 577 7qB + 2.0qC + 2. 828 4qD + 4.0qE + 3. 525 5qF (3.46)
The 6 simultaneous equations can be put in a matrix form,
4.2023 3.5517 1.4472 1.5753 1.4491 0.3536
1.7759 6. 1284 1. 967 1 1.7246 1. 970 5 0.447 21
1. 447 2 3. 9342 4. 4826 2. 046 7 2. 227 8 0.5
1. 575 3 4. 115 8 2. 046 7 4. 879 1 2. 894 4 0.707 11
1. 449 1 3. 753 8 2. 227 8 2. 894 4 5. 439 7 1
1. 414 2 3. 577 7 2.0 2. 828 4 4 3. 525 5
qA
qB
qC
qD
qE
qF
= 4πε0Φδ
1
1
1
1
1
1
14
Solutions for the charges qi are
qA
qB
qC
qD
qE
qF
= 4πε0Φδ
0.322 71 −0.143 06 −0.02004 −0.0431 −0.00126 −0.0024
−0.07626 0.297 57 −0.07272 −0.0225 −0.04357 −0.00290
−0.02001 −0.136 55 0.342 9 −0.0554 −0.05406 −0.00285
−0.02368 −0.117 96 −0.03688 0.341 93 −0.106 09 −0.0159
−0.01081 −0.04450 −0.06318 −0.119 99 0.332 72 −0.05461
−0.00944 −0.0220 −0.01140 −0.06662 −0.216 99 0.363 92
1
1
1
1
1
1
= 4πε0Φδ
0.112 87
7. 958 2× 10−2
7. 402 5× 10−2
4. 138 8× 10−2
3. 961 9× 10−2
3. 746 2× 10−2
The total charge is
Q = 4(qA + qC + qD + qE) + 8qB + qF
= 1.7458× 4πε0Φδ,
and the capacitance is
C ' Q
Φ= 0.349× 4πε0a
= 0.548× 8ε0a. (3.47)
Accuracy will improve if a larger number of sub-areas are used. The exact value is
C = 0.567× 8ε0a
The method can be applied to estimate the capacitance of a conducting cube as well. With 150
sub-areas (25 sub-areas on each side), the following capacitance emerges,
C ' 0.65× 4πε0a, (3.48)
where a is the side of the cube. An estimate based on a sphere having the same surface area gives
C = 4πε0reff = 0.69× 4πε0a, (3.49)
where
reff =
√6
4πa = 0.69a.
15
3.6 Finite Element Method (FEM)
Triangular Element
The finite element method has originally been developed for mechanical structural analysis. Its
physical principle common to all disciplines is energy minimization. In electrostatics, if the potential
Φ satisfies the Poisson’s equation
∇2Φ = − ρ
ε0
the total energy becomes minimum. That is, the Poisson’s equation is the Euler’s equation to
minimize the energy functional ∫ (1
2ε0 (∇Φ)2 + ρΦ
)dV
Here we consider two dimensional electrostatic boundary value problems with ρ = 0 and relevant
PDE is the Laplace equation ∇2Φ(x, y) = 0. The objective is to solve the equation for given
potential specified on a boundary.
1
2
3
Figure 3-11: Triangle element. The nodes (vertexes) are numbered counterclockwise so that the
area of triangle A A = 12 det
1 x1 y1
1 x2 y2
1 x3 y3
is positive.In FEM, the region of interest is divided into small subareas. The shape of subarea is usually
triangle because of greater flexibility. If the potentials at three vertexes, called nodes, of a triangle
are known, the potential Φ (x, y) within the triangle can be estimated using linear interpolation as
follows. Let us consider a triangular element whose vertexes (nodes) are defined by the coordinates,
node 1 at (x1, y1) , node 2 at (x2, y2) and node 3 at (x3, y3) as shown. The numbering (1,2,3) of
the nodes is counterclockwise so that the area of the triangle A is positive,
A =1
2det
1 x1 y1
1 x2 y2
1 x3 y3
16
The potential within the triangle is approximated by linear interpolation
V (x, y) = a+ bx+ cy (3.50)
For small size of the triangle, this may be suffi ciently accurate. If not, the size of the triangle can
be reduced for higher accuracy. In matrix form, the potential V (x, y) can be written as
V (x, y) = a+ bx+ cy =[
1 x y] a
b
c
(3.51)
The electric fields within the triangle is constant,
Ex = −∂Φ
∂x= −b; Ey = −∂Φ
∂y(3.52)
The potential at the three nodes Vi are V1
V2
V3
=
1 x1 y1
1 x2 y2
1 x3 y3
a
b
c
(3.53)
Solving this for
a
b
c
, we obtain a
b
c
=
1 x1 y1
1 x2 y2
1 x3 y3
−1 V1
V2
V3
(3.54)
where 1 x1 y1
1 x2 y2
1 x3 y3
−1
is the inverse matrix of 1 x1 y1
1 x2 y2
1 x3 y3
and given by 1 x1 y1
1 x2 y2
1 x3 y3
−1
=1
2A
x2y3 − x3y2 x3y1 − x1y3 x1y2 − x2y1
y2 − y3 y3 − y1 y1 − y2
x3 − x2 x1 − x3 x2 − x1
(3.55)
17
Therefore, the potential within the triangle can be written in terms of the node potentials as
V (x, y) =[
1 x y] a
b
c
=[
1 x y] 1
2A
x2y3 − x3y2 x3y1 − x1y3 x1y2 − x2y1
y2 − y3 y3 − y1 y1 − y2
x3 − x2 x1 − x3 x2 − x1
V1
V2
V3
(3.56)
We define a row vector[α1 α2 α3
]by
[α1 α2 α3
]=[
1 x y] 1
2A
x2y3 − x3y2 x3y1 − x1y3 x1y2 − x2y1
y2 − y3 y3 − y1 y1 − y2
x3 − x2 x1 − x3 x2 − x1
so that
V (x, y) =[α1 α2 α3
] V1
V2
V3
(3.57)
The components of αi are
α1 =1
2A[x2y3 − x3y2 + (y2 − y3)x+ (x3 − x2) y] (3.58)
α2 =1
2A[x3y1 − x1y3 + (y3 − y1)x+ (x1 − x3) y] (3.59)
α3 =1
2A[x1y2 − x2y1 + (y1 − y2)x+ (x2 − x1) y] (3.60)
and they satisfy the following properties,
αi (xj,yj) =
1,
0,
i = j
i 6= j= δij (Kronecker’s delta) (3.61)
3∑i=1
αi = 1 (3.62)
The electric energy can be calculated from
Ue =1
2ε0
∫E2dS =
1
2ε0
∫(∇V )2 dS (3.63)
where ∇V (x, y) is
∇V =3∑i=1
Vi∇αi (3.64)
18
Then
Ue =1
2ε0
3∑i=1
3∑j=1
∫∇αi · ∇αjViVjdS (3.65)
We define the Dirichlet element coeffi cient C(e)ij by
C(e)ij =
∫∇αi · ∇αjdS (3.66)
and write Ue as
Ue =1
2ε0
3∑i=1
3∑j=1
C(e)ij VeiVej =
1
2ε0
[Ve1 Ve2 Ve3
] C(e)11 C
(e)12 C
(e)13
C(e)21 C
(e)22 C
(e)23
C(e)31 C
(e)32 C
(e)33
Ve1
Ve2
Ve3
=
1
2ε0 [Ve]
T[C(e)
][Ve] (3.67)
The components of C(e)ij can be found as
C(e)11 =
1
4A
[(y2 − y3)2 + (x3 − x2)2
]C
(e)12 = C
(e)21 =
1
4A[(y2 − y3) (y3 − y1) + (x3 − x2) (x1 − x2)]
C(e)13 = C
(e)31 =
1
4A[(y2 − y3) (y1 − y2) + (x3 − x2) (x2 − x1)]
C(e)22 =
1
4A
[(y2 − y1)2 + (x1 − x2)2
]C
(e)23 = C
(e)32 =
1
4A[(y3 − y1) (y1 − y2) + (x1 − x3) (x2 − x1)]
C(e)33 =
1
4A
[(y1 − y2)2 + (x2 − x1)2
]Note that the [C(e)] matrix is symmetric C(e)
ij = C(e)ji . It is convenient to define
P1 = y2 − y3, P2 = y3 − y1, P3 = y1 − y2 (3.68)
Q1 = x3 − x2, Q2 = x1 − x3, Q3 = x2 − x1 (3.69)
Note that ∑Pi = 0,
∑Qi = 0 (3.70)
Then
Cij =1
4A(PiPj +QiQj) (3.71)
with
A =1
2(P2Q3 − P3Q2) (3.72)
19
Assembling Elements
The next step is to learn how to assemble N elements. Suppose that after assembling, the system
has N elements and n nodes. The total energy consists of the sum of the energy in each elements,
U =
N∑e=1
Ue =1
2ε0 [V ]T [C] [V ] (3.73)
where
[V ] =
V1
V2
V3
··Vn
(3.74)
are the potentials at n nodes and [C] is the n× n global coeffi cient matrix.
(0.5, 1)
(2, 1.5)
(1.5, 2.5)
1
2
3
1
2
3(0, 3)
1
2
34
e1e2
Figure 3-12: Assembling two triangle elements with a common edge. Note that numbering ofelement nodes is counterclockwise for both triangles.
Let us consider two triangular elements with a common edge. It is straightforward to find the
following global coeffi cients,
[C] =
C
(1)11 + C
(2)11 C
(2)12 C
(1)12 + C
(2)13 C
(1)13
C(2)21 C
(2)22 C
(2)23 0
C(1)21 + C
(2)31 C
(2)32 C
(1)22 + C
(2)33 C
(1)23
C(1)31 0 C
(1)32 C
(1)33
(3.75)
Note that the potentials at node 1 and node 3 are shared by both elements and thus V (1)1 =
V(2)
1 , V(1)
2 = V(2)
3 . The number of nodes before assembling is 6 but after assembling it is reduced
20
to 4. There is no coupling between the node 2 and node 4 C24 = C42 = 0. For a system of three
triangle elements, the number of node is n = 5 and we find
[C] =
C
(1)11 + C
(2)11 C
(1)13 C
(2)12 C
(1)12 + C
(2)13 0
C(1)31 C
(1)33 0 C
(1)32 0
C(2)21 0 C
(2)22 + C
(3)33 C
(2)23 + C
(3)13 C
(3)12
C(1)21 + C
(2)31 C
(1)23 C
(2)32 + C
(3)31 C
(1)22 + C
(2)33 + C
(3)33 C
(3)32
0 0 C(3)21 C
(3)23 C
(3)22
1 2
3
1
23
1 2
3
e1
e2
e3
1 2 3
45
Figure 3-13: Assembling 3 elements. The number of global nodes is 4.
Energy Minimization and Finding the Unknown Node Potentials
To find the potential [V ] that minimizes the total electric energy, we impose
∂U
∂Vi= 0, i = 1, 2, · · · n (3.76)
for each node potential Vi. Since Cij is symmetric Cij = Cji, we find, for example
∂U
∂Vi= 2(C11V1 + V2C12 + C13V3 + C14V4) = 0 (3.77)
and we obtain the following simultaneous equations for Vi
n∑i=1
CijVj = 0 (3.78)
If the potentials at some nodes are known (or fixed), differentiation with respect to the known
potentials should be excluded. In this case, instead of Eq. (3.78), we have[Cff Cfp
Cpf Cpp
][Vf
Vp
]= 0
21
For example, if the global node number is n = 4 and the potentials at n = 1 and 3 are known, the
potentials at n = 2 and 4 can be found from
C22V2 + C24V4 + C21V1 + C23V3 = 0 (3.79)
C42V2 + C44V4 + C41V1 + C43V3 = 0 (3.80)
which can be written as [C22 C24
C42 C44
][V2
V4
]= −
[C21 C23
C41 C43
][V1
V3
](3.81)
Let us consider two-triangle system with 4 node coordinates (x, y) = (0.5, 1.0), (2.0, 1.5) , (1.5, 2.5) , (0, 3.0)
as shown. The potentials at nodes 1 and 3 are given, V1 = 5 V and V3 = 10 V and those at nodes
2 and 4 are unknown. The first element is defined by (x, y)(1) = (0.5, 1.0), (2.0, 1.5) , (1.5, 2.5) and
the second element by (x, y)(2) = (0.5, 1.0), (1.5, 2.5) , (0, 3.0) . The coeffi cient matrix of the first
element can be calculated using Pi, Qi and A,
Pi = [−1, 1.5,−0.5]
Qi = [−0.5,−1, 1.5]
A =1
2(P2Q3 − P3Q2) = 0.875
Cij =1
4A(PiPj +QiQj)
C(1)ij =
0.357 142 9 −0.285 714 3 0.0714
−0.285 714 3 0.928 571 4 −0.642 857 1
0.0714 −0.642 857 1 0.714 285 7
(3.82)
Similarly,
C(2)ij =
0.454 545 5 −0.318 181 8 −0.136 363 6
−0.318 181 8 0.772 727 3 −0.454 545 5
−0.136 363 6 −0.454 545 5 0.590 909 1
(3.83)
22
and the global coeffi cients are
CGij =
C
(1)11 + C
(2)11 C
(2)12 C
(1)12 + C
(2)13 C
(1)13
C(2)21 C
(2)22 C
(2)23 0
C(1)21 + C
(2)31 C
(2)32 C
(1)22 + C
(2)33 C
(1)23
C(1)31 0 C
(1)32 C
(1)33
=
0.811 688 4 −0.318 181 8 −0.422 07 −0.07142 9
−0.318 181 8 0.772 727 3 −0.454 545 5 0
−0.422 07 −0.454 545 5 1. 519 5 −0.642 86
−0.07142 9 0 −0.642 86 0.714 29
(3.84)
Suppose that V2 = 5 V and V4 = 10 V are given and V1 and V3 are unknown. From
C11V1 + C12V2 + C13V3 + C14V4 = 0
C13V1 + C23V2 + C33V3 + C34V4 = 0
we get [C11 C13
C31 C33
][V1
V3
]= −
[C12 C14
C23 C34
][V2
V4
][
0.811 688 4 −0.246 781 8
−0.246 781 8 0.590 909 1
][V1
V3
]= −
[−0.318 181 8 −0.07142 9
−0.454 545 5 −0.642 86
][5
10
]
[V1
V3
]= −
[0.811 688 4 −0.246 781 8
−0.246 781 8 0.590 909 1
]−1 [−0.285 714 3 −0.136 363 6
−0.642 857 1 −0.454 545 5
][5
10
]
=
[8. 513 6
16. 687
]
Some examples obatined with MATLAB PDE Toolbox are shown below.
Example 1: 2D potential profile in rectangular box when the top plate is at 100 V and the rest
are grounded.
Example 2: Transmission line with rectangular electrodes. The inner electrode is at 100 V and
the outer is gorunded.
Example 3: Transmission line with eccentric circular electrodes. The inner electrode is at 100
V and the outer grounded.
23
24
25
26
27
28
29