- funcVelGen
funcVelGen
Velocity generator that determines the velocity components based on a user-specified space-time function for each component. That is, the velocity is determined by where and when the particle is placed.
The funcVelGen VelocityGenerator sub-block of the ParticleSource block contains an STFunc Block block named component# (where ‘#’ is the component number: 0, 1, …) for each velocity component you can specify.
funcVelGen Parameters
- kind
Type of VelocityGenerator (e.g., beamVelocityGen).
- STFunc (block)
STFunc Block with function name specifying component#, where ‘#’ is the component number (0, 1,2, …) for each velocity component you wish to specify.
The component# space-time function blocks are specified like any other Vorpal space-time function block, and the value of this function (depending on the position and time of the particle’s placement at load or emission time) is used to determine the value of the specified component of the velocity.
Note
For loading variable weight particles, a user may specify a component3 which will set the weight of the particles. The weight is an additional modifier to macroparticles applied in addition to the nominal value of the Number of Particles in a Macroparticle (NPIM). The NPIM is calculated according to the equation (nominal particle density)*(cell volume)/(Particles Per Cell). For constant weight particles, do not specify a component3.
For emitting variable weight particles, a currentDensityFunc may override a setting of component3 in the
funcVelGen
, or the component3 may be ignored entirely.
funcVelGen Example Block
<VelocityGenerator emitVelGen>
kind = funcVelGen
emitVelocityIsLocal = true
<STFunc component0>
kind = expression
expression = -1.0e7
</STFunc>
<STFunc component3>
kind = expression
expression = 1.0
</STFunc>
</VelocityGenerator>