Advanced 3D graphics and movie capabilities

We’re making some major advances in the graphics capabilities of programs in the 3D AMaze series. We expect to release updates in the early Fall.  The improvements lie in three areas:

Saved views
It takes effort and experimentation to set up optimal 2D or 3D views in postprocessors like PhiView and MagView. We are adding an option to save view parameters in a file viewname.avw. You can reload the solution later and immediately recover the view. Furthermore, you can apply the same view parameters to a series of different solutions with similar geometries.

Automatic solution plotting
We are adding the option to save snapshots of solutions at specified times in the initial-value programs HeatWave (dynamic mode) and Aether (pulse mode). The goal is to generate a large set of still shots to create a simulation movie.  The following new commands will be added to the Diagnostics section of the control script.

LOADVIEW ViewName
DTIMEPLOT dTime
SETTIMEPLOT TRecord

The first command loads the saved view viewname.avw. The other three commands control the times for recording plots. They are similar to those that control data dumps. The DTimePlot command specifies a uniform time interval for creating plot files. It can be supplemented with the SetTimePlot command to make pictures at critical times.

Analysis script commands for plotting
In previous program versions, scripts to control postprocessor analysis operations were limited to generating quantitative data.  We will add following command for plotting:

PLOT ViewName PlotName NH NV

The postprocessor automatically writes the file plotname.bmp  in BMP format with pixel dimensions NH × NV. The plot uses data from the currently-loaded solution and parameters for the saved view viewname.avw. With this capability, you can quickly generate plots for a large series of solutions. Using Perl or another script language, you can run an extended series of calculations and automatically create graphical output.

The end result is that the AMaze programs will be able to generate hundreds to thousands of BMP files autonomously. Most likely, you will want to assemble them into a compact movie. Originally, I thought it would be easy to find a freeware program on the Internet to accomplish this task. My searches proved frustrating and ultimately fruitless. I found a few programs that claimed to accomplish the task, but the freeware versions were merely teasers that put a stamp on the movie frames. I thought the freeware Avidemux video editor might be useful, but there was no way to tell. The program has no instruction manual!

As is often the case, the best solution was to create our own program. The sole function of CECIL_B is to convert large sets of BMP files to AVI movies. Besides being free, the program has several advantages:

  • It is well organized and easy to learn. If you have the BMP files, I guarantee you can start making movies in 5 minutes.
  • A setup takes just a few seconds, even with thousands of input files.
  • It is easy to change codecs to optimize picture quality and compression.

Regarding codecs, the instruction manual gives a brief but useful discussion on this mysterious topic. The package includes two good codecs to get you started.

CECIL_B screenshot

Everyone is welcome to download CECIL_B. There are few restrictions on its use and distribution. Furthermore, we do not require personal information, and we will not put you on a distribution list. Here’s a link to the download site. We have tested the program thoroughly, but software can be surprising. Please let us know if you encounter any problems.

Expanded plot features in MagWinder

One of the major task in simulating three-dimensional electromagnets is the definition of complex drive coils. The utility MagWinder is part of the Magnum program suite. Drive circuits are represented in Magnum by dividing them into a large set of short segments (or current elements). MagWinder provides an interactive environment where users can build magnet windings step-by-step. Several features of MagWinder help in the task of current-element generation:

  • A comprehensive set of parametric models for common coil configurations (solenoids, helices,…).
  • Interactive dialogs to modify the geometry, position and orientation of components.
  • Versatile graphical displays to show the state of the assembly.

Although the previous version of Magwinder featured high-quality 2D and 3D plots of coils, it did not have the provision to display objects in the finite-element mesh (iron pole pieces, permanent magnets,…). Such a display would allow users to confirm the size, orientation and placement of coil assemblies.

In response to user requests, we added a 3D mesh-display capability. The figure shows the working environment of the new program. There are four associated commands (represented by new entries on the tool bar):

  • Load a mesh definition file (MDF) created by MetaMesh
  • Set the displayed mesh regions and the plot style. The region boundary facets may be shown as solid or as a wirefame. The boundary may be displayed as a continuum or as a set of facets.
  • Set clipping planes for region facets
  • Close the mesh file to display only the coils.

The interactive environment features the standard set of AMaze controls to move around in 3D space. Note that the plot shown in the figure has three-dimensional shading as well as hidden-line removal for both current elements and mesh object boundaries.

MagWinder working environment

MagWinder working environment

Tutorial: electron gun design with Trak

Vacuum electronic devices for microwave generation (e.g., klystron, traveling wave tube,…) require high-current-density electron beams matched to a focusing solenoid. The standard approach is to use a gun outside the field that generates a converging beam. The motivation is to allow relatively low current density at the cathode, consistent with operation at moderate temperature for long lifetime. The beam reaches its target current density at the waist where is enters the magnetic field. The goal is to achieve a Brillouin-type equilibrium with minimal transverse energy. This condition has the advantages of low axial energy spread and minimal focusing field.

We have posted a detailed case study of an electron gun and focusing solenoid for a microwave research application. The gun generates a beam with 120 keV kinetic energy and 2.0 A current. The challenge is that the beam radius must be less than 0.25 mm through the focusing system. The report touches on a broad spectrum of design issues:

  • Estimating gun parameters from analytic expressions for beam compression.
  • Determining electrode geometries to generate a converging beam with minimal emittance.
  • Representing effects of the gap between the cathode and focusing electrode.
  • Mapping electric field stress.
  • Designing a pulsed solenoid with high field uniformity.
  • Ensuring magnetic shielding of the cathode is a surface for zero canonical angular momentum.
  • Tuning the transition region at the field entrance to minimize envelope oscillations.

You can download the complete document and others from our technical library at http://www.fieldp.com. The direct link is http://www.fieldp.com/documents/egundesign.pdf

Converging beam electron gun design

Converging beam electron gun design

Calculating inductance from magnetic field solutions

We’re expanding our collection of tutorials illustrating finite-element simulation techniques. They address practical applications as well as benchmark comparisons with theory. You can browse the full set in our Technical Library at http://www.fieldp.com/library.html.

Finding inductance is one of the main uses of magnetic field software. We’ve just posted a tutorial that shows how to use PerMag to find the inductance/length of transmission lines. The report starts with the benchmark example of a coaxial transmission line in the low frequency limit. Here, the current is distributed uniformly over the conductors to minimize the resistance. Figure 1 shows the distribution of magnetic field. The example shows how to set up the solution and to determine the inductance from an integral of magnetic field energy. The next example is more familiar, a coaxial line in the high-frequency limit where fields are excluded from the conductors. This example illustrates two techniques: 1) representing field-excluding materials as surfaces of constant vector potential and 2) finding the total current carried by a field-excluding wire using an Ampere-law integral. Even with moderate-sized elements, the conformal mesh approach gives agreement with theoretical results to within a fraction of a percent. The method is easily applied to more practical applications such as non-circular conductors or a displaced center conductor.

Coaxial line, low frequency

Figure 1. Plot of |B| in a coaxial transmission line, low-frequency limit

A third example is a two-wire transmission line in free space in the high-frequency limit. It gives the opportunity to discuss how to approximate infinite space in a finite-element calculation. Again, the numerical results are in excellent agreement with theory. It is easy to extend the calculation to a practical application where the numerical approach has significant advantages. Figure 2 shows lines of magnetic flux density for a two-wire transmission line close to a conducting substrate. The presence of the metal sheet reduces the inductance/length of the line by 6%.

The full tutorial summarizes useful equations for inductance calculations. You can download the document at:

http://www.fieldp.com/documents/inductance_calculations.pdf

Two-wire line near a conductor

Figure 2. Lines of magnetic flux density for a two-wire transmission line near a conducting sheet.

Tutorials: pinched beams and EMP

We added seven new tutorials to our technical library:

1) Trak design of an electron injector for a coupled-cavity linear accelerator. Electron gun that maintains its focal properties over a broad range of current for high capture efficiency in an electron linac.

2) Calculating field stress on a high-voltage insulator with HiPhi. Determination of field stress over the bushing of a high voltage circuit breaker as a function of surrounding structures in a switchyard.

3) PerMag design of a focusing magnet for a hollow-beam klystron. Designing a high-uniformity solenoid magnet with minimum drive current.

4) Calibration of a beam probe with Magnum. Calculations for beam probe monitors for the DARHT II accelerator. Transmission line with an elliptical center conductor to investigate the feasibility of detecting non-circular beams.

5) Determining radiographic resolution with GamBet. Using a Monte Carlo code to determine detectability limits. The simulations determine the detector plane X-ray flux distributions for targets with very small cavities.

6) Simulating  a rod pinch diode for pulsed radiography with Trak and GamBet. Pulsed-power generators combined with rod-pinch electron diodes are often used to generate intense fluxes of X-rays from a small volume. One application is pulsed radiography of explosive events. Simulation of self-consistent electron and ion flow is a challenge to computer codes because particle motion is dominated by electric and magnetic forces generated by the beam. The tutorial gives a set-by-step description  of a Trak setup to model the diode and GamBet calculations to determine the X-ray flux dose at a target.

7) Simulation of a pulsed dipole radiator with Aether. Benchmark calculations of the radiation emitted when two high-voltage electrodes are short circuit through a spark. The example is a useful prototype for EMP studies. It also demonstrates how to initiate an RF solution from an electrostatic field distribution.