Electric fields between metal electrodes

This program can be used to calculate the potential and the electric field in the empty space between metal electrodes. In electrostatics, it is often the case that the potentials of different metal parts are known. Since the charges on the metal parts are freely movable, it is initially not known where the charges are located. Therefore, the potential and the electric field cannot be calculated using Coulomb's law.

It is possible to solve such problems with the Poisson equation. For this purpose, the equation div E = 0 or the Laplace equation for the potential is solved in the space between the metal parts. If the solution for the potential is known, the electric field is calculated by forming the gradient. If the electric field between the metal parts is known, the charge density on the metal electrodes is calculated from the divergence of the electric field.

The program can be used to draw any arrangement of metal parts at different potentials in order to calculate the potential, field, energy density of the field and charge distribution. The calculation is two-dimensional and represents a section through a three-dimensional arrangement. This means that a line in the figure represents a section through a metal plate, a filled area in the figure represents a section through a solid metal body and a point in the figure corresponds to a section through a metal rod.

The boundary condition can either be a grounded metallic boundary at potential zero (Dirichlet boundary condition) or the derivative of the potential at the boundary can be set to zero (Neumann boundary condition). This means that no field lines can leave the investigated space. This case comes relatively close to an open boundary. (See also "electrolytic trough" in the practical course).

The program is particularly suitable for observing the field distribution in the plate capacitor, in the Faraday cage, in the vicinity of tips, etc. The charge distributions are obtained for these arrangements and the effects of influence can be observed easily. Note that the field of point charges, i.e. E proportional to 1/r², cannot be observed because all objects are extended in the third dimension (point corresponds to a rod) and it is not possible to place the reference point with potential zero at infinity.


Operation

After starting, an empty spatial area is shown that is divided into a grid with 100x100 grid cells. If the resolution is to be changed, nx and ny can be selected differently. The size of a grid cell is set to one millimeter at the start and can be changed as required. To draw a metal part, enter the value of the desired potential in volts in the "Potential" field and then draw a metal part with the mouse while holding down the left mouse button. This appears as silver-grey dots in the image. If further metal parts are to be drawn in, the correct potential is entered first and then drawn in. By moving the mouse and pressing the right mouse button, points can be deleted, which are then treated as a vacuum again. Do not forget to select the desired boundary condition: either an earthed boundary (potential at the boundary fixed at zero volts) or, as with the electrolytic trough, Neumann's boundary condition (field strength perpendicular to the boundary equal to zero). When drawing scale arrangements, it is helpful to check the box in the bottom left corner to display the location of the cursor. Completely outlined areas can be filled in by clicking inside the area with the left mouse button while holding down the Ctrl key.

When the layout is finished, press the "Start" button. 24000 iterations are calculated to solve the Laplace equation in the vacuum between the electrodes. Normally this number should be sufficient for a satisfactory convergence. If not, you can calculate a further 24000 iterations by pressing the Start button again to achieve particularly good convergence.

At the bottom left, select the physical quantity to be displayed (potential, electric field, charge density or energy density of the field). For potential, the highest potential is displayed in green and the lowest potential in blue. Charge density: red means positive charges, blue means negative charges, black means no charge density in this location. If the calculation converges well, the charge density in a vacuum should be zero everywhere. Energy density: violet color scale. The scalar values or the magnitude of the vectorial values can be read off the cursor. All values can also be displayed as a 3D grid image. The 3D grid graphic can be rotated by moving the mouse in the image with the left mouse button pressed. The light source can also be rotated (right instead of left mouse button).

In the color representation of the electric field strength, you can click with the left mouse button to draw a field line from the position of the mouse. By repeatedly clicking in the image at suitable points, you can create a field line image for the arrangement. For an optimal field line image, the density of the field lines should be (approximately) proportional to the local field strength.

The total energy W stored in the electric field and the total positive charge Q+ and total negative charge Q- on the metal parts are displayed in a box in the main window.


Numerical realization

The Laplace equation is solved iteratively using a difference method in which the mean value of the four potentials of the neighboring spatial points is always calculated. However, the method is modified in such a way that the changes in the potential are increased by a factor of 1.5 compared to the previous iteration step for faster convergence. The gradient of the potential and the divergence of the field are calculated from the four neighboring points using a quadratic approximation.