Polarization in electrostatics and circuits : Computing and visualizing surface charge distributions

The Computational Physics Section publishes articles that help students and their instructors learn about the physics and the computational tools used in contemporary research. Most articles will be solicited, but interested authors should email a proposal to the editors of the Section, Jan Tobochnik (jant@kzoo.edu) or Harvey Gould (hgould@clarku.edu). Summarize the physics and the algorithm you wish to include in your submission and how the material would be accessible to advanced undergraduates or beginning graduate students.

Electric fields applied to conductors in electrostatic situations lead to transient currents that deposit charges on the surface of the conductor.These surface charges contribute to the net field inside the conductor so as to oppose the electric field of the external charges, thus progressively weakening the net field in the metal and reducing the currents.After a very short time the charges on the surface reach a distribution such that everywhere inside the metal the net field is zero, current flow ceases, and electrostatic equilibrium is reached.
A similar process occurs during the transient phase leading to the steady state of a circuit consisting of a battery and conducting wires with various resistances.In contrast to the equilibrium situation, in a steady state DC circuit the net electric field inside a current-carrying wire is constant and nonzero.
How does the polarization and distribution of surface charge arise?At the moment before the final connection is made, current is not flowing, and polarization by the electric field of charges in and on the battery has led to a surface charge distribution that produces electrostatic equilibrium, with zero net electric field inside all conductive circuit elements.When the last gap in the circuit is closed, the surface charges that had been on the gap surfaces neutralize each other, and without their contribution, the net field is no longer zero inside the wires.
The brief resultant transient currents modify the distribution of charges on the surface of the wires.This transient lasts only a very short time because it is essentially global; the electric field at locations far from the gap change at the speed of light, and adjustments to the tiny amount of surface charge at any location require infinitesimal motions of the huge mobile electron sea.A steady state is quickly established in which the nonzero electric field inside a wire is parallel to the wire and uniform along and across a wire of constant cross section, resulting in a uniform current density.Charges on the surface of the resistive conducting wires contribute significantly to the net field inside the wires, which drives the current.
In this paper, we present a relaxation algorithm for computing the surface charge distributions and illustrate its utility by displaying results in three dimensions and by examining the gradients of the surface charge density along the various circuit elements.We highlight several insights gained from three-dimensional (3D) visualizations of these charge and field distributions.

II. COMPUTING SURFACE CHARGE DISTRIBUTIONS
Although not typically discussed in physics courses, the role of surface charge in circuits has been understood for many years. 1 Surface charge distributions have been calculated analytically for a few special geometries, [2][3][4] but usually a numerical algorithm is required, as first carried out by Preyer. 5,6Our algorithm is a modification of Preyer's algorithm.
In the calculations that we will discuss, a DC circuit is modeled as a resistive wire with a square cross section.The wire is connected to a charged capacitor whose charge is kept constant (a battery analog).The conductor is initially neutral, as shown in Fig. 1.External charged objects (including batteries or capacitor plates) are required to initiate the polarization process.The same algorithm can be used to calculate surface charge distributions on conductors whose initial net charge is nonzero.
The surface of each circuit element is divided into small charged square tiles of area A. From basic electrostatics, the net field driving current onto or away from tile i is the sum of three contributions: the field just inside the tile that is contributed by the tile's own charge q i , plus the field acting on tile i by all other tile charges j, plus the field of any external charges k where r ij ¼ jr i À rj j; ni is the outward normal for tile i, and A is the area of the tile.
For the tile itself, its own contribution to the net field at a location just inside the conductor and infinitesimally close to the center of the tile is essentially that of an infinite plate.If the tile were uniformly charged, its field would be q=ð2 0 AÞ.However, because the approximation of uniform charge is not exact, and because this contribution to the net field is significant, we introduce an empirical parameter K so that this term becomes Kq=ð2 0 AÞ.For a uniformly charged infinite plate K ¼ 1; we discuss the results of varying the value of K in Sec.II B. The negative sign in this term in Eq. ( 1) comes from the definition of n as the outward-going normal.
Only the perpendicular component of the net field contributes significantly to current flow onto or away from a tile.Although there may be current flow from neighboring surface tiles, the tiles are so thin, and their cross-sectional area so small, that this current flow is negligible compared to flow perpendicular to the tile's surface.This perpendicular component of the field is The outward-going current density J i? is given by where r is the conductivity.Thus, To facilitate interpretation of the results, the computations use SI units.If the object of interest is initially uncharged, all the tile charges q i are set initially to zero; otherwise the object's total charge is initially distributed evenly over all the tiles.At each step of the iterative procedure, Eq. ( 4) is evaluated for all tiles, and these computed changes are then applied to all the tiles.The magnitudes of the field at two different representative locations are graphed as the computation proceeds, and the time step Dt is chosen empirically to be sufficiently small that these field magnitudes change slowly.(We used Dt ¼ 10 À19 s for the electrostatic configurations and Dt ¼ 10 À17 s for circuits.)The computation is halted when the field magnitudes are no longer changing visually.If the two field magnitudes are not consistent with each other (for example, if they converge to very different values inside similar wires of a simple series circuit, or are nonzero inside a conductor in electrostatic equilibrium), the computation is repeated with a small change in the parameter K.The ultimate check on the validity of the computation is whether the electric field everywhere makes physical sense.
We visualize the fields with an interactive program that allows users to observe the field by dragging a mouse around in a 3D scene.Even though there can be as many as 30 000 tiles in the systems we analyzed, computers are sufficiently fast to compute the net field at any location from a given tile charge distribution without a perceptible delay.However, the iterative relaxation calculations to compute the steady state tile charge distribution take many minutes, even when using a graphics card to parallelize the computation.
The algorithm considers only the charges on the surface of the conductor.Although excess charge in the interior of the conductor would contribute to electric fields throughout the circuit, Gauss's law requires that the net flow of charge through any interior volume element of the conductor must be zero in the short time interval Dt, maintaining neutrality of the volume element (see Sec. II A for a detailed discussion).The steps of the iterative relaxation algorithm are as follows: (1) Divide the surface of the circuit elements into N small square tiles.Create an N Â N matrix M that represents the change Dq i that a one Coulomb charge on surface tile j would cause on surface tile i at each time step Dt.From Eqs. ( 2) and ( 4), we see that This calculation needs to be done only once, which is fortunate, because it requires N 2 calculations, which is computationally expensive.During the iterative computation this matrix will be multiplied by the array of current surface charges.(2) Create an array X, where from Eqs. ( 2) and (4) we see that the change Dq i caused by the external charges q k on tile i is This calculation needs to be done only once.During the iterative computation, this array gives the contribution by the external charges to Dq i for all N tiles.(3) Initialize all the tile charges to zero if the object is initially neutral, or divide the total charge equally among the tiles.(4) Calculate the change in the net charge of tile i in the next Dt Save the individual charge changes in a temporary array.(5) After all the changes have been calculated, modify the charge of every tile, q i !q i þ Dq i .(6) Check that the total charge has not changed due to the various approximations, especially the effects of representing remote tiles as point charges at their centers, approximating the field across a tile as equal to the field at its center, and approximating the field infinitesimally close to a tile as that of a uniformly charged infinite plate.If the total charge has changed, apply an appropriate scale factor to all the charges so that the total charge is a constant.(7) Execute steps 4 through 6 again.This repetitive computation is highly suitable for parallel computation.(8) During the computation, graph the magnitudes of the field at two different representative locations in the interior of the conductor, and stop the iterative computation when the two magnitudes are no longer visibly changing; the results are not sensitive to the choice of stopping time.The two final measurements should be physically consistent.For example, if the two magnitudes are of fields at two locations with the same current, these two magnitudes should be equal.In electrostatic situations, the criterion is that the magnitudes of the field at two locations inside the conductor should both approach zero.If the results are not consistent with the physics, repeat the calculations with a slightly different value of K.Note that it is not necessary to repeat the expensive N Â N calculations of the M matrix; it is sufficient simply to modify its diagonal elements.
The computed surface charge distributions were checked by using them to calculate and display the electric field throughout the region of interest, as seen in interactive computations in three dimensions in Ref. 7. In our electrostatics examples, we do find that the net field does go to zero inside the conductor.For circuits, the field inside the circuit wires is consistent with the Kirchhoff loop and node rules, and the path integral of the electric field along the inside of the circuit wires is indeed equal to the potential difference across the capacitor gap.We take these observations as strong evidence that the algorithm produces correct results for the distribution of surface charge.
The main difference between the algorithm we have described and the algorithm used by Preyer 5,6 is that we have ignored internal currents (see Sec. II A).We also have taken advantage of 3D visualization using VPython 8 with Python and the browser-based GlowScript VPython. 9The program that calculates the surface charge distributions was written in Python 3 using the NumPy 10 module to speed up the computations.We also used the Python module numba.cuda 11to perform the calculations in the graphics processing unit (GPU), which provided an additional order of magnitude increase in speed.The most complex circuit we discuss, in which the steady-state charges are calculated on nearly 000 surface tiles, takes less than 15 min using a GeForce GTX 1080 GPU, compared to many hours using only the CPU.
We ignore issues related to radiation and retardation, because the goal is to determine the equilibrium state (electrostatics) or steady state (DC circuit), not the physical details of the transient leading to those final states.

A. Why cubes internal to the circuit may be neglected
Preyer divided objects into small cubes, not small surface squares, and was interested in showing that the neutrality of the interior of the metal would result from applying the relaxation algorithm.Hence, all charge transfers from one cube to and from its neighbors were computed.Near charge neutrality was found, but there was some nonzero charge in cubes near the surface, with a decrease by a factor of ten for each layer of cubes going inward (an effect that we verified in an early version of our own computations).The nonzero charge was due to the approximations made in the computations, such as approximating the field over the face of a cube by the field at the center of the face.
If the purpose is solely to compute accurate surface charge distributions, it is not necessary to calculate charge transfers among volumes in the interior, thanks to Gauss's law.Consider the interior volume of a conductor that is being polarized (see Fig. 2).Initially this volume is neutral, and the net flux due to external charges is zero (Gauss's law).In the short time Dt charge flows into and out of the volume due to charges outside this volume, but these flows are equal if the volume has an uniform conductivity, because the net flux due to the external charges is zero, and J ¼ r Ẽ. Therefore the charge movement associated with J cannot change the neutrality of the volume.The only regions where the charge can change are on the surface of the conductor.This iterative analysis can be seen as an alternative way of seeing why charge must be confined to the surface of a metal.

B. Corrections to the effect a tile has on itself
We have mentioned that the algorithm is very sensitive to the contribution of charge on a tile to the net field inside the tile itself.If we assume that the charge q of a particular tile is uniformly distributed over the area A of its surface, then at a location just inside the surface of the tile, Gauss's law shows that the field due to the tile itself is E ¼ ðq=AÞ=ð2 0 Þ.However, because the charge distribution on a given tile is not uniform, a correction factor is needed.Empirically, we found that introducing a constant scalar multiplier K, so that E ¼ Kðq=AÞ=ð2 0 Þ, made it possible to produce results that satisfied the criterion that the magnitude of the electric field at two different locations inside a circuit wire must relax to the same value.Depending on the particular circuit geometry, values of K ranging from 0.9942 to 0.9963 were used.The calculation appears to be very sensitive to variations in the fourth decimal place of K.A possible explanation for the high sensitivity to the value of K is that the largest contribution to the field just inside a tile may typically be that of the tile itself, as all other charges are far away.
Presumably the effect is smaller with smaller tiles, but we didn't explore the effect any further due to limitations on memory and computing time, which scale as N 2 .We were limited to handling about N ¼ 3 Â 10 4 tiles, which means the matrix M contains about 10 9 8-byte floating-point numbers, or about 8 gigabytes of memory.Using tiles half as wide would require four times as much memory just for this matrix, or 32 gigabytes.

III. RESULTS
We now discuss the results of applying the relaxation algorithm to various electrostatic and circuit situations.In each case, two representations of the surface charge distribution are shown: an image indicating the surface charge distribution, and a plot of the average surface charge density as a function of the location along the length of a conductor.To produce the plots, we divide the surface of the conductor into (square) rings as shown in Fig. 3.The average surface charge density of the ring is the net charge on the surface of the ring divided by the surface area of the ring.We will discuss later why we graph this average charge density.

A. Electrostatic equilibrium
The simplest case is the approach to electrostatic equilibrium.In Fig. 4, a 4 mm Â 4 mm Â 8 mm metal block has been polarized by a positive charge of 10 À15 C, 12 mm to the left of the center of the left end of the block, and electrostatic equilibrium has been reached.The 16 000 tiles each measure 0.1 mm Â 0.1 mm.A very strong check that the computed charge distribution is correct is that the field inside the block, calculated from contributions of the external charge and the computed charge distribution, is found to be zero everywhere.This zero field drives no current, so the surface charge distribution will not change.
From both Fig. 4 and the plot of average surface charge density versus location along the block in Fig. 5, we see that at equilibrium the largest buildup of charge is on the ends of the block.There is a roughly constant gradient of average surface charge density between the ends of the block, and there is a concentration of charge along the sharp edges of the block.This concentration is visible in Fig. 4, but is not evident from the plot in Fig. 5 because the density is averaged around each ring.

B. The steady state of a DC circuit
In a DC circuit with a resistive wire of uniform conductivity and constant cross section, we can deduce what the   pattern of the electric field must be in a steady state, because the currents and charge distributions must be constant.The net electric field inside the wire must be parallel to the wire and uniform along the wire.Because I ¼ JA ¼ rAE, if E were not uniform along the wire, the current would not be the same throughout the wire, the charge of each segment of the wire would be changing, and the system would not be in a steady state.
We also know that in a steady state the electric field must also be uniform across the cross section of the wire, because the round-trip integral of the electric field along a rectangular path inside the wire, with two segments in the direction of the wire at two different radii (see Fig. 6) must be zero in the absence of a time-varying magnetic field (Faraday's law).If the field does have a component perpendicular to the wire, as it might during the initial polarization transient, this field would drive a current that changes the surface charge, a process that would quickly establish a steady state.
3][4] Figure 7 shows the result of a numerical calculation in which a uniform gradient of surface charge on the surface of a cylinder (like a wire) is approximated by a series of uniform rings whose charge varies linearly with distance.Each ring is modeled as a collection of 20 equally spaced point charges, and the rings have a radius of 2 mm and are spaced 1 mm apart.Even with the coarse grid of rings shown, the field inside the cylindrical region, a modest distance from the ends, is remarkably uniform.
In a real circuit, some of the wires will be close to the battery, and the contribution of the charge on the battery (modeled in our calculations as a capacitor whose charge is maintained to be constant) to the net field inside such wires will be significant, so we do not necessarily expect a constant gradient of surface change on all of the wires.Figure 8 shows the computed surface charge distribution on a simple circuit consisting of a capacitor and a resistive wire of uniform cross section and conductivity.The charge on each capacitor plate is kept constant during the iterative relaxation computation, making the capacitor effectively equivalent to a battery for the purpose of calculating the surface charge distribution (imagine a conveyor belt continually moving charge across the gap against the electric force).
The cross section of the square wires is 6 mm Â 6 mm and the centerline of the wires forms a square 54 mm on a side.The 20 544 tiles on the surface of the wires are 0.5 mm Â 0.5 mm.The capacitor plates are 20 mm Â 20 mm, divided into 0.5 mm Â 0.5 mm tiles with constant charge density such as to produce across the 2 mm gap a potential difference of approximately 1.5 V.For this simple square circuit, the length of the wire is about 220 mm, so the electric field in the wire is about (1.5 V)/(0.22 m) or approximately 7 V/m.The conductivity was chosen to be that of Nichrome wire, but the choice of conductivity does not affect the results for the charge distributions, and affects only what current would run in the presence of a 7 V/m field.
The two observation locations for which the electric field magnitudes were graphed versus time during the computation were at <À0.027, 0, 0 > m (the center of the vertical left wire) and <0, À0.027, 0 > m (the center of the bottom wire).
There are several features of the computed surface charge distribution that are evident from a detailed inspection of Figs. 8 and 9: • There appears to be a nearly constant gradient of surface charge along the resistive wire (see Fig. 8).
• Figure 9 shows quantitatively that along the left, bottom, and right sections of the wire there is a nearly constant gradient of average surface charge density (neglecting the charge buildup at sharp corners).• A segment of a wire may be polarized transversely by charges on other segments of wire (or the battery).Close inspection of the lower left or lower right inside corners of the circuit in Fig. 8 shows small pools of the "wrong" sign of   charge on the upper surface of the bottom wire.The surface charge on the nearby portions of the vertical wires contributes to this polarization.Note also that the bottom wire in Fig. 8 has a higher charge density on its lower edge than on its upper edge.This polarization does not alter the calculated average surface charge density, which is the ratio of the net charge on a ring of tiles to the surface area of the ring.• Three-dimensional visualizations make it easy to see the transverse polarization.If we rotate the camera in the interactive program from which Fig. 8 was generated, 7 we can see that below the "wrong-sign" pools in the inner corners there is extra "right-sign" charge.This transverse polarization was not noticed in previous studies that produced only twodimensional representations. 12The transverse polarization of a circuit is irrelevant to the functioning of the circuit.If a circuit is placed in a region of large externally generated electric field, the DC current will be unaffected although the surface charge distribution will be shifted.Therefore, plotting the surface charge density averaged around 3D rings along a wire gives a clear picture of the nature of the local gradients of charge that contribute to the net electric field inside the wires.• Very near the capacitor plates, the surface charge gradient on the wire is actually "backward" to counteract the large field of the nearby capacitor plates (see Fig. 9).Near the capacitor, the capacitor's fringe field is larger than the net field in the wires (see Fig. 10).At the upper left, the large fringe field causes a pileup of positive charge on the left that makes a sizable contribution to the rightward-pointing field due to all the surface charges (shown in green), thereby reducing the magnitude of the net field to what it is elsewhere in the circuit.In contrast, in the lower half of the circuit, the field of the capacitor makes a very small contribution to the net field, which is nearly entirely due to the surface charges.Note also that the gradient in Fig. 9 along the bottom wire is somewhat smaller than the gradient along the vertical wires.The difference in gradients reflects the fact that the strongly charged vertical wires will themselves contribute significantly to the field in the bottom wire.
In contrast, the very small amount of charge on the bottom wire contributes little to the field in the vertical wires.
• Exploring the 3D model of this simple series circuit reveals an interesting effect at a corner of the circuit (see Fig. 11).
In this region, the magnitude of Ẽ in the wire increases inward.Although we had not anticipated this result, it is clearly necessary in order for Þ Ẽ Á d l to be zero for paths of different lengths.Note that for a circular circuit, there would everywhere be a smaller field toward the outer side of the wire and a larger field toward the inner side, with the direction of the field always tangent to the circle.
The wires in this simple circuit have a cross section of 6 mm Â 6 mm.It is interesting to repeat the analysis with thin wires, 2 mm Â 2 mm (in both circuits the surface tiles are 0.5 mm Â 0.5 mm). Figure 12 shows the average surface density around the thin-wire circuit.The plot shows an even more strikingly constant gradient of surface charge.The thin-wire circuit's peak average surface charge density is 12 Â 10 À10 C/ m 2 compared with 7 Â 10 À10 C/m 2 on the thick-wire circuit.However, the total amount of surface charge is greater on the thick-wire circuit, which has three times the surface area.The thick circuit has (3 Â 7 Â 10 À10 )/(12 Â 10 À10 ) ¼ 1.75 times as much charge as the thin circuit, so the effects that one charged region of the circuit has on another will be greater.If we compare Fig. 12 with Fig. 9, we see that along the bottom wire the gradient of average surface charge is greater on the thin-wire circuit than on the thick-wire circuit, presumably because in the thick-wire circuit a sizable contribution to the field in the bottom wire is due to the large amount of charge on the neighboring vertical wires.

C. A thin resistor
Figure 13 shows a circuit with thick resistive wires identical to the simple circuit treated previously, which had 6 mm Â 6 mm   wires, but now there is a thin 2 mm Â 2 mm Â 27 mm section of the bottom wire.Figure 14 shows a plot of the average surface charge density.The field in the thick wires is much smaller than the field in the thin wire, because the same current JA ¼ rAE runs in both.The cross-sectional area in the thick wire is nine times that of the thin wire, so the electric field in the thin resistor is nine times as large as the field in the thick wires.Corresponding to these large differences in the field strength, there is a nearly zero gradient of average surface charge density along the thick wires and a steep gradient along the thin wire.These differences are seen clearly in Fig. 13, where the thick wires have nearly solid red (on the left) or blue (on the right) colors, but along the thin wire there is a rapid change from red, to white (neutral), to blue.
In Fig. 14 there are very large charge pileups on the thick wires where they attach to the thin wire, and these pileups contribute to the large field in the thin wire.Also notice that at the ends of the thin wire in both Figs. 13 and 14 there are "wrong-sign" and neutral regions.Consider the thick wire that connects to the left end of the thin wire.As we have noted, the thick wire has a large pileup of positive charge.At the left end of the thin wire, the large concentration of positive charge contributes an electric field at the location of the left end of the thin wire that has an inward-pointing component, which polarizes the thin wire so strongly as to make a very short section have the "wrong" sign.
Something similar is visible where the circuit wires connect to the capacitor plates.In all of the circuit diagrams, we can see nearly neutral (white) regions next to the capacitor, and the plots of average surface charge density also show very low values next to the capacitor.The large positive capacitor plate contributes an electric field with an inwardpointing component where the wire connects to the plate, which results in polarizing that section of wire nearly to neutrality.

D. A complicated circuit geometry
Figure 15 shows a circuit with a complicated geometry.Note that the large amount of positive charge at the upper left, plus the sizable amount of negative charge along the bottom, has strongly polarized transversely the horizontal wire between these two regions.Figure 16 shows the average surface charge density along the circuit, which is not simple.Yet this distribution of surface charge produces in the Fig. 12.Average surface charge density on a circuit with thin 2 mm Â 2 mm wires.Compared with the circuit with thicker wires (Fig. 9), the gradient of average surface charge is even more nearly constant.Also note that in the bottom wire the gradient is larger than in Fig. 9. Fig. 13.A circuit with thick and thin resistive wires.Note the very large gradient of charge density along the thin wire, which contributes to producing a very large field in the thin wire.Fig. 14.The average surface charge density on the (square) rings of surface charge for the circuit with the thin section shown in Fig. 13.There is a nearly zero gradient of average surface charge density along the thick wires except near the capacitor and at the junction with the thin wire, and there is a steep gradient along the thin wire.interior of the wire an electric field that follows the wire and has a uniform magnitude throughout the circuit.The implication of Fig. 16 is that although a nearly constant gradient of average surface charge density is a good characterization of simple circuit geometries, this picture may not be a good approximation when different parts of the circuit strongly interact as they do in this case.Nevertheless, except near the capacitor, the overall trend is a decreasing average surface charge density, from positive to negative, counterclockwise around the circuit.
An interesting aspect of this circuit configuration is that in the section that is strongly polarized transversely, the field of the capacitor has a component to the right but the conventional current flow is to the left.The leftward pointing net field in this region is the sum of the field due to the capacitor and the much larger field contributed by the steep, nearly constant gradient of surface charge on the wire.

E. A grounded plate
If an external positive charge is placed to the left of a grounded metal plate, the net electric field at locations to the right of the plate is nearly zero.We can model this situation by connecting a neutral plate to a large, remote metal block, representing the ground (see Fig. 17).The relaxation algorithm shows that the plate polarizes so that the left side of the plate is strongly negative and the right side is almost neutral (in contrast to the polarization of the neutral block in Fig. 4), while the "ground" has acquired a positive charge, spread over its surface.If the plate were isolated instead of grounded, the net electric field to the right of the plate would be increased by the polarization of the plate, not decreased.

F. Exploring the surface charge interactively
A browser-based GlowScript VPython program 7,9 allows the user to choose an electrostatic or circuit situation, examine the surface charge distribution from any viewing angle, and drag the mouse (or finger) to see the electric field at any location, calculated in real time from the surface charge distributions that were computed separately.In addition to the examples described in this paper, the program also includes an example of a current running in a loop of wire that is inside a solenoid with a constant nonzero dB/dt, where the electric field due to the nonzero dB/dt instead of external charges drives the polarization of the wire. 13e program offers important insights into some aspects of electrostatics.One of the examples shows the polarization of a block of metal by a nearby point charge, as shown in Fig. 4. The user can choose to show the field of the external point charge at any location, the field contributed by the surface charges on the polarized block, and the net field (the vector sum of the two contributions).At all locations inside the block the field of the external charge and the field of the surface charges are both present but exactly cancel each other, yielding a zero net field.The commonly used term "shielding" is misleading; electric fields do penetrate matter without diminution.At every location inside the conductor the net field is the vector sum of the fields contributed by external charges and the field contributed by charges on the surface of the conductor.Another important argument against the concept of "shielding" is that just to the right of the polarized metal block in Fig. 4, the net field is much larger than the field of the external charge, due to the contribution to the net field by the surface charges on the block.

G. Amount of surface charge
In all of the circuit configurations we have described, the average surface charge density of a ring of charge is on the order of 5 Â 10 À10 C/m 2 , as can be seen in the plots.In each Fig. 16.The average surface charge density along the circuit shown in Fig. 15.In this winding circuit, the pattern of average surface charge density is not simple, due to major interactions between neighboring parts of the circuit, though the general pattern of falling average surface charge density is still visible. of these circuits the potential difference across the 2 mm capacitor gap is approximately 1.5 V.For the simple square circuit, the length of the wire is about 220 mm, so the electric field in the wire is about (1.5 V)/(0.22 m) or approximately 7 V/m.The conductivity was chosen to be that of Nichrome wire, but the choice of conductivity does not affect the results for the charge distributions, and affects only what current would run in the presence of a 7 V/m field.
It is interesting to compare these numbers with the charge and field in electrostatic situations.In air at one atmosphere, the critical field strength to create a spark is about 3 Â 10 6 V/m, a field nearly six orders of magnitude larger than the field in a typical low-voltage circuit.The field just outside a charged conducting surface can easily be shown using Gauss's law to be E ¼ ðq=AÞ= 0 , where q/A is the surface charge density.To create a field of 3 Â 10 6 V/m, the surface charge density must be q=A ¼ 0 E ¼ 2:7 Â 10 À5 C/m 2 , five orders of magnitude greater than the surface charge density in a low-voltage circuit.The electric field in the wires of a low-voltage circuit is much smaller than the breakdown field in air, and to produce this small field very small amounts of charge are sufficient.The high conductivity of metals results in sizable currents even with small fields.
Sometimes students ask whether the surface charge contributes to the current.Presumably these charges are mobile along the surface, but their contribution to the current is negligible, because the amount of charge on the surface is infinitesimal compared to the amount of mobile charge in the interior of the wire, and the cross-sectional area of the ring of surface charge is tiny compared to the cross-sectional area of the interior of the wire.

IV. DISCUSSION
We have found that computations of simple circuit models and 3D visualizations are helpful in building a qualitative understanding of more complex situations, understanding that would be difficult to obtain from analytical approaches alone.In the extensive literature on the role of surface charge in circuits, apparently no one had noticed the significance of the transverse polarization of the wires by neighboring wires, an observation that seems to require 3D visualization with easy rotating and zooming and panning of the view.There were strong hints in previous work that a constant gradient of surface charge density might be characteristic of simple circuit geometries, but one must plot the average ring surface charge density to see that constant gradients are indeed a common motif.The 3D visualizations facilitated our understanding of why the gradient of surface charge on the bottom wire in the simple circuit is smaller than the gradient on the side wires (compare Figs. 9 and 12).
The role of surface charge in establishing the nonzero electric fields that drive currents in circuits has explanatory power that can be pedagogically useful. 14,15Interactive visualizations of computed surface charge distributions and the resulting fields inside circuit elements can help students understand that the same fundamental principles that govern electrostatic phenomena apply to circuits as well.In this context the Kirchhoff loop rule is clearly derived from Faraday's law: Þ Ẽ Á d l ¼ 0 in the absence of a time-varying magnetic field.The Kirchhoff node rule is also not a special concept, but combines the definition of the steady state with the principle of charge conservation.During the transient that establishes the steady state, the Kirchhoff rules are not valid, because there are time-varying currents, d B=dt 6 ¼ 0, and the system is not in a steady state.
Advanced students can study additional circuit and electrostatic geometries.For simplicity, the geometries treated in this paper all have sharp corners, but there exist mechanisms for dealing efficiently with more complex geometries. 16ith continuing advances in computational speed, it may become possible to compute charge distributions in real time, in which case it would be interesting to watch the behavior of the system as external charges move nearby.
A good starter problem for students with significant computational experience would be to write their own analysis of the polarized block described in this paper, for which all the parameters have been supplied.It has a relatively small number of tiles and so requires smaller computer resources and time than some of the other configurations.

Fig. 1 .
Fig.1.The initial state of a DC circuit modeled as a resistive wire that is initially neutral and is connected to a charged capacitor.The capacitor's charge is kept constant (a battery analog).Red (on the left) denotes positive charge and blue (on the right) denotes negative charge.Neutral areas are gray.

Fig. 2 .
Fig. 2. If a volume inside a homogeneous conductor initially contains no charge, the current out of the volume, which is proportional to the electric flux, must be equal to the current into the volume by Gauss's law, so that at each step in a relaxation calculation the charge in the volume does not change and remains zero.From Chabay and Sherwood, Matter & Interactions, 4th ed.Copyright 2015 by John Wiley & Sons, Inc. Reprinted by permission of John Wiley & Sons, Inc. (Ref.15).

Fig. 3 .
Fig. 3.The surface of the conductor is divided into (square) rings.The average surface charge density of the ring is the net charge on the surface of the ring divided by the surface area of the ring.From Chabay and Sherwood, Matter & Interactions, 4th ed.Copyright 2015 by John Wiley & Sons, Inc. Reprinted by permission of John Wiley & Sons, Inc. (Ref.15).

Fig. 4 .Fig. 5 .
Fig.4.A metal block is polarized by a positive charge to the left of the block.The equilibrium surface charge on the block is shown in shades of blue (on the left side of the block) for negative charge and shades of red (on the right side) for positive charge.This charge distribution is an example of electrostatic equilibrium.

Fig. 6 .
Fig. 6.The integral Þ Ẽ Á d l ¼ 0 around any path inside a wire in a DC circuit, so Ẽ must be uniform across the diameter of the wire.

Fig. 7 .
Fig. 7.A line of charged rings with a constant gradient of charge along the line of rings.The saturation of the red color (as one moves toward the right) indicates the amount of positive charge on each ring.Despite the large space between charges, the computed electric field inside the rings (orange arrows) is remarkably uniform, both along and across the line of rings, just like the pattern of electric field inside a DC current-carrying wire.The amount of positive charge on the rings increases linearly from left to right along the line of rings.Not shown is the divergent electric field outside the rings.From Chabay and Sherwood, Matter & Interactions, 4th ed.Copyright 2015 by John Wiley & Sons, Inc. Reprinted by permission of John Wiley & Sons, Inc. (Ref.15).

Fig. 8 .
Fig. 8.The computed surface charge distribution on a simple resistive DC circuit (the charge on the capacitor plates is maintained constant).Shades of red (on the left) represent the magnitude of positive charge, and shades of blue (on the right) represent the magnitude of negative charge.Note the approximately constant gradient of surface charge along the wires.

Fig. 9 .
Fig. 9.The average surface charge density on the (square) rings of surface charge, going around the circuit counterclockwise from the positive capacitor plate.The gaps represent the omission of the complications at the sharp corners.Note the nearly constant gradient of average surface charge density along the path.

Fig. 10 .
Fig. 10.The field of the capacitor is represented by magenta arrows, the field of all the surface charges by green arrows, and the net field by orange arrows.The fields are calculated along the center line of the wires but displayed in front of the wires.Note the constant magnitude of the net field along the wires.

Fig. 11 .
Fig.11.The net electric field in a corner of the circuit is not uniform across the cross section, associated with varying path lengths around the circuit.

Fig. 15 .
Fig. 15.A circuit with a more complicated geometry.Note the strong transverse polarization of one of the sections, due to the large amount of positive charge just above it and the large amount of negative charge just below it.

Fig. 17 .
Fig. 17.A grounded plate near an external positive charge.The left side of the plate is strongly negative, but the right side (not visible in the figure) is nearly neutral.The net electric field to the right of the plate is the sum of the field of the external charge (magenta arrows pointing to the right) and the field of the negative surface charge on the plate (green arrows pointing to the left).The net field would be shown as an orange arrow, but it is too small to see in this case.