PositionGenerator¶
Block provides the number of Particle emission attempts and Particle load attempts, and the location where they attempt to be emitted or loaded. Whether or not the particle is actually loaded or emitted depends on the value of the relMacroDenFunc or relMacroFluxFunc function at that position and time.
Note
The use of relMacroDenFunc modifies ptclsPerCell
in bitRevSlabPosGen.
All xvLoaderEmitter and boostLoader blocks must have a PositionGenerator block. A PositionGenerator block is contained within a ParticleSource block.
PositionGenerator is used by the xvLoaderEmitter and boostLoader particle sources to determine the positions of particles when loaded or emitted into the simulation. The position generator loads and/or emits particles based on slab objects, specifying the upper and lower bounds of a slab region. Particle loading occurs inside a volume (3D), while particle emission occurs from a surface (2D).
Loading particles: the PositionGenerator location is the starting location of the particle at the beginning of the time-step, and the particle experiences a normal dynamic push to get the location at the end of the time step.
Emitting particles: an additional uniform random number between 0 and 1 is generated, which provides the exact time of emission within the time step, after which a fractional dynamic push is performed to obtain the location at the end of the time step.
There are three possible kinds of PositionGenerator:
See the documentation for each of these kinds for more details.
PositionGenerator Sub-Blocks¶
Slab (block)
- <Slab loadSlab>
Particle loading volume: Nested block that defines the physical volume into which particles will be loaded. loadSlab is defined by specifying the lowerBounds (lower-left-back corner of the region) and the upperBounds (upper-right-front corner of the region) in physical coordinates.
- <Slab emitSurface>
Particle emitting surface: Surface from which particles will be emitted. You can define the emitSurface only if particles are to be emitted into the simulation, starting with zero loaded particles. emitSurface is defined in a Slab block by specifying the lowerBounds (lower-left-back corner of the region) and the upperBounds (upper-right-front corner of the region) in physical coordinates. To define a surface, one of lowerBounds and upperBounds components must be equal in the emitSurface.
If you do not define a slab block for either a loading or emitting operation, Vorpal will not try to perform the operation that corresponds to the missing the slab.
Note
Use of the loadSlab or emitSurface parameter is mutually exclusive based on whether particles are initially loaded or emitted, respectively.
PositionGenerator Parameters¶
Note
Input parameters differ for loading and emitting particles. See below for details.
- kind:
PositionGenerator algorithm to be used is one of:
- bitRevSlabPosGen:
Loads and emits particles based on a slab object within which bitRevSlabPosGen generates positions for particles based on the bit-reversed algorithm; can also emit particles from a surface that is normal to one of the coordinate axes. See the bitRevSlabPosGen description for details and parameters.
- cutCellPosGen:
As an emitter it generates particle positions on the surface of a grid boundary using a triangulated approximation of that boundary and/or as a loader generates particles into a region defined by a grid boundary.
cutCellPosGen only works with the xvLoaderEmitter and in combination with a velocity generator. See the cutCellPosGen description for details and parameters. Use is enabled by VSim for Plasma Discharges and VSim for Microwave Devices licenses.
- gridPosGen:
Loads and emits particles based on slab objects, specifying the upper and lower bounds of a slab region, laying the particles down on at the nodes of a uniform Cartesian grid different from the grid on which fields are located. See the gridPosGen description for details and parameters.
- ptclsPerCell
For Loading Particles - Indicates nominal number of macroparticles the source assumes will be in cell.
- sweepRate (floating point, default = 0)
For Emitting Particles - Determines the width of the region (measured from the emitSurface in the direction specified by emitSign) in which newly emitted particle positions are generated. The width of this region will be equal to sweepRate multiplied by the size of the time step. sweepRate, together with the area of the emission surface and the time step, defines the volume into which Vorpal emits or loads particles. sweepRate is usually set to the average speed of the particles being emitted. If this value is set and
nomMacroPtclsPerStep
ornomMacroPtclsPerCellStep
(when usingbitRevSlabPosGen
) is set then it causes an exception and it asks the user to choose only one option.sweepRate is used in the following way to determine how many particles are emitter per step:
nomMacroPtclsPerAreaStep = sweepRate * dt * nominalDensity / numPtclsInMacro
nomMacroPtclsPerStep = nomMacroPtclsPerAreaStep * emissionArea
- nomMacroPtclsPerStep (floating point, default = 0)
For Emitting Particles - Specifies the nominal macro particles to emit per time step. If this value is set and
sweepRate
ornomMacroPtclsPerCellStep
is set then it causes an exception. The user is advised to choose only one option.
- emitDirSign (integer, default = 1)
For Emitting Particles - Specifies the direction from which the particles are to be emitted from the emitSurface; one of
+1
or-1
.
- applyTimes ([float,float], default = [0,0])
Start and stop times for loading particles. Must specify loadAfterInit (see below).
- loadAfterInit (boolean, default = 0)
Must be set with
applyTimes
. If set to 1, it enables loading after initialization.
- loadOnShift (boolean, default = 0)
Applied for moving-window simulations.
- emitBasedOnLocalForce (boolean, default = 0)
Set to true in order to prevent emission when the local electric field has sign such that the force returns particles to the surface.
- useCornerMove (boolean, default = 0)
Set to true to specify corner move dynamics on the initial step, when emitting from cut cells. If false, uses the parallel move from 1 cell deep. Using true, e.g., corner move, is more robust in some circumstances. Ignored if not using a kind =
cutCellPosGen
type of <Position-Generator>.
Note
If the user considers an emission source and does not set
sweepRate
or nomMacroPtclsPerStep
or
nomMacroPtclsPerCellStep
, then it causes an exception and
the user is advised to specify one of these options.