11
Poisson Equation for Electrostatics William Talmadge Fig. 1: Conducting cubical box indicating the orientation of the coordinate sys- tem used. The non-zero potential side is highlighted in orange. Problem Consider a conducting cubical box (Figure 1) with sides L, centered at the origin with sides parallel to the axis. All sides except that at x = -L/2 are at a voltage of 0. The remaining side at x = -L/2 is at voltage V 0 . Find the electric field inside the cube and evaluate it at the center of the cube with V 0 = 1000 V and L =0.1 m. Solution The first important observation to note in defining this problem is the statement that the voltages are held at the specified values. It follows that we have an electrostatics problem thus there are no currents or magnetic fields to consider. The problem also specifies that we must determine the electric field within the domain of the box which contains no charge distribution. We can use the differential form of Guass’s Law in free space to solve this problem, ∇· ~ E =0 (1) 1

Electrostatic Poisson Cube Solution

Embed Size (px)

DESCRIPTION

I wrote this detailed solution to the problem of finding the electric potential inside of a conducting cube (as stated in the document). I did this as an exercise to compile all of my notes and work gathered while I learned to solve this problem. I am sharing this document in the hopes that someone solving a similar problem may find it useful.Please feel free to send me messages with questions for clarifications, comments or constructive criticism so that I may improve this document.

Citation preview

Page 1: Electrostatic Poisson Cube Solution

Poisson Equation for Electrostatics

William Talmadge

Fig. 1: Conducting cubical box indicating the orientation of the coordinate sys-tem used. The non-zero potential side is highlighted in orange.

Problem

Consider a conducting cubical box (Figure 1) with sides L, centered at the originwith sides parallel to the axis. All sides except that at x = −L/2 are at a voltageof 0. The remaining side at x = −L/2 is at voltage V0. Find the electric fieldinside the cube and evaluate it at the center of the cube with V0 = 1000V andL = 0.1m.

Solution

The first important observation to note in defining this problem is the statementthat the voltages are held at the specified values. It follows that we have anelectrostatics problem thus there are no currents or magnetic fields to consider.The problem also specifies that we must determine the electric field withinthe domain of the box which contains no charge distribution. We can use thedifferential form of Guass’s Law in free space to solve this problem,

∇ · ~E = 0 (1)

1

Page 2: Electrostatic Poisson Cube Solution

2

However, we cannot solve directly for the electric field as we are not given anyconditions on this equation nor a charge distribution that would allow for adirect solution for ~E. However, we are given Dirichlet boundary conditions forthe electric potential Φ. So we can solve this problem by determining the electricpotential and taking the negative gradient to determine the electric field,

~E = −∇Φ (2)

We can derive the equation governing this system by substituting eq. 2 into eq.1,

∇ · (−∇Φ) = 0

∇2Φ = 0 (3)

Separation of Variables

Eq. 3 is the Poisson equation for electrostatic potential. By solving this equationover the domain of the cube we will arive at a specific solution for the electricpotential inside the cube which will in turn give us the electric field. We beginby expanding eq. 3 and solving the resulting partial differential equation byseparation of variables.

∂2Φ∂x2

+∂2Φ∂y2

+∂2Φ∂z2

= 0 (4)

Defining Φ in terms of three orthogonal factors,

Φ(x, y, z) = Φx(x)Φy(y)Φz(z) . (5)

Substituting eq. 5 into eq. 4 and simplifying this expression to eq. 6,

∂2

∂x2(ΦxΦyΦz) +

∂2

∂y2(ΦxΦyΦz) +

∂2

∂z2(ΦxΦyΦz) = 0

1ΦxΦyΦz

[ΦyΦz

∂2Φx∂x2

+ ΦxΦz∂2Φy∂y2

+ ΦxΦy∂2Φz∂z2

= 0]

1Φx

∂2Φx∂x2

+1

Φy∂2Φy∂y2

+1

Φz∂2Φz∂z2

= 0

Φx′′Φx

+Φy′′Φy

+Φz′′Φz

= 0 . (6)

Page 3: Electrostatic Poisson Cube Solution

3

Rearanging the terms of eq. 6 to isolate the x term,

Φx′′Φx

= −Φy′′Φy− Φz′′

Φz

Φx′′Φx

= −Φy′′Φy− Φz′′

Φz= a . (7)

Note that in eq. 7 that the left and right terms do not share any variables withwhich they can vary over thus each must be constant for them to be equal.

Φx′′ = aΦx (8)

The problem definition gives us the boundary conditions for Φx as,

Φx

(−L

2

)= kV0

Φx

(L

2

)= 0 .

The boundary conditions,

Φx

(−L

2

)6= Φx

(L

2

).

require a general solution to Φx of,

Φx = Aeαx+φ +Be−αx−φ . (9)

Substituting eq. 9 into eq. 8 gives

α2(Aeαx+φ +Be−αx−φ

)= a

(Aeαx+φ +Be−αx−φ

).

This reveals that letting a = α2 is a more convenient choice in eq. 7 to preventradicals from appearing in our solutions where they can be avoided.

We can simplify our representation of this solution by attempting to express itin terms of hyperbolic functions. We apply the identities,

eαx+φ = cosh(αx+ φ) + sinh(αx+ φ)

e−αx−φ = cosh(αx+ φ)− sinh(αx+ φ)

by substituting them into eq. 9.

Φx = A (cosh(αx+ φ) + sinh(αx+ φ)) +B (cosh(αx+ φ)− sinh(αx+ φ))

Page 4: Electrostatic Poisson Cube Solution

4

Applying the boundary conditions for eq. 8 and simplifying reduces as follows.

0 = A

(cosh

(αL

2+ φ

)+ sinh

(αL

2+ φ

))+B

(cosh

(αL

2+ φ

)− sinh

(αL

2+ φ

))

0 = Acosh

(αL

2+ φ

)+Asinh

(αL

2+ φ

)+Bcosh

(αL

2+ φ

)−Bsinh

(αL

2+ φ

)0 = (A+B) cosh

(αL

2+ φ

)+ (A−B) sinh

(αL

2+ φ

)(A+B) cosh

(αL

2+ φ

)= − (A−B) sinh

(αL

2+ φ

)(10)

In eq. 10

cosh

(αL

2+ φ

)6= 0 ,

cosh

(αL

2+ φ

)6= sinh

(αL

2+ φ

)∴ (A+B) cosh

(αL

2+ φ

)= 0 =⇒ A+B = 0 ,

therefore we can substituteB = −A

into eq. 9.Φx = Aeαx+φ −Ae−(αx+φ)

By applying the hyperbolic sinh identity for exponentials we can simplify thisexpression to

Φx = 2Asinh(αx+ φ) .

We apply the boundary condition to determine φ.

0 = Asinh

(αL

2+ φ

)

αL

2+ φ = 0

φ = −αL2

This gives us a partially determined general solution for which we will have todetermine α

Φx = Asinh

(αx− αL

2

), (11)

Page 5: Electrostatic Poisson Cube Solution

5

Rearranging eq. 7 to isolate theΦy′′Φy

andΦy′′Φy

terms, while lettinga = α2 ,

inΦx′′Φx

= −Φy′′Φy− Φz′′

Φz= α2

Φx′′Φx

+Φz′′Φz

= −Φy′′Φy

= α2 +Φz′′Φz

= β2

Φy′′ = −β2Φy (12)

Φx′′Φx

+Φy′′Φy

= −Φz′′Φz

= α2 +Φy′′Φy

= γ2

Φz′′ = −γ2Φz (13)

α2 +Φy′′Φy

= γ2

γ2 = α2 − β2 . (14)

The general form of the solution of eq. 12 and eq. 13 will be,

Φy = Ccos (βy) +Dsin(βy) (15)

given the boundary conditions,

Φy

(L

2

)= Φy

(−L

2

)= 0

Φz

(L

2

)= Φz

(−L

2

)= 0 .

We apply the boundary conditions and note that both equations can only holdif D = 0,

Ccos

(βL

2

)+Dsin

(βL

2

)= 0

Ccos

(βL

2

)−Dsin

(βL

2

)= 0 ,

Page 6: Electrostatic Poisson Cube Solution

6

it follows that there is no sin(βy) term in the specific solution, thus we are leftwith,

Ccos

(βL

2

)= 0 .

This is only true when the argument is an odd multiple of π2 ,

βL

2=nπ

2, n odd

β =nπ

L, n odd , (16)

Φy = Ccos(nπLy), n odd . (17)

The boundary conditions on Φz are identical to that of Φy thus the specificsolution will be identical in form, albeit with different constants. This yieldsthe following.

γ =mπ

L, modd (18)

Φz = Ecos(mπLz), m odd (19)

Both eq. 17 and eq. 19 define a countable set of infinite solutions on account ofthe presence of arbitrary, integral constants. By the principle of superpositionall sums of these solutions are also solutions, thus we can generalize all possiblesolutions of this form by summing them.

Φy =∑n odd

Cncos(nπLy)

(20)

Φz =∑modd

Emcos(mπLz)

(21)

With β and γ known we can now calculate α using eq. 14 and substitute it intoeq. 11. Likewise the sum of all solutions resulting from combinations of possiblevalues of m and n is also a solution.

(mπL

)2

= α2 −(nπL

)2

Page 7: Electrostatic Poisson Cube Solution

7

α =π

L

√m2 + n2, m, n odd (22)

Φx =∑

n,m odd

Am,nsinh

(π√m2 + n2

(x

L− 1

2

))(23)

With all factors of Φ determined we can substitute them back into eq. 5,

Φ =∑

m,n odd

Am,nsinh

(π√m2 + n2

(x

L− 1

2

))·∑n odd

Cncos(nπLy)·∑modd

Emcos(mπLz).

this expression can be simplified by collecting all of the summations togetherand recognizing that all of the constants can similarly be collected together intoa single new constant indexed by m and n.

Φ =∑

m,n odd

Vm,nsinh

(π√m2 + n2

(x

L− 1

2

))cos(nπLy)cos(mπLz)

(24)

Fourier Coefficients

To completely determine Φ we must calculate Vm,n in eq. 24. To approach thisproblem we note that this is in fact a two-variable Fourier cosine series oncewe apply the boundary condition at x = −L/2. It may not appear as such;however, because of the appearance of the sinh factor. However, it is obviousby inspection that this term is constant with the aforementioned boundarycondition imposed. We can consider it as a factor in a new set of coefficientsFm,n. We determine this coefficient set by extracting the following terms fromeq. 24 while letting

Φ(−L

2, y, z

)= V0

in

Φ (y, z) = V0 =∑

n,modd

Vm,nsinh(−π√m2 + n2

)︸ ︷︷ ︸

Fm,n

cos(nπLy)cos(mπLz)

With our definition of Fm,n our equation takes on a strict form of a Fourierseries

V0 =∑

m,n odd

Fm,ncos(nπLy)cos(mπLz),

Page 8: Electrostatic Poisson Cube Solution

8

We can now solve for Fm,n and in turn Vm,n through a standard derivation ofthe Fourier coefficients of a two-variable cosine series. We begin by multiplyingboth sides by our basis function; however, we make the basis function rangeover arbitrary, integral constants that are independent from m and n.

V0

[cos

(iπ

Ly

)cos

(jπ

Lz

)]= . . .∑

m,n odd

Fm,ncos(nπLy)cos(mπLz)[cos

(iπ

Ly

)cos

(jπ

Lz

)]

We integrate both sides, noting that in this case the integral of the summationis the same as the summation of the integral of each term in the series. Therange of integration will be the domain covered in each variable of integration.

L2̈

−L2

V0

[cos

(iπ

Ly

)cos

(jπ

Lz

)]dydz = . . .

∑m,n odd

L2̈

−L2

Fm,ncos(nπLy)cos(mπLz)[cos

(iπ

Ly

)cos

(jπ

Lz

)]dydz

We rearrange the double integral on the right hand side and exploit the orthog-onality of cosines to evaluate them.

L2̈

−L2

V0

[cos

(iπ

Ly

)cos

(jπ

Lz

)]dydz = . . .

∑m,n odd

Fm,n

ˆ L2

−L2

cos(nπLy)cos

(iπ

Ly

)dy︸ ︷︷ ︸8><>:n = i L

2

otherwise 0

ˆ L2

−L2

cos(mπLz)cos

(jπ

Lz

)dz︸ ︷︷ ︸8><>:m = j L

2

otherwise 0

The orthogonality of cosines also implies the relations n = i and m = j. Thisallow us to take the entire argument of the summation out as a constant. Weare then left with the following.

L2̈

−L2

V0

[cos

(iπ

Ly

)cos

(jπ

Lz

)]dydz = Fi,j

(L

2

)2

Page 9: Electrostatic Poisson Cube Solution

9

Simplifying the expression and evaluating the integrals.

Fi,j =4V0

L2

ˆ L2

−L2

cos

(iπ

Ly

)dy

ˆ L2

−L2

cos

(jπ

Lz

)dz

Fi,j =4V0

L2

[L

iπsin

(iπ

Ly

)]L2

−L2

[L

jπsin

(jπ

Lz

)]L2

−L2

Fi,j =4V0

L2

[2

sin(

12 iπ)L

][2

sin(

12jπ

)L

]

Fi,j =16V0(−1)

12 (i−1)(−1)

12 (j−1)

π2ij

Fi,j =16V0(−1)

12 (i+j−2)

π2ij

{i, j odd

otherwise 0

Changing indicies to match summation and expanding Fn,m.

Vn,msinh(−π√m2 + n2

)=

16V0(−1)12 (m+n−2)

π2nm

Vn,m =−16V (−1)

12 (m+n−2)

nmπ2sinh(π√m2 + n2

) {n,m odd

otherwise 0(25)

Substituting eq. 25 into eq. 24 results in the specific solution for Φ,

Φ = −16V0

∑n,modd

sinh(π√m2 + n2

(xL −

12

))(−1)

12 (m+n−2)

nmπ2sinh(π√m2 + n2

) cos(nπLy)cos(mπLz).

(26)

Electric Field

To find the electric field we simply take the negative gradient of eq. 26.~E = −∇Φ

~E =16V0

π

∑n,m, odd

√m2+n2cosh(π

√m2+n2( x

L−12 ))(−1)

12 (m+n−2)

nmLsinh(π√m2+n2) cos

(nπL y)cos(mπL z)

−∑n,modd

sinh(π√m2+n2( x

L−12 ))(−1)

12 (m+n−2)

mLsinh(π√m2+n2) sin

(nπL y)cos(mπL z)

−∑n,modd

sinh(π√m2+n2( x

L−12 ))(−1)

12 (m+n−2)

nL sinh(π√m2+n2) cos

(nπL y)sin(mπL z)

(27)

Page 10: Electrostatic Poisson Cube Solution

10

Fig. 2: The convergence of Ex with “iterations” being the simultaneous value ofn and m in the upper limit of the sum.

Evaluating eq. 27 at the center of the cube; 〈0, 0, 0〉 with V0 = 1000V andL = 0.1m

~E(0, 0, 0) =16(1000)

π

∑n,modd

√m2+n2cosh(π

√m2+n2(− 1

2 ))(−1)12 (m+n−2)

nm(0.1) sinh(−π√m2+n2) cos (0) cos (0)

−∑n,modd

sinh(π√m2+n2( x

L−12 ))(−1)

12 (m+n−2)

m(0.1) sinh(−π√m2+n2) sin (0) cos (0)

−∑n,modd

sinh(π√m2+n2( x

L−12 ))(−1)

12 (m+n−2)

n(0.1) sinh(−π√m2+n2) cos (0) sin (0)

Note that Ey and Ez must be zero so only the x component must actually becalculated. The sum must be approximated by evaluating the sum to a finitevalue for n and m. Fortunately this sum converges to an accurate solution ratherquickly, as can be seen in figure 2.

Figure 2 indicates that 10 iterations is more than sufficient to get a very goodapproximation for Ex.

~E(0, 0, 0) =

7, 216.2

0

0

N

C

Page 11: Electrostatic Poisson Cube Solution

11

Visualizing the Electric and Potential Field

To visualize the solution to the Poisson equation inside of the specified cube wewill evaluate Φ at z = 0. The result will be a 2-D density plot with the colorindicating the strength of the potential field. We will also show the electric fieldlines superimposed.

Fig. 3: Electric potential inside the cube at z = 0 from the orientation of positivez looking down the negative z direction. Electric field lines are in blue