Electrode Surface Enhancement / Fractional Grid Units¶
Traditionally in SIMION, significant loss in field accuracy (on the order expected from a +-0.5 grid unit surface defect) could occur if electrode surfaces didn’t perfectly align to PA grid cell vertices. For curved surfaces (with the exception of cylindrically symmetry), this could require using a large PA (and hence RAM) to obtain the highest accuracy, particularly in 3D.
As of SIMION 8.1, there is a new “surface enhancement” feature that improves this. If the surfaces don’t exactly align to grid units, the displacement of the surface from the grid units can be recorded in the PA file, and this will be utilized in the Refine. Doing this can improve accuracy by an order of magnitude or more, as shown in SIMION Example: surface_enhancement.
Status¶
Not all features of SIMION support it yet. Improvements were made in 8.1.2.10, 8.1.2.1, 8.1.1.25 and 8.1.1.10. The following features are missing and plan to be added. Tell us if you are waiting for any of these.
Modify screen drawing operations currently do not support surface enhancements. You must use GEM files or the Lua PA API (
simion.pas pa:fill()
).Dielectric PA’s or cylindrical magnetic vector potential do not yet support surface enhancement information (but this can be added soon). Refine will display an error on these PA’s.
The format of the
.pa-surf
file is subject to change in later updates. For now, it’s best to preserve your GEM files (which you probably do anyway) in case the surface enhancement information needs to be recreated.Particle flying (unlike Refine) currently does not utilize the surface enhancement information. See the “Fly’m” section below.
Modify Screen¶
When a PA contains surface enhancement information, the exact surface locations are displayed as red lines on the Modify 2D screens:
As of 8.2, the Modify 3D view displays surface enhancement too (similar to View Screen 3D view figure below).
View Screen¶
As of SIMION 8.1.2.1, the View screen now displays surface enhancement.
As of 8.2, the Modify 3D and (new) View 3D OpenGL views now display surface enhancement.
Note
This page is abridged from the full SIMION "Supplemental Documentation" (Help file). The following additional sections can be found in the full version of this page accessible via the "Help > Supplemental Documentation" menu in SIMION 8.1.1 or above:Fly’m
Usage / GEM files¶
If creating a PA from GEM files, you can enable the
surface enhancement feature by appending a surface=fractional
named parameter to the pa_define
command, like this:
pa_define(31,31,31,planar, surface=fractional)
e(1) {
fill { within {
sphere(15,15,20, 10)
} }
}
The above pa_define command is actually short-hand for
pa_define(31,31,31,planar,none,electrostatic,,1,1,1, surface=fractional)
Omitting surface=fractional
is the same as using
surface=none
, which uses the traditional SIMION behavior.
A surface=auto
option (described in surface=auto option in pa_define [8.1.1.25])
is also available [8.1.1.25] that is an
improvement on surface=none
but still is not as accurate
as surface=fractional
.
When enhanced surface handling is enabled, any +-0.5 gu unit corrections
to surfaces are unnecessary and no longer used. Therefore, any
within
/notin
are actually interpreted as the
appropriate
within_inside
/notin_inside
/within_inside_or_on
/notin_inside_or_on
.
Moreover (and this is also true of surface=auto
),
any PA grid points that precisely align
to an edge of a within
or notin
fill volume are made to
be electrode points, which is usually what you want.
In other words, a notin
inside an e
or a within
inside an n
(both of which remove electrode
material) will be treated as an “inside” fill to avoid
removing the electrode points from the border.
This largely avoids fiddling with
within_inside
/within_inside_or_on
/notin_inside
/notin_inside_or_on
fill variants since within
and notin
will now just do the
right thing.
See SIMION Example: surface_enhancement for more detailed examples.
Usage / STL Files¶
There support for surface enhancement in the SL Tools “STL to PA” converter. Use the “solid strategy” of “surface enhancement” (now officially included in SL Tools 8.2.0.10). See solid strategy.
STL files can also be used in GEM files (as of 8.2.0.10), and those GEM files can have surface enhancement enabled.
Note
This page is abridged from the full SIMION "Supplemental Documentation" (Help file). The following additional sections can be found in the full version of this page accessible via the "Help > Supplemental Documentation" menu in SIMION 8.1.1 or above:Usage / Lua PA API
PA Format
Performance
Caveats¶
Surface enhancement might not be able to mathematically represent electrodes less than 1 gu thick if they don’t straddle a grid point. Here is an example:
pa_define(11,11,1, planar,, electrostatic, surface=fractional)
e(1) { fill { within { box(1,0, 2,9) } } }
e(1) { fill { within { polyline(4,0, 5,10, 6,0) } } }
e(1) { fill { within { polyline(7,0, 7.5,10, 8,0) } } } ; missing
Older Notes¶
In previous 8.1.0.x versions, a function
simion.experimental.gemrefine()
was provided, along with the
example experimental\enhanced_refine
example.
This function is not optimized, no longer recommended, and may be removed.
Some screenshots are
here.
History¶
8.1.2.23: Modify: Now show mm coordinates and fractions of a grid unit coordinates in status bar.
EA-20130514: The Modify 3D and (new) View 3D OpenGL views now display surface enhancement.
8.1.2.1: PA-Surface/View: The View screen now displays PA surface enhancement. This allows more easily visualizing and measuring positions of electrode surfaces to sub-grid-unit accuracy. (This change has no effect on the Fly’m calculation, however.)
8.1.1.25: C GEM/Surface: PA grid points that precisely align to an edge of a
within
/notin
fill volume are made to be electrode points ifsurface=fractional
orsurface=auto
is enabled. In other words, anotin
inside ane
or awithin
inside ann
(both of which remove electrode material) will be treated as an “inside” fill to avoid removing the electrode points from the border. This largely avoids fiddling withwithin_inside
/within_inside_or_on
/notin_inside
/notin_inside_or_on
fill variants sincewithin
andnotin
will now just do the right thing. The default option (surface=none
) retains the old behavior for compatibility though. Example:e(1){fill{within{box(1,1,5,5)} notin{box(1,1,5,5)}}}
ande(1){fill{within{box(1,1,5,5)}}} n(0){fill{notin{box(1,1,5,5)}}}
both create a 4x4 hollow box with infinitesimally thin walls undersurface=auto
orsurface=fractional
. See surface=auto option in pa_define [8.1.1.25].8.1.1.25 - Various other GEM accuracy improvements. See Changes in GEM Geometry File.
8.1.1.23 - PA surface enhancement info loads from disk faster.
8.1.1.22 - PA Cropping (on Modify screen or
simion.pas pa:crop()
) now properly preserves surface enhancement information.8.1.1.13 - Improve Refine speed for surface enhancement. This is now nearly on par with Refine speed for PA’s without surface enhancement. Previously it was about an order of magnitude slower.
8.1.1.13 - Fixed very slow speed loading/saving surface enhancement info.
8.1.1.10 - Modify function, native GEM support, SIMION Example: surface_enhancement
8.1.0 - first 8.1.0 release using gemrefine