Using CPO2D or 3D to calculate a magnetic field by solving Laplace’s equation (that is, converting an electric field to a magnetic field)

(for the more professional user).

There are some similarities between electrostatic and magnetostatic fields -Laplace’s equation is essentially the same. Under some conditions it is therefore possible to consider the electrical charges as magnetic monopoles and to regard the fields calculated by the CPO programs as magnetic fields. These fields can then be put in the output file as a grid of values, and after appropriate scaling these could become the input to a user-supplied magnetic field routine in an electrostatics calculation.

The procedure is as follows:

Suppose that the number of ampere-turns is NI. Use CPO2D or CPO3D to model the pole pieces and the neighbouring parts of the magnetic circuit. Apply a potential difference across the gap of dV = 0.00125664 (=4*pi*0.0001, see below). Then output the fields into the output file. Then use this file as the magnetic data file for CPO3D. Finally use the CPO3D databuilder to scale the field, using NI as the scaling factor.

In more detail:

According to P W Hawkes and E Kasper, Principles of Electron Optics (Academic Press, 1989), page 123, the magnetic scalar potential P (usually represented by Greek chi, which is not available as a symbol here) is a solution of Laplace’s equation when certain conditions are satisfied. Some of these conditions are (see Hawkes and Kasper and references given therein for fuller information):

(1) The region in question must be restricted to include the pole pieces but not the coils that carry the exciting currents.

(2) The permeability of the material of the pole pieces must be extremely high.

(3) The cross-section of the material must be large enough to ensure that practically all the magnetic flux flows through the gap.

(4) The gap has to be long (in the radial direction) and narrow, so that the field between the pole faces may be regarded as practically homogeneous.

Then the surfaces may be regarded as surfaces of constant P.

Taking one of the pole faces to have the potential P1, the other has P2 where

P1 - P2 = NI

and where NI is the total number of Ampere-turns of the coil. Hawkes and Kasper advise that at the boundary of the region being studied the potential should be interpolated linearly across the gap.

CPO3D can then be used to find P in the region between the pole faces. The magnetic field strength H is -grad(P), and B = mu0*H.

Therefore using CPO3D with P1 and P2 entered as electrostatic potentials V1 and V2, the calculated fields, which are in units of V/mm, can be converted to Tesla by multiplying by 1000*mu0, that is, by 4*pi*0.0001.