<?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 &#187; NewFeatures</title>
	<atom:link href="http://fieldp.com/myblog/category/newfeatures/feed/" rel="self" type="application/rss+xml" />
	<link>http://fieldp.com/myblog</link>
	<description>Effective finite-element modeling of electromagnetic fields</description>
	<lastBuildDate>Thu, 17 May 2012 12:45:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Coil force integrals in Magnum</title>
		<link>http://fieldp.com/myblog/2012/coil-force-integrals-in-magnum/</link>
		<comments>http://fieldp.com/myblog/2012/coil-force-integrals-in-magnum/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 20:39:18 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1312</guid>
		<description><![CDATA[<p>The magnetic force on a vector current element dl carrying current I in a magnetic field with flux density B is</p>
<p>dF = I dl × B    (1)</p>
<p>In Magnum applied currents are represented by a collection of filamentary elements, so you might think that it would be straightforward to implement automatic routines to find forces on drive coils. [...]]]></description>
			<content:encoded><![CDATA[<p>The magnetic force on a vector current element <strong>dl</strong> carrying current <em>I</em> in a magnetic field with flux density <strong>B</strong> is</p>
<p><strong>dF</strong> = <em>I</em> <strong>dl</strong> × <strong>B</strong>    (1)</p>
<p>In <strong>Magnum</strong> applied currents are represented by a collection of filamentary elements, so you might think that it would be straightforward to implement automatic routines to find forces on drive coils. The problem is one of accuracy when the drive coils are the primary source of the field. The field varies rapidly around the filamentary elements so a simple integral using Eq. 1 may give misleading values.</p>
<p>On the other hand, there are situations where such an integral would be very useful. I recently had a consulting project where a strong permanent-magnet assembly exerts a force on a current loop. The loop carries less than an ampere and makes only a small contribution to the field. Accordingly, I recently added a routine for automatic coil-force integrals to <strong>MagView</strong>. The new command <em>Coil force</em> is in the <em>File operations</em> menu. Here&#8217;s how it works:</p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Magnet assembly with diagnostic coil paths" src="http://www.fieldp.com/myblog/images/coil_force.png" alt="Magnet assembly with diagnostic coil paths" width="500" height="424" /><p class="wp-caption-text">Figure 1. Magnet assembly with diagnostic coil paths</p></div>
<p>1) Suppose you have a solution for a permanent-magnet assembly or an electromagnet and want to find the force on a coil inserted in the magnet volume. Load the solution into <strong>MagView</strong> with the <em>File operations/Load solution file</em> command.</p>
<p>2) Use <strong>Magwinder</strong> to define the sensor coil. It may be a simple rectangle (as in Fig. 1) or multi-turn shape of any complexity like a <a title="Create a coil box with Magwinder" href="http://fieldp.com/myblog/2012/creating-a-coil-box-with-magwinder/" target="_blank">coil box</a>. Assign a coil current of 1.0 A.</p>
<p>3) If you want to check the force at multiple positions, define multiple <em>Coils</em> in the <em>CDF</em> file with different values for the <em>Shift</em> and <em>Rotate</em> operations, as in Fig. 1.</p>
<p>4) Export an element file (<em>WND</em>).</p>
<p>5) Load the element file into <strong>MagView</strong> with the <em>File operations/Load coils command</em>.</p>
<p>6) Click on the <em>Coil force</em> command (note that the command functions only when both a solution and coil file have been loaded). The command shows a dialog with force components for each coil in the <em>WND</em> file and also write values to a data file if one is open. Here is an example listing:</p>
<pre>--- Coil forces  ---
 NCoil         Fx          Fy         Fz
 ===========================================
 1   9.4794E-03   1.2813E-09  -3.9264E-06
 2   8.9958E-03  -2.5137E-04   9.6336E-07
 3   8.9808E-03   3.3423E-04  -2.9572E-06</pre>
<p>If the diagnostic coils carry 1.0 A, the units of force are newtons/A.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2012/coil-force-integrals-in-magnum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GamBet computing power unleashed</title>
		<link>http://fieldp.com/myblog/2012/gambet-computing-power-unleashed/</link>
		<comments>http://fieldp.com/myblog/2012/gambet-computing-power-unleashed/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 21:15:18 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1270</guid>
		<description><![CDATA[<p>GamBet, our Monte Carlo code for X-ray science and technology, has always been ahead of competitors with regard to special features (I&#8217;ll mention some later). In the past other packages may have had more raw computing power. We advanced the number-crunching capability of GamBet last year when we introduced parallel processing (http://fieldp.com/myblog/2011/multicore-gambet/). With this feature, GamBet [...]]]></description>
			<content:encoded><![CDATA[<p><strong>GamBet</strong>, our Monte Carlo code for X-ray science and technology, has always been ahead of competitors with regard to special features (I&#8217;ll mention some later). In the past other packages may have had more raw computing power. We advanced the number-crunching capability of <strong>GamBet </strong>last year when we introduced parallel processing (<a href="http://fieldp.com/myblog/2011/multicore-gambet/" target="_blank">http://fieldp.com/myblog/2011/multicore-gambet/</a>). With this feature, <strong>GamBet </strong>runs could utilize the full power of a single, multi-core machine.</p>
<p>We&#8217;ve taken another step forward to make <strong>GamBet </strong>the best program for power users. We now support <em>distributed computing</em>. Runs may be divided between an unlimited number of machines. Here&#8217;s how it works:</p>
<ol>
<li>The new <strong>GamBet Distributed-computing Extension</strong> (GDE) is an add-on package for <strong>GamBet </strong>or <strong>Xenos </strong>Pro. The package includes two programs, <strong>GB_SOW</strong> and <strong>GB_REAP</strong>.</li>
<li><strong>GB_SOW</strong> includes all technical features of <strong>GamBet</strong>. The program may be installed on any number of computers without a license requirement. <strong>GB_REAP</strong> is installed on a master computer with a <strong>GamBet </strong>license.</li>
<li>The user sets up and tests a <strong>GamBet </strong>run using the standard programs. Then, the required input files (<strong>GamBet </strong>control script, mesh definition, electric or magnetic field files,&#8230;) are sent to the worker computers.</li>
<li><strong>GB_SOW</strong> is launched on each worker computer, either from a window or from the command line. Multiple instances of <strong>GB_SOW</strong> may run on multiprocessor machines.</li>
<li>The <strong>GB_SOW</strong> run produces a single binary file with a unique identifying name that contains all information from the <strong>GamBet</strong> calculation (escape particles, dose, statistics,&#8230;). The user moves output files from the worker computers to a data folder on the master computer.</li>
<li><strong>GB_REAP</strong> identifies all binary input files in the specified directory and combines them to produce <strong>GamBet </strong>output files in standard format. These files may be analyzed with <strong>GBView2</strong>, <strong>GBView3 </strong>or <strong>GenDist</strong>. Escape particles are combined in a single escape file with appropriate weightings. Statistical and dose information is averaged.</li>
</ol>
<p>In the procedure, the user&#8217;s only role is to transfer files to and from the worker computers. This leaves complete flexibility for configuring the distributed network and automating file transfers. Despite its simplicity, the <strong>GDE</strong> concept has several advantages:</p>
<ul>
<li>Calculations are independent and need not be synchronized.</li>
<li>There is no overhead for parallel processing. Five quad-core computers can reduce the time to generate a required number of showers by a factor of 20.</li>
<li>If one machine fails during the computation, data from the other computers is still valid and useful.</li>
<li>It is easy to improve the accuracy of a calculation by adding more showers without starting from scratch. The user simply creates more worker-computer files. They are added to the master folder and the total collection is recombined with <strong>GB_REAP</strong>.</li>
<li>Communication between computers is solely through file transfers. Therefore, it is easy to carry out extended calculations at any locations via a company network or the Internet.</li>
</ul>
<p>While we&#8217;re on the topic of <strong>GamBet</strong>, it&#8217;s useful to review some other features that differentiate it from other Monte Carlo codes:</p>
<ul>
<li>2D and 3D geometries are defined with powerful finite-element mesh generators rather than idiosyncratic solid-modeling algorithms. Advantages include the direct input of complex shapes from  <strong>SolidWorks</strong>, <strong>ProE </strong>and other packages as well as extensive visualization options. The conformal meshes provide close fits to material surfaces.</li>
<li>2D or 3D calculated electric and magnetic field solutions may be imported for detailed electron dynamics.</li>
<li><strong>GamBet </strong>incorporates the <strong>Penelope 2006 </strong>physics engine for high-accuracy interaction calculations, from GeV energies down to less than 100 eV.</li>
<li>Calculations of fields, electron beam dynamics and target heating are integrated with Monte Carlo simulations in <strong>Xenos</strong>, a comprehensive software suite for X-ray source development.</li>
<li><strong>GamBet </strong>features extensive graphical and quantitative post-processing capabilities for dose distributions and particle statistics.</li>
</ul>
<p>The <strong>GDE </strong>package will listed in our catalog and available for purchase on March 30, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2012/gambet-computing-power-unleashed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multitasking made easy</title>
		<link>http://fieldp.com/myblog/2012/multitasking-made-easy/</link>
		<comments>http://fieldp.com/myblog/2012/multitasking-made-easy/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 16:29:09 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1233</guid>
		<description><![CDATA[<p>Field Precision programs are optimized for the latest generation of multi-core or multi-processor PCs. The 64-bit major solution programs (HiPhi, Magnum, GamBet,&#8230;) feature true parallel operation. The time-intensive subroutines have been coded in OpenMP, giving significant improvements in speed (see magnum-in-parallel or multicore-gambet). A second feature is the capability to run multiple independent calculations simultaneously. All [...]]]></description>
			<content:encoded><![CDATA[<p>Field Precision programs are optimized for the latest generation of multi-core or multi-processor PCs. The 64-bit major solution programs (<strong>HiPhi</strong>, <strong>Magnum</strong>, <strong>GamBet</strong>,&#8230;) feature true parallel operation. The time-intensive subroutines have been coded in <strong>OpenMP</strong>, giving significant improvements in speed (see <a href="http://fieldp.com/myblog/2009/magnum-in-parallel/" target="_blank">magnum-in-parallel</a> or <a href="http://fieldp.com/myblog/2011/multicore-gambet/" target="_blank">multicore-gambet</a>). A second feature is the capability to run multiple independent calculations simultaneously. All the solution programs can run in the background if launched from a Windows batch file. Background operation is automatic and faster than running in a window. Unfortunately, this capability is often overlooked because of the effort required to create batch files and to keep track of what tasks are running. The problem was brought home to me during a recent consulting project where I needed to make an extended sequence of <strong>Trak</strong> calculations with small changes in geometry. Each step involved re-running three programs. Even though I was well aware of the batch file capability, laziness prevailed and I ran each calculation interactively. My irritation level was not quite high enough to overcome my inertia. We recently added a new feature to our program launchers (<strong>TC</strong>, <strong>AMaze</strong>, <strong>GBLaunch</strong> and <strong>Xenos</strong>) that should tip the balance — the ability to create and to run <em>Tasks</em>. A Task is any sequence of installed programs and input files for a background run. With the feature you can 1) quickly define Tasks in an interactive dialog, 2) launch simultaneous Tasks in the background and 3) find out which tasks are running. I&#8217;ll discuss how it works in this article.</p>
<div class="wp-caption aligncenter" style="width: 388px"><img title="Figure 1. Task control group in the TC program launcher." src="http://www.fieldp.com/myblog/images/createtask01.png" alt="Figure 1. Task control group in the TC program launcher." width="378" height="688" /><p class="wp-caption-text">Figure 1. Task control group in the TC program launcher.</p></div>
<p>Figure 1 shows the new Task control group in the <strong>TC</strong> program launcher. The <em>CREATE TASK</em> button calls up the dialog of Figure 2. The user supplies a file prefix <em>FPREFIX </em>that indicates the function of the Task. The Task information will be stored in a DOS batch file <em>FPREFIX.BAT</em> created in the current <strong>TC</strong> data directory. Commands in the file are compatible with all recent Windows versions including Windows 7.</p>
<div class="wp-caption aligncenter" style="width: 663px"><img title="Figure 2. Create task dialog" src="http://www.fieldp.com/myblog/images/createtask02.png" alt="Figure 2. Create task dialog" width="653" height="480" /><p class="wp-caption-text">Figure 2. Create task dialog</p></div>
<p>Each row represents an operation (batch file command). The first column defines the action. Clicking on a cell brings up a menu that includes all <strong>TriComp </strong>programs capable of background operation that are installed on the user&#8217;s computer. In addition, several relatively safe DOS commands are included (<em>ERASE</em>, <em>COPY</em>, <em>MOVE</em>, <em>RENAME </em>and <em>REM</em>). All commands operate on a file (<em>FILEIN</em>). The DOS commands <em>COPY</em>, <em>MOVE </em>and <em>RENAME </em>require a second file name (<em>FILEOUT</em>). You can type file names in the cells. By default, the files are in the <strong>TC</strong> working directory, but you can include path information if the files are in other directories. Alternatively, you can click in a cell and pick the<em> SELECT FILE</em> command to raise the standard Windows dialog for choosing files anywhere on the computer. There is a nice feature for the <strong>TriComp </strong>programs — only files with appropriate suffixes are displayed (<em>e.g.</em>, <em>*.EIN</em> or <em>*.SCR</em> for <strong>EStat</strong>).</p>
<p>Click the <em>OK</em> button when the sequence is complete to create the batch file. Here is an example:</p>
<pre>REM TriComp batch file, Field Precision
START /B /WAIT C:\fieldp\tricomp\mesh64.exe C:\Temp\convergegun
START /B /WAIT C:\fieldp\tricomp\estat64.exe C:\Temp\convergegun
START /B /WAIT C:\fieldp\tricomp\trak64.exe C:\Temp\convergegun
ERASE *.?ls
START /B /WAIT C:\fieldp\tricomp\notify.exe
IF EXIST Electrode01.ACTIVE ERASE Electrode01.ACTIVE</pre>
<p>The operations listed perform a complete <strong>Trak </strong>calculation in the background and then erase all listing files. Here are some notable features:</p>
<ul>
<li>The operations are performed sequentially because data from one operation may be used in the next. To run calculations in parallel, define and run multiple Tasks.</li>
<li>You can modify the file with an editor if you are familiar with DOS commands.</li>
<li>The DOS commands recognize the standard wildcard conventions (* for any character grouping, ? for any character).</li>
<li>The programs adds the command <em>notify.exe</em> to the task sequence if <em>AUDIO ALARM</em> is checked. In this case, the computer beeps when a task is completed.</li>
<li>The final command to erase a file <em>FPREFIX.ACTIVE</em> is added to all batch files. The presence of an activate file indicates that the task is running.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 328px"><img title="Figure 3. Run task dialog" src="http://www.fieldp.com/myblog/images/createtask03.png" alt="Figure 3. Run task dialog" width="318" height="399" /><p class="wp-caption-text">Figure 3. Run task dialog</p></div>
<p>Click the <em>RUN TASK</em> button when you have created Tasks or moved predefined task files to the data directory. The dialog (Figure 3) organizes tasks into two groups: ones that are available to run and ones that are currently running (<em>i.e.</em>, <em>FPREFIX.ACTIVE</em> has been detected). To launch a task, choose one from the top list and click <em>OK</em>. The program creates a file <em>FPREFIX.ACTIVE</em> and runs the batch file. The program sequence runs silently in the background and the results appear almost magically. In the meantime, you can prepare other inputs or run other tasks.</p>
<p>This year, we&#8217;re concentrating on program features to improve the user experience. We have two goals: 1) increase the computation speed and efficiency and 2) reduce the setup times. Clearly, users should worry less about program details so they can concentrate on physic issues. Our next job is to add macro capabilities to the 2D and 3D postprocessors. With this feature, the programs will remember the steps in a session to create an analysis script.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2012/multitasking-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website introduction video</title>
		<link>http://fieldp.com/myblog/2011/website-introduction-video/</link>
		<comments>http://fieldp.com/myblog/2011/website-introduction-video/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 15:32:03 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1196</guid>
		<description><![CDATA[<p>We&#8217;ve added a lot of content to our website at www.fieldp.com in 13 years. In fact, there&#8217;s so much material that the site might intimidating to first-time visitors looking for software or educational resources. To help, we&#8217;ve added a short overview video on the home page. Here it [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve added a lot of content to our website at www.fieldp.com in 13 years. In fact, there&#8217;s so much material that the site might intimidating to first-time visitors looking for software or educational resources. To help, we&#8217;ve added a short overview video on the home page. Here it is:</p>
<p><!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="498" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/company_profile_choosing_controller.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="containerwidth=640&amp;containerheight=498&amp;showstartscreen=true&amp;showendscreen=true&amp;loop=false&amp;autostart=false&amp;color=000000,000000&amp;thumbscale=45&amp;content=http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/Company_Profile_Choosing.mp4&amp;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/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/" /><param name="src" value="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/company_profile_choosing_controller.swf" /><embed id="scPlayer" type="application/x-shockwave-flash" width="640" height="498" src="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/company_profile_choosing_controller.swf" base="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="containerwidth=640&amp;containerheight=498&amp;showstartscreen=true&amp;showendscreen=true&amp;loop=false&amp;autostart=false&amp;color=000000,000000&amp;thumbscale=45&amp;content=http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/Company_Profile_Choosing.mp4&amp;blurover=false" bgcolor="#FFFFFF" quality="high" data="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/company_profile_choosing_controller.swf"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/website-introduction-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.screencast.com/users/Field_Precision_LLC/folders/Default/media/e265c5e2-5bdb-4ec0-ba3c-76c49d23c2be/Company_Profile_Choosing.mp4&amp;amp" length="14288650" type="video/mp4" />
		</item>
		<item>
		<title>Particle flux plots in Gendist</title>
		<link>http://fieldp.com/myblog/2011/particle-flux-plots-in-gendist/</link>
		<comments>http://fieldp.com/myblog/2011/particle-flux-plots-in-gendist/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 13:55:09 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1188</guid>
		<description><![CDATA[<p>A recent consulting project involved Xenos simulations of an intense, non-circular electron beam striking a graphite beam stop. A phosphor plate on the downstream face of the target was used as a diagnostic. The researchers wanted to know how the shape of the phosphor response correlated with the shape of the beam. One option was to [...]]]></description>
			<content:encoded><![CDATA[<p>A recent consulting project involved <strong>Xenos </strong>simulations of an intense, non-circular electron beam striking a graphite beam stop. A phosphor plate on the downstream face of the target was used as a diagnostic. The researchers wanted to know how the shape of the phosphor response correlated with the shape of the beam. One option was to add the phosphor plate as a region in a <strong>GamBet </strong>simulation and then to plot dose distribution as a slice plot in <strong>GBView3</strong>.</p>
<p>For the design of other diagnostics, the researchers wanted the spatial distribution of the X-ray flux emitted from the target. Such plots could be created using the <strong>GenDist </strong>utility program from information in the <strong>GamBet </strong>escape file. The escape file is a record of parameters for all particles leaving the solution volume. <strong>GenDist </strong>is a general-purpose program to create and to analyze large distributions of particles (<em>e.g.</em>, electrons, ions, photons, positrons). For the application, the procedure was to load the escape file into <strong>GenDist </strong>and then to add filters that admit only photons at the exit face (<em>i.e.</em>, <em>z</em> coordinate great than or equal to the exit face position). Of the <strong>GenDist </strong>plot types, the 2D histogram was appropriate for the application. Here, particles are assigned to a 2D matrix of bins according to their position in the <em>x</em>-<em>y</em> plane. The probability function <em>N</em>(<em>x</em>,<em>y</em>) may be weighted by the model particle current, energy or combined current/energy. In this way, the program can generate spatial distributions of the following quantities:</p>
<ul>
<li>Model particle density.</li>
<li>Particle flux (weighted by model-particle current or flux).</li>
<li>Power flux (weighted by model-particle current and kinetic energy).</li>
</ul>
<p>The previous version of <strong>GenDist </strong>had only one available style for 2D histograms —  a projected 3D view showing <em>N</em>(<em>x</em>,<em>y</em>) as height above the <em>x</em>-<em>y</em> plane. Although the style gave attractive plots for presentations, it was not useful for quantitative work. We added the three new styles shown in the figure for better display of spatial particle distributions:</p>
<ul>
<li>The existing 3D bin height plot improved with color coding.</li>
<li>A 3D plot with bin height displayed as an interpolated shape.</li>
<li>A 2D contour line plot, showing surfaces of equal probability density.</li>
<li>A 2D filled contour plot.</li>
</ul>
<ul>
<li><img title="Plot styles for the 2D histogram type in GenDist" src="http://www.fieldp.com/myblog/images/gendistplot.png" alt="Plot styles for the 2D histogram type in GenDist" width="600" height="1811" /></li>
</ul>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter" style="width: 610px;">
<dd class="wp-caption-dd">Plot styles for the 2D histogram type in GenDist</dd>
</dl>
</div>
<p>b) 3D plot with bin height display as an interpolated shape.<br />
3) 2D contour line plot, showing surfaces of equal probability density.<br />
4) 2D filled contour plot.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/particle-flux-plots-in-gendist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improved extrusion model in Geometer/MetaMesh</title>
		<link>http://fieldp.com/myblog/2011/improved-extrusion-model-in-geometermetamesh/</link>
		<comments>http://fieldp.com/myblog/2011/improved-extrusion-model-in-geometermetamesh/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 22:52:26 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1168</guid>
		<description><![CDATA[<p>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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MetaMesh </strong>(our 3D automatic mesh generator) accepts geometric information from a wide variety of sources (see <a href="http://fieldp.com/myblog/2011/automatic-3d-meshing-of-printed-circuits/" target="_blank">Automatic meshing of printed circuits</a>). For relatively simple systems, the quickest path to a mesh is through the native combinatorial solid modeler of <strong>MetaMesh</strong>. A variety of shape models are available. One of the most useful is the <em>extrusion</em>, 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.</p>
<div class="wp-caption aligncenter" style="width: 560px"><img class=" " title="Figure 1. Outline generation utility in Geometer" src="http://www.fieldp.com/myblog/images/extrusion01.png" alt="Figure 1. Outline generation utility in Geometer" width="550" height="546" /><p class="wp-caption-text">Figure 1. Outline generation utility in Geometer</p></div>
<p>I&#8217;ll start with a review of the old procedure for extrusions. The basic principle in <strong>MetaMesh </strong>is to define basic parts (<em>i.e.</em>, set model types and dimensions) in a reference workbench space and then to move them to the model space by <em>SHIFT </em>and <em>ROTATE </em>operations. In the old convention, an extrusion extended along <em>z</em> in the workbench space with its cross-section outline defined in the <em>x</em>-<em>y</em> plane. The outline consists of a set of line and arc vectors that form a closed shape. The outline editor of <strong>Geometer </strong>(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 <em>SHIFT </em>or <em>ROTATE </em>parameters. An extrusion using the outline of Fig. 1 has the following <em>TYPE </em>form in the <strong>MetaMesh </strong>script:</p>
<pre>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</pre>
<p>The data lines contain the <em>x</em>-<em>y</em> coordinates of the start and end points of lines and the start-end-center points of arcs.</p>
<p>Because the outline may specified at absolute positions in the <em>x</em>-<em>y</em> plane, it is easy to create desired extrusions that point along <em>z</em>. In most cases, <em>SHIFT </em>and <em>ROTATE </em>operations are unnecessary The problem arises if you want extrusions that extend along <em>x</em> or <em>y</em>. It is not immediately obvious to most people (myself included) how the <em>x</em>-<em>y</em> coordinates of Fig. 1 map to <em>y</em>-<em>z</em> or <em>z</em>-<em>x</em> coordinates when 90° rotations are applied about different axes. Positioning <em>x</em> or <em>y</em> extrusions often requires considerable experimentation in <strong>Geometer</strong>.</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 410px"><img title="Figure 2. Add/Edit part dialog in Geometer" src="http://www.fieldp.com/myblog/images/extrusion02.png" alt="Figure 2. Add/Edit part dialog in Geometer" width="400" height="596" /><p class="wp-caption-text">Figure 2. Add/Edit part dialog in Geometer</p></div>
<p>We have modified both <strong>Geometer </strong>and <strong>MetaMesh </strong>so that you can directly define extrusions along <em>x</em> and <em>y</em>. For extrusions along <em>x</em>, the outline coordinates are interpreted as absolute values in the <em>y</em>-<em>z</em> plane. For an extrusion along <em>y</em>, the outline data gives <em>z</em>-<em>x</em> values. It is easy to apply the feature. Figure 2 shows the modified <em>Add/Edit part </em>dialog in <strong>Geometer</strong>. The red arrow shows new radio buttons that are active only when the part type is set to <em>EXTRUSION</em>. The choice of extrusion axis determines how the path coordinates are interpreted. In the <strong>MetaMesh </strong>script, the TYPE command has a modified form:</p>
<pre>Type Extrusion [X,Y,Z]</pre>
<p>Some usage notes:</p>
<ul>
<li>If no direction option appears in the <em>TYPE EXTRUSION</em> command, the default is <em>Z</em>. Therefore, existing scripts are interpreted correctly.</li>
<li>The new capabilities affect the extrusion shape and direction in the workbench frame. <em>SHIFT </em>and <em>ROTATION </em>operations may still be applied in the transfer to the assembly frame.</li>
<li>The same outline may be used in <strong>Geometer </strong>for multiple extrusion parts with different extrusion directions. Figure 3 shows an example.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 560px"><img title="Figure 3. Multiple=" src="http://www.fieldp.com/myblog/images/extrusion03.png" alt="Figure 3. Multiple=" width="550" height="642" /><p class="wp-caption-text">Figure 3. Multiple extrusions with different directions from the same outline</p></div>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/improved-extrusion-model-in-geometermetamesh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic 3D meshing of printed circuits</title>
		<link>http://fieldp.com/myblog/2011/automatic-3d-meshing-of-printed-circuits/</link>
		<comments>http://fieldp.com/myblog/2011/automatic-3d-meshing-of-printed-circuits/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 14:22:26 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1144</guid>
		<description><![CDATA[<p>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 [...]]]></description>
			<content:encoded><![CDATA[<p>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 <em>z</em> with relatively complex spatial variations in <em>x</em>-<em>y</em>. 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 <strong>MetaMesh </strong>to analyze such a structure. The task is equivalent to deciding whether a point is inside or outside a thread of a spider web.</p>
<p>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 <strong>Mesh </strong>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 <strong>MetaMesh </strong>capabilities for analyzing photographs and illustrate them with an example of a layer in a printed circuit.</p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Figure 1. Sample printed circuit, PNG format." src="http://www.fieldp.com/myblog/images/printed_circuit_01.png" alt="Figure 1. Sample printed circuit, PNG format." width="500" height="439" /><p class="wp-caption-text">Figure 1. Sample printed circuit, PNG format.</p></div>
<p>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 <em>GLOBAL</em> section of the <strong>MetaMesh </strong>script:</p>
<pre>INTERVALS  Lightness
  50.0  100.0  2
END</pre>
<p>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 <em>INTERVAL </em>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.</p>
<p>Parts are basic building blocks in <strong>MetaMesh</strong>. The concept is flexible — parts range from simple geometric solids to complex STL shapes. We have added a new <em>PHOTO </em>part type. The following section defines a photo part in the example:</p>
<pre>PART
  Type Photo PC01.PNG 0.00  0.00  50.00  50.00
  Name PC
  Fab 1.00
END</pre>
<p>In the workbench frame, the photograph image is mapped into an <em>x</em>-<em>y</em> plane centered at <em>z</em> = 0.0 with thickness Δ<em>z</em> set by the fabrication parameter. The resulting solid can be moved to any position or orientation with optional <em>SHIFT </em>and <em>ROTATE </em>commands. In the example, the photographic image is contain in the file <em>PC01.PNG</em>. (<strong>MetaMesh </strong>also handles BMP and PCX formats.) The information is mapped to an area with spatial dimensions <em>xmin</em> = 0.0, <em>ymin </em>= 0.0, <em>xmax </em>= 50.0 and <em>ymax </em>= 50.0, independent of the image pixel dimensions. Figure 2 shows the resulting mesh in the slice plane <em>z</em> = 0.0, while Figure 3 shows a three view with perspective. The entire structure was created with the two simple statements listed above.</p>
<div class="wp-caption aligncenter" style="width: 560px"><img title="Figure 2. MetaMesh screen shot, slice in the plane z = 0.0." src="http://www.fieldp.com/myblog/images/printed_circuit_02.png" alt="Figure 2. MetaMesh screen shot, slice in the plane z = 0.0." width="550" height="450" /><p class="wp-caption-text">Figure 2. MetaMesh screen shot, slice in the plane z = 0.0.</p></div>
<div class="wp-caption aligncenter" style="width: 560px"><img title="Figure 3. Three dimensional view, printed-circuit example." src="http://www.fieldp.com/myblog/images/printed_circuit_03.png" alt="Figure 3. Three dimensional view, printed-circuit example." width="550" height="500" /><p class="wp-caption-text">Figure 3. Three dimensional view, printed-circuit example.</p></div>
<p>Photographic analysis is a powerful new feature of <strong>MetaMesh</strong>. 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:</p>
<ol>
<li>Set up a foundation mesh with element layers of the appropriate thicknesses.</li>
<li>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.</li>
</ol>
<p>The photographic method has unlimited applications. Information from up to 250 photographs may be included in a <strong>MetaMesh </strong>script. The technique applies to any three-dimensional structure with photographic slice data, such as MRI scans.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/automatic-3d-meshing-of-printed-circuits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use saved views</title>
		<link>http://fieldp.com/myblog/2011/how-to-use-saved-views/</link>
		<comments>http://fieldp.com/myblog/2011/how-to-use-saved-views/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 20:42:43 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1069</guid>
		<description><![CDATA[<p>We recently added the capability to save and to load plot views (discussed in a previous post) to our two-dimensional TriComp field programs (EStat, PerMag, EMP, Nelson, TDiff, Pulse, RFE2 and WaveSim). In the interactive environment, the Save view command generates a formatted text file FPrefix.FPV where FPrefix is a descriptive name assigned by the user. [...]]]></description>
			<content:encoded><![CDATA[<p>We recently added the capability to save and to load plot views (discussed in a <a href="http://fieldp.com/myblog/2010/saved-views-in-metamesh-and-the-amaze-postprocessors/" target="_blank">previous post</a>) to our two-dimensional <strong>TriComp </strong>field programs (<strong>EStat</strong>, <strong>PerMag</strong>, <strong>EMP</strong>, <strong>Nelson</strong>, <strong>TDiff</strong>, <strong>Pulse</strong>, <strong>RFE2 </strong>and <strong>WaveSim</strong>). In the interactive environment, the <em>Save view</em> command generates a formatted text file <em>FPrefix.FPV</em> where <em>FPrefix </em>is a descriptive name assigned by the user. The file contains the complete set of plotting parameters. This excerpt illustrates the format:</p>
<pre>Program: TriComp
PlotStyle: Spatial
Outline: ON
Grid: ON
Scientific: OFF
FixedPoint: OFF
Vectors: OFF
XGMin:  3.500000E+00
XGMax:  9.000001E+00
...</pre>
<p>The file contains all necessary parameters to reconstruct spatial plots (in the <em>z-r</em> or <em>x-y</em> planes). The file includes the following information for spatial plots:</p>
<ul>
<li>Style information, like whether to display a reference grid, element outlines or field vectors.</li>
<li>Boundaries of zoomed views</li>
<li>The plot type (e.g., mesh, filled contour, contour lines,&#8230;)</li>
<li>The plotted quantity.</li>
</ul>
<p>You can also save information to reconstruct scan plots:</p>
<ul>
<li>Style information (number of scan points, symbol display,&#8230;)</li>
<li>Coordinates of the scan start and end Limits of the scan.</li>
<li> Plotted quantity.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 640px"><img title="Spatial versus scan plots in TriComp programs" src="http://www.fieldp.com/myblog/images/saved_view.png" alt="Spatial versus scan plots in TriComp programs" width="630" height="309" /><p class="wp-caption-text">Spatial versus scan plots in TriComp programs</p></div>
<p>The simplest application of saved views is to restore a complex plot when you reload the solution at a later time. We have included several features in our implementation to enable a higher level of data analysis:</p>
<ul>
<li>A saved view works even if a completely different solution than one use to create the view in loaded. In fact, views can be reloaded even if the user is running a different <strong>TriComp </strong>program. The current program analyzes the parameters and uses only ones that are relevant. For example, if a view-boundary or scan point is outside the current solution volume, the point is moved to the boundary. If a plot quantity is undefined, the first valid quantity  is used.</li>
<li>A free-form parser is employed when a view is loaded. Therefore, a file need not contain a complete set of parameters. Changes are made only to the quantities listed in the file.</li>
<li>Users can modify entries in the view file, either directly with an editor or via a Perl or Python script. You can include comments, change parameter values or remove parameter lines.</li>
</ul>
<p>Another important feature is related to the fact that analysis functions of all <strong>TriComp </strong>postprocessors may be controlled by a text script. We have added the following  script command:</p>
<pre>PLOT FSaveView FOutput Nx Ny
PLOT (DiodeRegion VIEW001 800 600)</pre>
<p>The string <em>FSaveView </em>is the prefix of a saved view file. The string <em>FOutput </em>is the prefix of a plot file in BMP format. The integer parameters give the image resolution in pixels. In response to the command, the program loads the saved view file, applies the parameters to create a plot for the currently-loaded solution and saves it as a graphics file.</p>
<p>Here are some possible scenarios:</p>
<ul>
<li>You have a set of electric field solutions with different applied voltage and possibly different boundaries and you want to check electric field levels in a critical region (<em>e.g.</em>, an electron source). Use the <em>Zoom</em> command to create the desired plot and save a view file. Remove all information lines except the view boundaries and load the view when you load a different solution.</li>
<li>You have a set of magnetic field solutions and want precision plots of field lines passing through specific points. Add a field line interactively in <strong>PerMag </strong>and save a template view file. Then edit the view file to remove unnecessary information, change the number of field lines and add coordinates for the desired points.</li>
<li>You want to create a large set of radial temperature scans moving along the axis of a probe assembly. In <strong>TDiff</strong>, create a template view file for one scan. Write a Python or Perl script with a loop of axial positions that modifies the axial scan coordinates in the view file and then runs <strong>TDiff </strong>in the analysis mode. The set of BMP files could then be stitched into an AVI movie with our <strong>Cecil_B</strong> utility.</li>
<li>A sequence of annotated view files could be employed in a training session or educational demonstration.</li>
<li>You want to show how the levels of magnetic flux induction change with changing coil currents, preserving magnitude scaling in the plots. After creating a set of solutions, load one of them adjust the view, plot style and plot quantity. Turn off autoscaling, specify values for <em>BMin </em>and <em>BMax </em>and then save a view file. Load the view for the other solutions.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/how-to-use-saved-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interaction forcing in GamBet</title>
		<link>http://fieldp.com/myblog/2011/interaction-forcing-in-gambet/</link>
		<comments>http://fieldp.com/myblog/2011/interaction-forcing-in-gambet/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 22:29:03 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[Educational]]></category>
		<category><![CDATA[NewFeatures]]></category>
		<category><![CDATA[Techniques]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1043</guid>
		<description><![CDATA[<p>Recently, a GamBet user reported calculations where the code violated conservation of energy by several orders of magnitude. This is the type of statement that generally catches my attention, so I decided to investigate the issue. An inspection of his input files showed that he was using a bremsstrahlung forcing factor of 1000. If I were [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, a <strong>GamBet </strong>user reported calculations where the code violated conservation of energy by several orders of magnitude. This is the type of statement that generally catches my attention, so I decided to investigate the issue. An inspection of his input files showed that he was using a bremsstrahlung forcing factor of 1000. If I were implementing variance reduction, I would pick a factor of 20, while a value of 100 would make me nervous (my choices are reflected in the parameters of the application examples supplied with the code). On the other hand, I never said not to use 1000 (or even 10,0000) in the instruction manual, so some guidance is needed.</p>
<p>To review, interaction forcing is used in <strong>GamBet </strong>to improve statistics for low-probability events like photon-production via bremsstrahlung or pair production. In the <strong>Penelope </strong>routines, the probability of an event is increased by <em>Fb</em>, but the weight of secondary particles (and their descendants) is decreased by 1/<em>Fb</em>. If you use <em>Fb</em> = 100 to find a bremsstrahlung spectrum, the variance between bins is decreased by about a factor of 10. At the same time, the run time should be significantly less than <em>Fb</em> times the run time with no forcing.</p>
<p>The user&#8217;s example involved a 16 MeV electron beam striking a 6 mm thick sheet of tantalum. To understand the effect of forcing factor on the validity of results, I made a series of runs with different values of <em>Fb</em>. The first plot shows the global energy balance as a function of <em>Fb</em>. Here, <strong>GamBet </strong>sums energy lost from primary and secondary particles to the escape file and to absorption in the solution volume. The code compares this value to the input energy of primaries. The plot shows that conservation of energy holds to within a few percent up to <em>Fb</em> = 100. An abrupt change occurs near <em>Fb</em> = 150 — energy conservation is lost at higher values. The second plot shows the run time versus <em>Fb</em>. It increases linearly (as expected) up to around <em>Fb</em> = 150 and then saturates.</p>
<div class="wp-caption aligncenter" style="width: 630px"><img title="Energy error as a function of forcing function" src="http://www.fieldp.com/myblog/images/intforce01.png" alt="Energy error as a function of forcing function" width="620" height="492" /><p class="wp-caption-text">Energy error as a function of forcing factor</p></div>
<p>I identified the cause of the problem as overflow of the <strong>Penelope </strong>secondary-particle stack. In a shower calculation, <strong>Penelope </strong>tracks a primary particle and stores the parameters of secondaries on the stack. Then it pops each secondary from the stack and tracks it. In the process, additional secondaries may be pushed on the stack. Tracking continues until the stack is empty, and then the code proceeds to the next primary. The <strong>Penelope </strong>routines do not halt program operation when an overflow occurs because there may be rare showers with a large number of secondaries. Rather, Penelope ignores extra secondaries leading to unaccounted energy. Application of a forcing factor increases the number of entries per shower to store on the stack by about a factor of <em>Fb</em>. Therefore, a value <em>Fb</em> = 1000 could clearly lead to trouble. I confirmed the hypothesis by increasing the stack size from 2000 to 5000 entries. In this case, energy was conserved to <em>Fb</em> = 200.</p>
<div class="wp-caption aligncenter" style="width: 643px"><a href="Run time as a function of forcing function"><img title="Run time as a function of forcing function" src="http://www.fieldp.com/myblog/images/intforce02.png" alt="" width="633" height="474" /></a><p class="wp-caption-text">Run time as a function of forcing factor</p></div>
<p>To reduce the chance of errors in future user calculations, I made some changes in <strong>GamBet</strong>:</p>
<ol>
<li>I increased the secondary stack size to 5000. The larger static array increases the code RAM utilization by only about 10 MB.</li>
<li>I added cautionary material to the section on the <em>FORCE </em>command in the <strong>GamBet </strong>reference manual.</li>
<li>I modified <strong>GamBet </strong>to count the number of instances of stack overflow. If the value exceeds zero, the code writes a warning in the listing file (<em>GLS</em>).</li>
</ol>
<p>Finally, we can gauge the utility of interaction forcing from low-<em>Fb</em> entries in the second plot. The run time was 5 seconds for <em>Fb</em> = 1. It increased to 103 seconds with Fb = 100. To get the same statistics for the bremsstrahlung spectrum with <em>Fb</em> = 1, we would need to increase the number of showers by a factor of 100, giving a run time of about 500 seconds. In this case, interaction forcing reduces the run time to achieve a given statistical accuracy by about a factor of 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/interaction-forcing-in-gambet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monte Carlo code particle filtering</title>
		<link>http://fieldp.com/myblog/2011/monte-carlo-code-particle-filtering/</link>
		<comments>http://fieldp.com/myblog/2011/monte-carlo-code-particle-filtering/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 13:52:36 +0000</pubDate>
		<dc:creator>shumphries</dc:creator>
				<category><![CDATA[NewFeatures]]></category>

		<guid isPermaLink="false">http://fieldp.com/myblog/?p=1000</guid>
		<description><![CDATA[<p>The two primary data outputs of our GamBet code are 1) the deposited energy distribution and 2) the particle escape list. The escape file contains the parameters of electron, photons and positrons that leave the solution volume. This information may be displayed and analyzed with GenDist, our interactive distribution utility. The information is useful for investigating [...]]]></description>
			<content:encoded><![CDATA[<p>The two primary data outputs of our <strong><a href="http://www.fieldp.com/gambet.html" target="_blank">GamBet </a></strong>code are 1) the deposited energy distribution and 2) the particle escape list. The escape file contains the parameters of electron, photons and positrons that leave the solution volume. This information may be displayed and analyzed with <strong>GenDist</strong>, our interactive distribution utility. The information is useful for investigating processes like X-ray generation, backscatter, forward scattering and flux attenuation.  The procedure in <strong>GamBet </strong>2.2 was to record all exit particles and to apply filtering in <strong>GenDist</strong>.</p>
<p>We recently released <strong>GamBet </strong>3.0 with support for parallel processing. We anticipate that users will set up large production runs with a high number of showers for improved statistics.  The corresponding larger escape files would take longer to load in <strong>GenDist</strong>. In extensive calculations to study rare events, the bulk of the particles recorded in the escape would not be of interest.</p>
<p>To increase efficiency, we added the option for escape particle filtering in <strong>GamBet </strong>3.0. Filters may be applied to limit particles recorded in the escape file by species, exit position and kinetic energy.  The procedure to define a filter is relatively easy. There is a new command of the form</p>
<pre>ESCAPEFILTER Condition1 Condition2 Condition3 ...</pre>
<p>A <em>condition </em>is short string with no delimiters. Multiple conditions are separated by spaces. Any number of conditions may be included in the line. The following conditions determine the included particle types:</p>
<pre>ElecP  PhotP  PosiP  ElecS  PhotS  PosiS</pre>
<p>Here the letters <em>P</em> and <em>S</em> designate <em>primary </em>and <em>secondary</em>. If the <em>EscapeFilter</em> command appears, the initial condition is that no particle species passes the filter. If one or more of the conditions appears, only the specified types are included. For example, this command includes only secondary electrons and photons:</p>
<pre>ESCAPEFILTER ElecS PhotS</pre>
<p>The following expression types define pass conditions for particles according to their exit positions:</p>
<pre>  X&gt;10.56  Y&lt;1.0E-8  Z&gt;15  R&gt;30.5, ....</pre>
<p>The conditions begin with a character to define the coordinate axis: <em>X</em>, <em>Y</em>, <em>Z</em> or <em>R</em>. The quantity <em>R</em> is given by  <em>R</em>^2 = <em>X</em>^2 + <em>Y</em>^2. Position conditions act differently from species conditions. In the absence of a condition, all particles pass the filter. The expression <em> Z</em>&gt;33.5  means that 1) only particles with final <em>z</em> coordinate greater than 33.5 are included and 2) particles with all values of <em>x</em> and <em>y</em> are included. As an example, the command</p>
<pre>ESCAPEFILTER X&gt;0.0 Y&gt;0.0</pre>
<p>passes only particles that exit in the first quadrant of the <em>x</em>-<em>y</em> plane. In this case, no filtering is applied in <em>z</em>. Finally, conditions of the form</p>
<pre>T&lt;5.0E6, T&gt;1500,....</pre>
<p>pass particles according to their kinetic energy. To illustrate a complex filter, consider a 500 keV photon beam passing through a slab of material with <em>Zmax</em> = 60.0 mm. To calculate the attenuation coefficient, we want to find the number of full-energy, primary photons that emerge from the exit face. The appropriate filter command is:</p>
<pre>ESCAPEFILTER PhotP T&gt;4.999E5 Z&gt;59.999</pre>
]]></content:encoded>
			<wfw:commentRss>http://fieldp.com/myblog/2011/monte-carlo-code-particle-filtering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

