<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Field Precision software tips</title>
	<atom:link href="http://fieldp.com/myblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://fieldp.com/myblog</link>
	<description>Effective finite-element modeling of electromagnetic fields</description>
	<lastBuildDate>Thu, 26 Aug 2010 21:03:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Python versus Perl</title>
		<link>http://fieldp.com/myblog/2010/python-versus-perl/</link>
		<comments>http://fieldp.com/myblog/2010/python-versus-perl/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 20:56:55 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=733</guid>
		<description><![CDATA[<p>Our software is designed for integration into complex sequences controlled by external programs or scripts. This integration is facilitated by the following features:</p>

All our programs may be launched from the command prompt or may be called by other programs with pass parameters.
Although the user interfaces are largely interactive, our programs feature input buffered through text scripts. [...]]]></description>
			<content:encoded><![CDATA[<p>Our software is designed for integration into complex sequences controlled by external programs or scripts. This integration is facilitated by the following features:</p>
<ol>
<li>All our programs may be launched from the command prompt or may be called by other programs with pass parameters.</li>
<li>Although the user interfaces are largely interactive, our programs feature input buffered through text scripts. These scripts may be created or modified by external programs, giving wide latitude for passive or active control loops.</li>
</ol>
<p>Interpreter languages represent an efficient option for creating shells that call our programs and take care of global data organization. In previous posts (<a href="http://fieldp.com/myblog/2008/automatic-solution-control-with-perl/" target="_self">Automatic solution control with Perl</a> and <a href="http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/" target="_self">Making movies with the AMaze programs</a>) I discussed the Perl language and gave examples of its application. After recently comparing notes with my son, I feel that Perl may not be the best choice. We both had similar problems as occasional Perl user. Returning to the language always seemed like starting at square zero. Its syntax and control structures are arcane, and the documentation is spotty. Perl would appeal to a computer scientist because it is clever and succinct. On the other hand, succinctness can be a curse to applied scientists and engineers. I often found that I could not understand Perl codes that I had written a few months earlier. Minimalist syntax might be useful for writing Forth programs on a ZX81, but it makes no sense in an age of cut-and-paste editors and terabyte hard disks.</p>
<p>My son suggested Python as an alternative. Like Perl, Python is available at no charge for Windows, Linux and Apple computers. As a test, I decided to see how much effort it would take to duplicate the movie-making script described in a <a href="http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/" target="_blank">previous post</a>. The task proved to be relatively easy. I downloaded and installed the programs, read the introductory documentation and duplicated the function of the script in about 3 hours. Here is a link to down my resulting script (with a .txt suffix added to avoid download problems):</p>
<p><a href="http://www.fieldp.com/myblog/examples/make_movie.pyw.txt" target="_blank">Phython example</a></p>
<p>These are the critical lines for launching our software from Python:</p>
<pre>import subprocess
ProgName = "phiview"
ScriptPrefix = "pvscript"
...
Command = ProgName + " " + ScriptPrefix
subprocess.Popen(Command).wait()</pre>
<p>They create the command line string &#8220;phiview pvscript&#8221; and then call the program as a subtask. The .wait() directive ensures that only one instance of phiview.exe runs at a time. In less than a minute, the script generates 100 graphics files showing the electrostatic potential distribution at different positions in the solution space.</p>
<p>In comparison to Perl, I feel that Python is the better choice for the occasional user working on applied problems for the following reasons:</p>
<ul>
<li>Python syntax has more intuitive appeal. Special characters to denote data types (&#8220;$&#8221;, &#8220;&amp;&#8221;, &#8220;@&#8221;,&#8230;.) are not required. It is unnecessary to put a vestigial semicolon at the end of each line, a frequent source of error. I like the idea of defining control loops by indentation since it closely matches my style of programing in FORTRAN.</li>
<li>Python scripts may be run from an interpreter window. In this case, the script should have a name of the form fprefix.py. You can open the script with a built-in editor with syntax highlighting. A script is built by adding material and making changes in the editor and pressing F5 at any time to check the operation. Printed results and error messages appear in the interpreter window and the error position is marked in the editor. This simple arrangement is quite effective for building and debugging programs. When the script is complete, you simply rename it as fprefix.pyw. Then it can be run as a background task without opening a window.</li>
<li>Python has a comprehensive and well-organized help system that can be called directly from the interpreter. This makes it easy to find the structure of a control sequence, and easy to look it up again when you have forgotten it. In contrast, I had to buy two tomes from OReilly to get started with Perl. Long searches through the books were necessary each time I returned to the language.</li>
</ul>
<p>You can get Python for Windows at <a href="http://python.org/download/" target="_blank">http://python.org/download/</a>. There is a question of whether to download Python 2.7 or 3.1.2. The latter is the development version with advanced features, The 2.7 version is still active and is compatible with many current resources available on the Internet. Considering that 2.7 has far more features than I would ever use, I decided to be conservative and use it. Installation is largely automatic. There are two operations you may need to do by hand:</p>
<ul>
<li>Add a desktop icon to run the interpreter (c:\python27\pythonw.exe).</li>
<li>Add c:\python27 to your path. In XP, run the <em>Control Panel</em>. Run <em>System </em>and click on the <em>Advanced </em>tab. Click on <em>Environmental variables</em>, highlight the <em>PATH </em>variable and click on <em>EDIT</em>. Go to the end of the long string and add &#8220;;C:\PYTHON27&#8243; (be sure to include the semicolon). Exit by clicking OKs. The modified path variable will not take effect until the next time you log in. It&#8217;s not necessary to restart the computer. Just <em>Log Off</em> the current user and log in again.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/python-versus-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improved 3D plotting</title>
		<link>http://fieldp.com/myblog/2010/improved-3d-plotting/</link>
		<comments>http://fieldp.com/myblog/2010/improved-3d-plotting/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 22:11:25 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=725</guid>
		<description><![CDATA[<p>The generation of attractive and accurate three-dimensional views of meshes, particle orbits and calculated quantities was a challenge in creating 3D finite-element programs in our AMaze series. The standard approach to 3D graphics is to use a library like OpenGL where surfaces are approximated with the the minimum number of facets that provide a psychologically-satisfying sense [...]]]></description>
			<content:encoded><![CDATA[<p>The generation of attractive and accurate three-dimensional views of meshes, particle orbits and calculated quantities was a challenge in creating 3D finite-element programs in our <strong>AMaze </strong>series. The standard approach to 3D graphics is to use a library like OpenGL where surfaces are approximated with the the minimum number of facets that provide a psychologically-satisfying sense of objects. This is the approach we used for the 3D modeling environment of the <strong>Geometer</strong> program. With a limited number of facets, the regeneration time is short enough for real-time animation effects.</p>
<p>In contrast, averaging techniques are not suitable for mesh and orbit plots in <strong>MetaMesh </strong>and the <strong>AMaze </strong>postprocessors. Generally users expect an exact representation of the physical system. It&#8217;s risky to allow the program to make decisions about discarding information. Therefore, we designed the programs to faithfully display all facets on region borders and all segments of charged particle orbits. The amount of information to define a surface may be 1-2 orders of magnitude larger than a typical OpenGL model. The  challenge is to produce effective 3D displays (with hidden surfaces and lighting effects) in a perceptually short time. In other words, graph regeneration of huge meshes should be a relatively painless experience for the user.</p>
<p>Over the years, we have steadily improved the appearance and operation of 3D technical plots in our programs. This month, we introduced bitmap transfer techniques that give a significant increase in speed. At the same time, the procedure ensures correct operation with Windows 7, even with advanced graphics themes. The picture shows the current 3D plot environment in <strong>MetaMesh</strong>. The mesh for the planar electron-beam gun includes 11 million elements.</p>
<div class="wp-caption aligncenter" style="width: 610px"><img title="MetaMesh screen: surface plot menu" src="http://www.fieldp.com/myblog/images/3dplotdemo.png" alt="MetaMesh screen: surface plot menu" width="600" height="445" /><p class="wp-caption-text">MetaMesh screen: surface plot menu</p></div>
<p>♦ The user can move toward or away from the assembly (zoom and expand), walk around it toward the sides, top and bottom (rotations) or shift the view sidways or up-and-down (translations). The operations are controlled by the mouse with an active cursor (not shown in the picture) that changes shape according to the function. Individual regions may be displayed or hidden, and cutplanes may be added to view inside the assembly.</p>
<p>♦ Mouse actions are reflected in the animated orientation display at the top-right. To save time, the main plot is regenerated only when the mouse button is released. After a delay, the new view flashes to the screen. For standard meshes (~1 million elements), the regeneration delay is almost imperceptible. Depending on the number of regions displayed, the delay for huge meshes may be a second or two.</p>
<p>♦ The introduction of <a href="http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/" target="_blank">saved view parameter files</a> further reduces time and effort with huge meshes. The user can restore a 3D view immediately, without repeating the operations necessary to construct it.</p>
<p>Saved views and the other 3D plot features will be included in the October update of the <strong>AMaze</strong> programs.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/improved-3d-plotting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making movies with the AMaze programs</title>
		<link>http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/</link>
		<comments>http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 00:10:40 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=714</guid>
		<description><![CDATA[<p>A previous post described new graphics features planned for the AMaze series of programs. They will be included with the October 1 update. The motivation is the creation of animations (movies in AVI format). We are adding expanded capabilities to the initial-value solution programs and postprocessors to generate sequences of BMP plot files, either autonomously or [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://fieldp.com/myblog/2010/advanced-3d-graphics-and-movie-capabilities/" target="_blank">previous post</a> described new graphics features planned for the <strong>AMaze </strong>series of programs. They will be included with the October 1 update. The motivation is the creation of animations (movies in AVI format). We are adding expanded capabilities to the initial-value solution programs and postprocessors to generate sequences of BMP plot files, either autonomously or under direct user control. Several types of animations are possible with the finite-element solutions:</p>
<ol>
<li>Showing the time evolution of calculated quantities in <strong>HeatWave </strong>(dynamic mode) and <strong>Aether</strong> (pulse mode).</li>
<li>Generating a large set of solutions under script control to show the effect of parametric variations, either in geometry or material properties.</li>
<li>Illustrating the three dimensional nature of a solution by a set of slice plots (walking through the solution space along an axis).</li>
<li>Moving around a three-dimensional space to show complex objects.</li>
<li>Following a slice in a 3D view of a solution space to show the variation of calculated quantities.</li>
</ol>
<p>There are many other possibilities, giving free reign to the user&#8217;s imagination.</p>
<div class="wp-caption alignleft" style="width: 337px"><img title="New dialog to initiate plot files" src="http://www.fieldp.com/myblog/images/plot_file_dialog.png" alt="New dialog to initiate plot files" width="327" height="327" /><p class="wp-caption-text">New dialog to initiate plot files</p></div>
<p>This post describes some recent, related developments. To begin, we have improved commands to generate graphics files of currently-displayed plots in the interactive environments of the <strong>AMaze </strong>postprocessors. The <em>PLOTFILE </em>command (which may be invoked from the <em>PLANEPLOT</em>, <em>SLICEPLOT </em>and <em>SURFACEPLOT </em>menus) brings up the dialog shown in the picture. The user supplies a unique file prefix and chooses the output format. The default <em>BMP </em>format is preferred because there is no loss of information and files may be incorporated directly into animations. The dialog gives common choices of image size. The user may also set a custom size by specifying the pixel dimensions. Depending on the resolution, the resulting image files may have considerably better quality than the screen display. Here is an example at 640×480 resolution:</p>
<div class="wp-caption aligncenter" style="width: 615px"><img title="Illustration created with the PLOTFILE command" src="http://www.fieldp.com/myblog/images/plot_file_demo.png" alt="Illustration created with the PLOTFILE command" width="605" height="465" /><p class="wp-caption-text">Illustration created with the PLOTFILE command</p></div>
<p>A second development enables automatic generation of images under script control. As discussed in the <a href="http://fieldp.com/myblog/2010/advanced-3d-graphics-and-movie-capabilities/" target="_blank">previous post</a>, we have added a new command to analysis scripts for <strong>AMaze </strong>postprocessors:</p>
<pre>INPUT TARGET.HOU
PLOT PlotTest TargetPlot 1024 768
INPUT WALKTHRU.HOU
PLOT PlotTest WalkThruPlot 1024 768
ENDFILE</pre>
<p>The first command loads the solution file <em>TARGET.HOU</em>. The second command creates a plot file <em>TARGETPLOT.BMP</em> with pixel dimensions 1024×768. The plot parameters are defined by the saved view <em>PLOTTEST.FPV</em>. The features of saved views in <strong>MetaMesh </strong>and the <strong>AMaze</strong> postprocessors were described in a <a href="http://fieldp.com/myblog/2010/saved-views-in-metamesh-and-the-amaze-postprocessors/" target="_blank">recent post</a>.</p>
<p>With the <em>PLOT</em> command, it is relatively easy to generate movies automatically. To illustrate, I wrote a Perl template to create the fifth type of animation listed above, a moving slice display of a electrostatic potential in a 3D solution space. Here is a link to the script: <a href="http://www.fieldp.com/myblog/examples/make_movie.pl.txt" target="_self">make_movie.pl.txt</a>. The <em>txt </em>suffix was added to avoid download problems.</p>
<p>I built a sample movie from a <strong>HiPhi </strong>electrostatic solution with the following steps:</p>
<ol>
<li>Load the solution file in <strong>PhiView </strong>and experiment to define a good three-dimensional surface plot.</li>
<li>Save the view as <em>TEMPLATE.FPV</em>. With an editor, change the numerical value of <em>SurfacePlanePos </em>to the marker &#8220;@&#8221;.</li>
<li>Run <em>movie_maker.pl</em> to create 100 sequential BMP files. The Perl script walks along the <em>z</em> axis of the solution space, modifies the value of <em>SurfacePlanePos </em>in a temporary view file <em>TEMP.FPV</em>, writes a script that includes the <em>PLOT </em>command with the current BMP file name, and executes <strong>PhiView</strong>.</li>
<li>Use <strong>CECIL_B</strong> to assemble the BMP files into an animation at 25 frames/second.</li>
</ol>
<p>The whole process took a couple minutes. Here&#8217;s the finished product (I added the title and transition with Camtasia):</p>
<p><object id="scPlayer" class="embeddedObject" width="640" height="498" type="application/x-shockwave-flash" data="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/amaze_movie_demo_controller.swf" ><param name="movie" value="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/amaze_movie_demo_controller.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="containerwidth=640&#038;containerheight=498&#038;showstartscreen=true&#038;showendscreen=true&#038;loop=false&#038;autostart=false&#038;color=000000,000000&#038;thumbscale=45&#038;content=http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/AMaze_Movie_Demo.mp4&#038;blurover=false" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/" /><video width="640" height="498" controls="controls"><br />  <source src="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/AMaze_Movie_Demo.mp4" type="video/mp4;" /><br />  <b>Your browser cannot play this video. <a href="http://www.screencast.com/handlers/redirect.ashx?target=viewingembededhelp">Learn how to fix this</a>.</b> </video> </object></p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/making-movies-with-the-amaze-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/99bab849-50f7-40d5-aa29-71d199610654/AMaze_Movie_Demo.mp4&amp;blurover=false" length="621979" type="video/mp4" />
		</item>
		<item>
		<title>Case study of a high-current electron beam system</title>
		<link>http://fieldp.com/myblog/2010/case-study-of-a-high-current-electron-beam-system/</link>
		<comments>http://fieldp.com/myblog/2010/case-study-of-a-high-current-electron-beam-system/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 16:09:58 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=685</guid>
		<description><![CDATA[<p>Three new tutorials are available in the technical library that describe design studies for a hollow-beam, high-power klystron. The documents include material of general interest to anyone interested in high-current electron beam technology.</p>
<p>In the case study, an annular electron beam with kinetic energy 100 keV and power 20 MW power is generated from an immersed cathode [...]]]></description>
			<content:encoded><![CDATA[<p>Three new tutorials are available in the technical library that describe design studies for a hollow-beam, high-power klystron. The documents include material of general interest to anyone interested in high-current electron beam technology.</p>
<p>In the case study, an annular electron beam with kinetic energy 100 keV and power 20 MW power is generated from an immersed cathode in a solenoid field of amplitude 0.1 tesla. The motivation for a hollow beam is to reduce the space-charge potential for a given current, and hence to minimize the longitudinal energy spread. The reduced-energy beam leaving the klystron is captured in a biased collector to recover power.</p>
<p>The following three documents are available in our technical library:</p>
<p><a href="http://www.fieldp.com/documents/hollow_beam_gun.pdf" target="_blank"><strong>Electron gun design for a hollow-beam klystron using Trak</strong></a><br />
<a href="http://www.fieldp.com/documents/klystron_magnet.pdf" target="_blank"><strong>PerMag design of a focusing magnet for a hollow-beam klystron</strong></a><br />
<a href="http://www.fieldp.com/documents/klystron_collector.pdf" target="_blank"><strong>Trak design of a single-stage collector for a hollow-beam klystron</strong></a></p>
<p>Some of the technical issues discussed:</p>
<ul>
<li>Design of a hollow-beam gun with no internal anode structure to generate the required current at the operating voltage. Two goals are to minimize 1) the electric field stress on the surface of the focusing electrode and 2) the transverse spread energy of the extracted beam.</li>
<li>Requirements on magnetic field uniformity for transporting a hollow beam. Determining coil currents in a finite-length solenoid to maximize the field uniformity and the length of the good-field region. Discussion of the role of shielding iron to improve uniformity and to minimize the drive current.</li>
<li>Review of the energetics of biased collectors in electron beam systems for microwave generation. Concepts for electrostatic collectors in a region of expanding magnetic field. Determining energy efficiency and properties of reflected electrons.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 560px"><img title="Annular-beam electron run, r-z plot" src="http://www.fieldp.com/myblog/images/hollow_beam_gun.png" alt="Annular-beam electron run, r-z plot" width="550" height="386" /><p class="wp-caption-text">Annular-beam electron run, r-z plot</p></div>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/case-study-of-a-high-current-electron-beam-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saved Views in MetaMesh and the AMaze postprocessors</title>
		<link>http://fieldp.com/myblog/2010/saved-views-in-metamesh-and-the-amaze-postprocessors/</link>
		<comments>http://fieldp.com/myblog/2010/saved-views-in-metamesh-and-the-amaze-postprocessors/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 14:39:41 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=671</guid>
		<description><![CDATA[<p>Plotting is critical to understand meshes and field solutions in three-dimensional spaces. In consequence, we have included a wide variety of options for creating plots in MetaMesh and the analysis programs PhiView, MagView, HWV, RFE3View and Aerial. For example, the following information is neede to create a 3D view of a mesh:</p>

Parameters of the point of [...]]]></description>
			<content:encoded><![CDATA[<p>Plotting is critical to understand meshes and field solutions in three-dimensional spaces. In consequence, we have included a wide variety of options for creating plots in <strong>MetaMesh </strong>and the analysis programs <strong>PhiView</strong>, <strong>MagView</strong>, <strong>HWV</strong>, <strong>RFE3View </strong>and <strong>Aerial</strong>. For example, the following information is neede to create a 3D view of a mesh:</p>
<ul>
<li>Parameters of the point of view, such as the origin of the view axes, the position of the viewpoint in rotational space and the distance from the assembly. These quantities affect the centering of objects, visible surfaces and the perspective.</li>
<li>Choice of regions or parts to display.</li>
<li>Cut planes to reveal inner details.</li>
<li>Reference axes with automatic or user-specified grids and ticks.</li>
</ul>
<p>Users can expend significant effort to create an optimal display. Therefore, the ability to record to to restore one of more specific views of an assembly saves time and provides documentation.</p>
<div class="wp-caption aligncenter" style="width: 610px"><img title="Tools for saved views, AMaze programs" src="http://www.fieldp.com/myblog/images/viewfile.png" alt="Tools for saved views, AMaze programs" width="600" height="493" /><p class="wp-caption-text">Tools for saved views, AMaze programs</p></div>
<p>We have added saved views to <strong>MetaMesh </strong>and other <strong>AMaze </strong>plotting programs. The picture shows new tools that appear in all plotting menus. They function for both 3D plots (as shown) or 2D slice plots. The <em>Save view</em> command generates a formatted text file <em>FPrefix.FPV</em> where <em>FPrefix</em> is a descriptive name. The file contains the complete set of plotting parameters. This excerpt illustrates the format:</p>
<pre>Program: MetaMesh
2D/3D: 2D
DisplayBy: Regions
Outline: On
NSlice:     40
SliceAxis: YAxis
PlotType: LogElemUp
XPMin: -1.500000E+00
XPMax:  4.250000E+00
...</pre>
<p>The ability to restore an exact plot when a specific solution has been loaded is useful but not particularly original or interesting. Saved views in the <strong>AMaze </strong>programs transcend the standard in two ways:</p>
<ul>
<li>Dynamic adaptation to different solutions.</li>
<li>Option for user control of the view parameter set.</li>
</ul>
<p>Regarding the first feature, there are situations where the user wants to create consistent views of a set of solutions with different geometries, maintaining a similar appearance. Some plot properties (like the viewpoint rotation matrix) are applicable to any solution, but others (like region cutplanes or slice plot limits) depend on the geometry. In <strong>AMaze</strong>, the load process is adaptive. The programs check each plot parameter for validity. If a parameter is outside the allowed range for the currently-loaded solution, the program computes an alternative. The goal is to preserve as many features of the view as possible.</p>
<p>The second unique feature is that users can modify view files. The order of entries is not rigid. On input, the program uses a free-form parser. If a parameter is missing, the program simply makes no change from the current value in the program. The implication is that a user can edit a view to include only elements essential to his application. For example, one could compare a series of assemblies with different sizes, maintaining an orthographic 3D view from the same point in Cartesian space. In this case, the view file would contain only the entries:</p>
<pre>DView:  1.000000E+37
R11:  8.660253E-01
R12: -5.000002E-01
R13:  0.000000E+00
R21:  1.669031E-01
R22:  2.890846E-01
R23:  9.426408E-01
R31: -4.713208E-01
R32: -8.163510E-01
R33:  3.338061E-01</pre>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/saved-views-in-metamesh-and-the-amaze-postprocessors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced 3D graphics and movie capabilities</title>
		<link>http://fieldp.com/myblog/2010/advanced-3d-graphics-and-movie-capabilities/</link>
		<comments>http://fieldp.com/myblog/2010/advanced-3d-graphics-and-movie-capabilities/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 21:18:23 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=658</guid>
		<description><![CDATA[<p>We&#8217;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:</p>
<p>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 [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re making some major advances in the graphics capabilities of programs in the 3D <strong>AMaze</strong> series. We expect to release updates in the early Fall.  The improvements lie in three areas:</p>
<p><strong>Saved views</strong><br />
It takes effort and experimentation to set up optimal 2D or 3D views in postprocessors like <strong>PhiView </strong>and <strong>MagView</strong>. 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.</p>
<p><strong>Automatic solution plotting</strong><br />
We are adding the option to save snapshots of solutions at specified times in the initial-value programs <strong>HeatWave (</strong>dynamic mode) and <strong>Aether </strong>(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 <em>Diagnostics </em>section of the control script.</p>
<pre>LOADVIEW ViewName
DTIMEPLOT dTime
SETTIMEPLOT TRecord</pre>
<p>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 <em>DTimePlot</em> command specifies a uniform time interval for creating plot files. It can be supplemented with the <em>SetTimePlot </em>command to make pictures at critical times.</p>
<p><strong>Analysis script commands for plotting</strong><br />
In previous program versions, scripts to control postprocessor analysis operations were limited to generating quantitative data.  We will add following command for plotting:</p>
<pre>PLOT ViewName PlotName NH NV</pre>
<p>The postprocessor automatically writes the file plotname.bmp  in BMP format with pixel dimensions <em>NH</em> × <em>NV</em>. 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.</p>
<p>The end result is that the <strong>AMaze </strong>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!</p>
<p>As is often the case, the best solution was to create our own program. The sole function of <strong>CECIL_B </strong>is to convert large sets of BMP files to AVI movies. Besides being free, the program has several advantages:</p>
<ul>
<li>It is well organized and easy to learn. If you have the BMP files, I guarantee you can start making movies in 5 minutes.</li>
<li>A setup takes just a few seconds, even with thousands of input files.</li>
<li>It is easy to change codecs to optimize picture quality and compression.</li>
</ul>
<p>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.</p>
<div class="wp-caption alignleft" style="width: 314px"><img title="CECIL_B screenshot" src="http://www.fieldp.com/myblog/images/cecil.png" alt="" width="304" height="349" /><p class="wp-caption-text">CECIL_B screenshot</p></div>
<p>Everyone is welcome to download <strong>CECIL_B</strong>. 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&#8217;s a link to the <a href="http://www.fieldp.com/cecil_b.html" target="_blank">download site</a>. We have tested the program thoroughly, but software can be surprising. Please let us know if you encounter any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/advanced-3d-graphics-and-movie-capabilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expanded plot features in MagWinder</title>
		<link>http://fieldp.com/myblog/2010/expanded-plot-features-in-magwinder/</link>
		<comments>http://fieldp.com/myblog/2010/expanded-plot-features-in-magwinder/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 18:46:10 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=648</guid>
		<description><![CDATA[<p>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 [...]]]></description>
			<content:encoded><![CDATA[<p>One of the major task in simulating three-dimensional electromagnets is the definition of complex drive coils. The utility <strong>MagWinder </strong>is part of the <strong>Magnum </strong>program suite. Drive circuits are represented in <strong>Magnum </strong>by dividing them into a large set of short segments (or<em> current elements</em>). <strong>MagWinder </strong>provides an interactive environment where users can build magnet windings step-by-step. Several features of <strong>MagWinder </strong>help in the task of current-element generation:</p>
<ul>
<li>A comprehensive set of parametric models for common coil configurations (solenoids, helices,&#8230;).</li>
<li>Interactive dialogs to modify the geometry, position and orientation of components.</li>
<li>Versatile graphical displays to show the state of the assembly.</li>
</ul>
<p>Although the previous version of <strong>Magwinder </strong>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,&#8230;). Such a display would allow users to confirm the size, orientation and placement of coil assemblies.</p>
<p>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):</p>
<ul>
<li>Load a mesh definition file (MDF) created by <strong>MetaMesh</strong></li>
<li>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.</li>
<li>Set clipping planes for region facets</li>
<li>Close the mesh file to display only the coils.</li>
</ul>
<p>The interactive environment features the standard set of <strong>AMaze </strong>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.</p>
<div class="wp-caption aligncenter" style="width: 610px"><img title="MagWinder working environment" src="http://www.fieldp.com/myblog/images/magwinder.png" alt="MagWinder working environment" width="600" height="489" /><p class="wp-caption-text">MagWinder working environment</p></div>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/expanded-plot-features-in-magwinder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: electron gun design with Trak</title>
		<link>http://fieldp.com/myblog/2010/tutorial-electron-gun-design-with-trak/</link>
		<comments>http://fieldp.com/myblog/2010/tutorial-electron-gun-design-with-trak/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 14:51:10 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=639</guid>
		<description><![CDATA[<p>Vacuum electronic devices for microwave generation (e.g., klystron, traveling wave tube,&#8230;) 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 [...]]]></description>
			<content:encoded><![CDATA[<p>Vacuum electronic devices for microwave generation (<em>e.g.</em>, klystron, traveling wave tube,&#8230;) 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.</p>
<p>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:</p>
<ul>
<li>Estimating gun parameters from analytic expressions for beam compression.</li>
<li>Determining electrode geometries to generate a converging beam with minimal emittance.</li>
<li>Representing effects of the gap between the cathode and focusing electrode.</li>
<li>Mapping electric field stress.</li>
<li>Designing a pulsed solenoid with high field uniformity.</li>
<li>Ensuring magnetic shielding of the cathode is a surface for zero canonical angular momentum.</li>
<li>Tuning the transition region at the field entrance to minimize envelope oscillations.</li>
</ul>
<p>You can download the complete document and others from our technical library at <a href="http://www.fieldp.com" target="_blank">http://www.fieldp.com</a>. The direct link is <a href="http://www.fieldp.com/documents/egundesign.pdf" target="_blank">http://www.fieldp.com/documents/egundesign.pdf</a></p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Converging beam electron gun design" src="http://www.fieldp.com/myblog/images/converge_gun.png" alt="Converging beam electron gun design" width="500" height="472" /><p class="wp-caption-text">Converging beam electron gun design</p></div>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/tutorial-electron-gun-design-with-trak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating inductance from magnetic field solutions</title>
		<link>http://fieldp.com/myblog/2010/calculating-inductance-from-magnetic-field-solutions/</link>
		<comments>http://fieldp.com/myblog/2010/calculating-inductance-from-magnetic-field-solutions/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 17:05:33 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=631</guid>
		<description><![CDATA[<p>We&#8217;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.</p>
<p>Finding inductance is one of the main uses of magnetic field software. We&#8217;ve just posted a tutorial that shows how to use PerMag to [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;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 <a href="http://www.fieldp.com/library.html" target="_blank">http://www.fieldp.com/library.html</a>.</p>
<p>Finding inductance is one of the main uses of magnetic field software. We&#8217;ve just posted a tutorial that shows how to use <strong>PerMag </strong>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.</p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Coaxial line, low frequency" src="http://www.fieldp.com/myblog/images/inductance01.png" alt="Coaxial line, low frequency" width="500" height="375" /><p class="wp-caption-text">Figure 1. Plot of |B| in a coaxial transmission line, low-frequency limit</p></div>
<p>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%.</p>
<p>The full tutorial summarizes useful equations for inductance calculations. You can download the document at:</p>
<p><a href="http://www.fieldp.com/documents/inductance_calculations.pdf" target="_blank">http://www.fieldp.com/documents/inductance_calculations.pdf</a></p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Two-wire line near a conductor" src="http://www.fieldp.com/myblog/images/inductance02.png" alt="Two-wire line near a conductor" width="500" height="488" /><p class="wp-caption-text">Figure 2. Lines of magnetic flux density for a two-wire transmission line near a conducting sheet.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/calculating-inductance-from-magnetic-field-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorials: beam probe calibration, radiographic resolution, pinched beams and EMP</title>
		<link>http://fieldp.com/myblog/2010/tutorials-beam-probe-calibration-radiographic-resolution-pinched-beams-and-emp/</link>
		<comments>http://fieldp.com/myblog/2010/tutorials-beam-probe-calibration-radiographic-resolution-pinched-beams-and-emp/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 19:45:32 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=602</guid>
		<description><![CDATA[<p>We added seven new tutorials to our technical library:</p>
<p>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.</p>
<p>2) Calculating field stress on a high-voltage insulator with HiPhi. Determination of field stress over the [...]]]></description>
			<content:encoded><![CDATA[<p>We added seven new tutorials to our technical library:</p>
<p>1) <em><a href="http://www.fieldp.com/documents/ccl_injector.pdf" target="_blank"><strong>Trak</strong> design of an electron injector for a coupled-cavity linear accelerator</a></em>. Electron gun that maintains its focal properties over a broad range of current for high capture efficiency in an electron linac.</p>
<p>2) <em><a href="http://www.fieldp.com/documents/hv_insulator.pdf" target="_blank">Calculating field stress on a high-voltage insulator with <strong>HiPhi</strong></a></em>. Determination of field stress over the bushing of a high voltage circuit breaker as a function of surrounding structures in a switchyard.</p>
<p>3) <em><a href="http://www.fieldp.com/documents/klystron_magnet.pdf" target="_blank"><strong>PerMag</strong> design of a focusing magnet for a hollow-beam klystron</a></em>. Designing a high-uniformity solenoid magnet with minimum drive current.</p>
<p>4) <em><a href="http://www.fieldp.com/documents/beamprobecalibration.pdf" target="_blank">Calibration of a beam probe with <strong>Magnum</strong></a></em>. 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.</p>
<p>5) <em><a href="http://www.fieldp.com/documents/radiographresolution.pdf" target="_blank">Determining radiographic resolution with <strong>GamBet</strong></a></em>. 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.</p>
<p>6) <em><a href="http://www.fieldp.com/documents/rodpinch_benchmark.pdf" target="_self">Simulating  a rod pinch diode for pulsed radiography with <strong>Trak</strong> and <strong>GamBet</strong></a>.</em> 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 <strong>Trak </strong>setup to model the diode and <strong>GamBet </strong>calculations to determine the X-ray flux dose at a target.</p>
<p>7) <a href="http://www.fieldp.com/documents/dipole_radiator.pdf" target="_blank"><em>Simulation of a pulsed dipole radiator with <strong>Aether</strong></em></a>. 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.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2010/tutorials-beam-probe-calibration-radiographic-resolution-pinched-beams-and-emp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
