Counter-intuition in permanent magnet circuits

On average, physical intuition is useful half the time and misleading the other half. As a case in point, a trial user set up what he felt was the most basic magnet problem to test Magnum. The program returned results that differed from his expectation by about a factor of five. He contacted me to find what was wrong with his calculation. As it turned out, his setup was perfectly correct and the program was returning the right answer. The expectation was wrong.

The concept of a magnetic circuit is often useful to estimate achievable magnetic flux density in a laboratory magnet (i.e., a system with an iron flux conductor, a small air gap and a drive coil). The theory is described in Sect. 5.7 of my book Principles of Charged Particle Acceleration (available for free download at http://www.fieldp.com/cpa.html. The relationships follow from Ampere’s law and the conservation of magnetic flux. The issue is clouded for circuits driven by permanent magnets. In fact, I have to admit that Sect. 5.8 in my book is misleading. In reality, the gap field in a permanent magnet circuit depends on how the assembly is constructed.

Figure 1. Permag calculations of permanent magnetic circuits.

Figure 1. Permag calculations of permanent magnetic circuits.

The issue can best be understood with an example. Figure 1 shows a cylindrical magnetic circuit for a PerMag calculation. The air gap and permanent magnet are cylindrical with 2.0 cm radius. The gap length is Lg = 1.0 cm and the magnetic length is Lm = 2.0 cm. The ideal permanent magnet has Br = 1.0 tesla and the iron has μr = 500. The intuitive view of a magnetic circuit is that the lines of B are forced to flow in the high-reluctance iron (i.e., the iron is a magnetic conductor). In this case, the behavior of the circuit should not depend on the relative position of the permanent magnet and we expect the same gap field for the two geometries illustrated in Fig. 1. Under the assumption of contained flux, the theory in Sect. 5.8 predicts an average gap field:

Bg = Br/(1 + Lg/Lm)

For parameters of calculation, formula implies Bg = 0.67 tesla.

The PerMag calculation gives a gap field of about Bg = 0.57 tesla for case a. The result is consistent with theory if we consider that there are flux losses from leakage and fringing flux. On the other hand, the gap field for the bottom configuration is only 0.15 tesla, a significant difference. Clearly, the idea that B lines are “contained” by the iron is wrong. We need a better understanding of the psychology of flux lines.

A line of magnetic flux density emerging from the left-hand side of the permanent magnet wants to find its way to the right hand side the easiest way possible (i.e., the path of least reluctance). For case a, the B lines emerge directly into the air gap. Most of them follow the easiest path — cross the short gap and return through the iron. A fraction of the lines take a shortcut to the outer iron piece or return directly through air to the upstream side of the magnet.

In contrast, the B lines in case b must travel a relatively long distance through the iron stalk before reaching the air gap. The reluctance of the radial gap between the inner and outer iron pieces is less than that of the working gap. The result is that B lines cut out early and most of the flux never reaches the working gap. The example has an important practical implication. If the goal is to produce the maximum flux in an air gap of a permanent magnet circuit, the magnets should be adjacent to the gap.

Improved extrusion model in Geometer/MetaMesh

MetaMesh (our 3D automatic mesh generator) accepts geometric information from a wide variety of sources (see Automatic meshing of printed circuits). For relatively simple systems, the quickest path to a mesh is through the native combinatorial solid modeler of MetaMesh. A variety of shape models are available. One of the most useful is the extrusion, the projection of a arbitrary shape over a given length. We have added new features that make it much easier to create extrusions with a desired position and orientation.

Figure 1. Outline generation utility in Geometer

Figure 1. Outline generation utility in Geometer

I’ll start with a review of the old procedure for extrusions. The basic principle in MetaMesh is to define basic parts (i.e., set model types and dimensions) in a reference workbench space and then to move them to the model space by SHIFT and ROTATE operations. In the old convention, an extrusion extended along z in the workbench space with its cross-section outline defined in the x-y plane. The outline consists of a set of line and arc vectors that form a closed shape. The outline editor of Geometer (a full-featured 2D CAD utility shown in Fig. 1) is a convenient way to create vector sets. Once created, an outline may be used to define multiple extrusions at different positions or orientation by adding SHIFT or ROTATE parameters. An extrusion using the outline of Fig. 1 has the following TYPE form in the MetaMesh script:

Type Extrusion
  L    5.2912 -1.000 7.500 -1.000 S
  L    7.5000 -1.000 7.500  1.000 S
  L    7.5000  1.000 5.291  1.000 S
  A    5.2912  1.000 3.000  2.500  3.000  0.000 S
  A    3.0000  2.500 0.500  0.000  3.000  0.000 S
  A    0.5000  0.000 3.000 -2.500  3.000  0.000 S
  A    3.0000 -2.500 5.291 -1.000  3.000  0.000 S
End

The data lines contain the x-y coordinates of the start and end points of lines and the start-end-center points of arcs.

Because the outline may specified at absolute positions in the x-y plane, it is easy to create desired extrusions that point along z. In most cases, SHIFT and ROTATE operations are unnecessary The problem arises if you want extrusions that extend along x or y. It is not immediately obvious to most people (myself included) how the x-y coordinates of Fig. 1 map to y-z or z-x coordinates when 90° rotations are applied about different axes. Positioning x or y extrusions often requires considerable experimentation in Geometer.

Figure 2. Add/Edit part dialog in Geometer

Figure 2. Add/Edit part dialog in Geometer

We have modified both Geometer and MetaMesh so that you can directly define extrusions along x and y. For extrusions along x, the outline coordinates are interpreted as absolute values in the y-z plane. For an extrusion along y, the outline data gives z-x values. It is easy to apply the feature. Figure 2 shows the modified Add/Edit part dialog in Geometer. The red arrow shows new radio buttons that are active only when the part type is set to EXTRUSION. The choice of extrusion axis determines how the path coordinates are interpreted. In the MetaMesh script, the TYPE command has a modified form:

Type Extrusion [X,Y,Z]

Some usage notes:

  • If no direction option appears in the TYPE EXTRUSION command, the default is Z. Therefore, existing scripts are interpreted correctly.
  • The new capabilities affect the extrusion shape and direction in the workbench frame. SHIFT and ROTATION operations may still be applied in the transfer to the assembly frame.
  • The same outline may be used in Geometer for multiple extrusion parts with different extrusion directions. Figure 3 shows an example.
Figure 3. Multiple=

Figure 3. Multiple extrusions with different directions from the same outline

New Associates program for consultants and small businesses

We have initiated a new Associates program designed for consultants and small businesses. Participants can apply our 3D software in their work at no charge and earn extra income. We feel that experienced professionals can best offer recommendations to customers and colleagues. Application areas include:

  • High-voltage engineering
  • Applied electrostatics
  • Electromagnet design
  • Permanent magnet devices
  • Electron guns and electro-optical devices
  • Electron and ion accelerators
  • X-ray source development
  • X-ray imaging
  • RF ablation therapy and hyperthermia treatments

An associate may request any package from our CATALOG in areas where they have a demonstrated expertise. The software is activated for a period of six months. Activation is renewed for an additional period if an associate’s recommendations have resulted in at least one software sale.

Field Precision handles all matters of package distribution and payment. An Associate receives a commission of 25% of the sale amount resulting from his/her recommendation. Associates provide basic technical help (installation, program operation, application advice…) to their customers. Associates may enter into independent contracts with their customers for advanced support. We will answer Associates’ basic questions about the software and respond to reports of program bugs. Field Precision is available to consult on detailed computational strategies for applications.

An Associate may withdraw from the program at any time without penalty. The associate’s customers will receive continuing support and free updates. Associates who opt to purchase the software receive a 20% discount from the current catalog price. The Associates program is open to consultants in all regions except Japan and nations subject to export restrictions as defined by the U.S. Department of Commerce. Detailed information on the Associates’ program and a membership request form are available at http://www.fieldp.com/associates.html.

Automatic 3D meshing of printed circuits

A recent trial user had an application that required creation of a three-dimensional mesh of a printed circuit. Such an object is thin in z with relatively complex spatial variations in x-y. The user attempted to represent the full complement of conductors as a single, thin STL solid object with thousands of facets. It would have been astronomically difficult for MetaMesh to analyze such a structure. The task is equivalent to deciding whether a point is inside or outside a thread of a spider web.

In reviewing the application, it occurred to me that there was a much easier approach to model such a structure, based on technology that we had already incorporated in the two-dimensional Mesh program. The idea is to assign elements in a plane to regions according to values in a photographic image. The advantages are easy setup and high reliability. In this article, I will describe new MetaMesh capabilities for analyzing photographs and illustrate them with an example of a layer in a printed circuit.

Figure 1. Sample printed circuit, PNG format.

Figure 1. Sample printed circuit, PNG format.

Figure 1 is a photograph of the test geometry. The image has only two colors — white represents thin conductors. In the benchmark example, conductors (Region 2) are mapped to a 1.0 mm layer in a uniform solution volume (air, Region 1). The first step is to set the interpretation of photographs. The following entries appear in the GLOBAL section of the MetaMesh script:

INTERVALS  Lightness
  50.0  100.0  2
END

The construct states that photographs will be interpreted in terms of lightness values (0.0 to 100.0 percent). Lighter areas will be assigned to Region 2. An INTERVAL section may contain up to 250 data lines — in this case, only one interval is needed. Alternatively, assignment may be via hue values (0.0 to 360.0 degrees) in the image.

Parts are basic building blocks in MetaMesh. The concept is flexible — parts range from simple geometric solids to complex STL shapes. We have added a new PHOTO part type. The following section defines a photo part in the example:

PART
  Type Photo PC01.PNG 0.00  0.00  50.00  50.00
  Name PC
  Fab 1.00
END

In the workbench frame, the photograph image is mapped into an x-y plane centered at z = 0.0 with thickness Δz set by the fabrication parameter. The resulting solid can be moved to any position or orientation with optional SHIFT and ROTATE commands. In the example, the photographic image is contain in the file PC01.PNG. (MetaMesh also handles BMP and PCX formats.) The information is mapped to an area with spatial dimensions xmin = 0.0, ymin = 0.0, xmax = 50.0 and ymax = 50.0, independent of the image pixel dimensions. Figure 2 shows the resulting mesh in the slice plane z = 0.0, while Figure 3 shows a three view with perspective. The entire structure was created with the two simple statements listed above.

Figure 2. MetaMesh screen shot, slice in the plane z = 0.0.

Figure 2. MetaMesh screen shot, slice in the plane z = 0.0.

Figure 3. Three dimensional view, printed-circuit example.

Figure 3. Three dimensional view, printed-circuit example.

Photographic analysis is a powerful new feature of MetaMesh. It greatly simplifies the representation of multi-layer printed circuits and striplines for electromagnetic analysis. Complex printed-circuit assemblies can be built in two steps:

  1. Set up a foundation mesh with element layers of the appropriate thicknesses.
  2. Use photographic layouts to set conductors or dielectrics in each layer. If there are different components in a single layer, they can be represented with different colors in the photograph.

The photographic method has unlimited applications. Information from up to 250 photographs may be included in a MetaMesh script. The technique applies to any three-dimensional structure with photographic slice data, such as MRI scans.

Modeling a cathode/focus-electrode gap with OmniTrak

High-current electron-beam guns typically have the geometry of Fig. 1. The flat or concave cathode operates in the space-charge limited mode. A shaped focusing electrode compensates for the effect of beam-generated electric fields to generate a parallel or converging beam. The heated cathode is composed of a high-temperature material like tungsten. The focusing electrode is composed of a more easily-machined material like molybdenum. The narrow gap between the components prevents conductive heat loss and melting of the focusing electrode.

Figure 1. Two-dimensional Trak model of a high-current electron-beam gun

Figure 1. Two-dimensional Trak model of a high-current electron-beam gun

It is relatively easy to set a narrow gap in a two-dimensional Trak mesh. The task is more challenging for three-dimensional OmniTrak meshes, where large numbers of elements lead to long run times. One purpose of this article is to demonstrate how to a create a cathode surface with good facets by optimizing the fitting logic for parts of the cathode assembly. A second activity is to confirm that Trak and OmniTrak generate almost identical results for a test geometry.

The benchmark electron gun of Fig. 1 has a flat cathode with 2.0 mm radius. The applied voltage on the cathode and focusing electrode is -54 kV. The focusing electrode shape gives some beam convergence in the acceleration gap and a modest divergence after passing through the extraction aperture. The combined effects of the focusing electrode profile and the 0.2 mm gap give a beam with good current-density uniformity and low emittance. A Trak calculation gives current density je = 16.4 ± 0.8 A/cm² at the cathode and total current 2.062 A. The top plot in Fig. 2 shows the phase-space distribution (r, r’) at z = 30.0 mm. Over-focusing at the edge is relatively small.

Figure 2. Phase-space distributions (r,r') for the extracted beam at z = 30.0 mm

Figure 2. Phase-space distributions (r,r') for the extracted beam at z = 30.0 mm

To minimize run time in OmniTrak, the calculation is performed in the first quadrant of the x-y plane (x ≥ 0.0 mm, y ≥ 0.0 mm) with symmetry boundaries at x = 0.0 mm and y = 0.0 mm for both the fields and electron trajectories. The element sizes near the emission surface have the same dimensions as those in the Trak calculation (Δx = Δy = 0.050 mm, Δz = 0.125 mm). The mesh had 1.63 million elements. Figure 3 shows a slice view of the mesh geometry near the cathode surface.

Figure 3. Detail of the mesh for the OmniTrak calculation in the plane y = 0.0 mm

Figure 3. Detail of the mesh for the OmniTrak calculation in the plane y = 0.0 mm

The cathode assembly is formed from three parts:

  • A turning to represent the cathode, with outline specifications taken from the Trak input file. The part is associated with the CATHODE region (fixed potential equal to -54 kV) in the HiPhi and OmniTrak calculations.
  • A turning to represent the focusing electrode, again with outline vectors from the Trak input file (FOCUS region with -54 kV fixed potential).
  • A turning to represent the gap, with inner radius 2.0 mm and outer radius 2.2 mm. As shown, the shape extends a few elements past the cathode surface. The part is assigned to the GAP region, which has the same physical properties in the electrostatic calculation as the VACUUM region (εr = 1.0).

I employed two techniques to ensure that the facets on the cathode surface were flat and well-formed. The first is simple: pick a foundation mesh that minimizes the work that MetaMesh must perform. In this case, I made sure that a foundation element boundary occurred at z = 0.0 mm, the position of the cathode surface. Here is the complete mesh specification in z:

ZMesh
-2.00  -0.25   0.250
-0.25   0.50   0.125
0.50  30.00   0.250
End

If the element boundary were at an arbitrary position (z ≠ 0.0 mm), then it would be necessary for MetaMesh to perform thousands of needless operations to shift facets.

The second technique is to plan fitting operations carefully. Fitting of a part is controlled by the commands:

SURFACE REGION RegNo
SURFACE PART PartNo

In response to the first command, MetaMesh collects all facets of the part that are shared with elements that have region number RegNo. The program them shifts the facet nodes toward the theoretical outer surface of the part.  The second command form has similar function, except that MetaMesh picks facets adjacent to elements with part number PartNo.

Let’s consider how fitting works for the cathode assembly. Here is a summary of fitting commands for the contiguous parts of the cathode assembly:

PART
  Region: Gap
  Name: Gap
  Surface Region Cathode
  Surface Region Focus
END
PART
  Region: Cathode
  Name: Cathode
  Coat Vacuum Emission
END
PART
  Region: Focus
  Name: Focus
  Surface Region Vacuum
END

To begin, note the order of parts. The dielectric part appears before parts with fixed potential. With this order, any shared nodes are assigned the region number of the \textttCATHODE or \textttFOCUS parts, giving the correct fixed-potential condition on the electrode surfaces.

I will point out some features of the fitting list and then explain how they work. The GAP part has its own region assignment and contains commands for fitting to both the CATHODE and FOCUS. The CATHODE part has no SURFACE command, while the FOCUS part has a single command for surfaces in contact with elements of the VACUUM region. The order is chosen to ensure that facets on the front and side faces of the cathode are shifted only in the x-y plane, not in z. Here is the logic:

  • Fitting parts with sharp edges (like a cylinder or the annular shape of the GAP) involves ambiguity. Should the facet be moved toward one edge or the other? This is the reason why I extended the GAP past the CATHODE and FOCUS. The end is far enough away to ensure that MetaMesh moves facets to the inner and outer cylindrical surfaces when fitting the GAP. In other words, node displacements are purely in the x-y plane.
  • There are two reasons why there is no SURFACE command for the CATHODE: 1) nodes on the front surface already lie at z = 0.0 and 2) the side surfaces have already been positioned through fitting of the GAP.
  • The inner surface of the FOCUS has already been set by fitting of the GAP. The single SURFACE command specifies that front-surface facets (adjacent to VACUUM elements) should be adjusted. The GAP was defined as a separate region to ensure that only nodes on front surface facets are moved.
  • The COAT command for the CATHODE resets the region number of the nodes of facets adjacent to VACUUM elements. The new region number has the emission property in OmniTrak. Because the GAP has its own region number, only facets on the front face of the CATHODE are set as emitters.

Figure 4 is a three-dimensional view of the completed cathode assembly. Facets on the front cathode face are flat and well-formed. The OmniTrak calculation gives a quadrant current of 0.512 A, corresponding to a total current 2.046 A. The bottom plot of Fig. 2 shows the phase-space distribution at z = 30.0 mm for 5024 model electrons. A comparison at this distance provides a sensitive test of correspondence. The distributions are almost identical. The beam is slightly larger in the OmniTrak calculation.

Trak and OmniTrak users can use this link to download input files for the calculations:

http://www.fieldp.com/myblog/examples/cathodegapdemo.zip

Figure 4. Three-dimensional view of the completed cathode and focus electrode.

Figure 4. Three-dimensional view of the completed cathode and focus electrode.