FLY2 File¶
The FLY2 File is the successor to the FLY File of SIMION 7.0 and is significantly more flexible. Details on FLY2 are available in the FLY2 appendix of the SIMION 8.0/8.1 manual.
See also Particle Initial Conditions.
Note
See these additional sections in this topic in the offline SIMION 8.1.0 help file:- Custom Distributions in FLY2 files
Programmatically Defining Particle Sets (Advanced)¶
You can also programatically build the beam definitions in the FLY2 file, like this:
-- Use "for" loop to build the table passed to "particles".
local t = {coordinates = 0}
for i=1, 10 do
local x = i^2 + i
t[#t+1] = standard_beam {
n = 1,
tob = 0,
mass = 0.00054857990946,
charge = -1,
ke = 0.1,
position = vector(x, 1, 0)
direction = vector(1, 0, 0)
}
end
particles(t)
or this:
local function round(x) return math.floor(x+0.5) end
local xoffset = 1
local yoffset = 1
local zoffset = 1
-- Define an array of line sequences.
local t = {}
for jj=0,5 do
t[#t+1] = line_sequence {
first = vector(xoffset-(10-jj),yoffset+round(jj*math.sqrt(3)),zoffset),
step = vector(1,0,0),
n = 20-2*jj
}
end
particles {
standard_beam {
position = concatenated_sequence(t)
}}
Other advanced uses of FLY2 files include
- SIMION Example: random_fly2 [8.1.1.1] can reload a FLY2 from a workbench user program, passing the FLY2 adjustable variables from the user program.
- SIMION Example: field_emission (fe_rays.fly2) defines particle emission as a function of the electric field magnitude over an electrode surface (Fowler-Nordheim emission). Inside the FLY2 file, it uses the simion.pas API to read the fields from a PA. fe_rays.lua also uses a technique similar to SIMION Example: random_fly2.
