planarPtclEmitter

planarPtclEmitter (deprecated in 8.0)

Note

This source has been deprecated. Please use the xvLoaderEmitter kind with an emitSurface Slab in the PositionGenerator instead.

This particle beam is emitted from flat surface. This kind adds an additional parameter, relativisticFlag. This integer flag tells the emitter whether the particles are of relativistic type (i.e. using a relativistic mover class such as relBoris for updating the particles) or not. The emitted particles’ velocities are adjusted accordingly.

This particle source can be used with all VSim licenses.

planarPtclEmitter Parameters

density (double)

Positive value describing the density of the particles.

applyPeriod (integer)

Positive value n, directing the simulation to apply the source at every nth time step. This option works only with emitter algorithms.

applyTimes (double vector)

Bracketed times for when the source/emitter will generate particles.

lowerBounds (double vector)

Lower bound (expressed in physical units, not grid units) of the physical extent of the source.

upperBounds (double vector)

Upper bound (expressed in physical units, not grid units) of the physical extent of the source.

doShiftLoad (integer, default = 0 (off))

For moving windows, move the particles with the windows.

vbar (double vector)

Average velocity of the particles in the x, y, and z directions.

vsig (double vector)

Positive value denoting the thermal velocity in the x, y, and z directions.

numMacroPtclsPerStep (double)

A reference (nominal) number of macroparticles emitted from the entire emitter each time step.

numMacroPtclsPerCellPerStep (double)

Number of macro particles to emit per cell per timestep.

current (double)

This switches from a current density profile to a current profile.

nonUniformMacroPtclsFlag (double)

If set allows for variation in macro particle density.

seed (integer)

Specifies the seed for the random number generator. seed must be a positive integer.

positionFunction (string, optional)

String to specify how particles are loaded. Available choices are random, bitReversed, lattice and equispaced.

usePositionFuncInEmitDir (integer, optional)

Flag for whether to use the normPositionFunc for time of emission.

weightMinimum (float, optional)

The lowest weight allowed if loadZeroWeights is false.

weightFunc (STFunc Block, optional)

Determines the relative density of the loaded particles by setting the probability that an individual is loaded.

macroFluxFunc (STFunc Block, optional)

The space time function that determines the macroparticle flux.

currentDensityFunc (STFunc Block, optional)

The space time function that determines the current.

fluxDensityFunc (STFunc Block, optional)

The space time function that determines the flux.

Example Particle Source of kind planarPtclEmitter

<ParticleSource leftBeamEmitter>
  kind = planarPtclEmitter

  ## specify the number of particles emitted from the entire emitter each time step
  nomMacroPtclsPerStep = 5

  ## current density function
<STFunc currentDensityFunc>
  kind = expression
  expression = t / DT / 10.
</STFunc>

  ## specify a macroparticle position choosing function: bitreversed, random, or lattice
  ## (default is bitreversed)
  positionFunction = bitReversed

  # Bounds specified with physical coordinates, one dimension must have zero extent
  lowerBounds = [STARTX $Y_CENTER - 1.5 * E_RMS_WIDTH_Y$ $Z_CENTER - 1.5 * E_RMS_WIDTH_Z$]
  upperBounds = [STARTX $Y_CENTER + 1.5 * E_RMS_WIDTH_Y$ $Z_CENTER + 1.5 * E_RMS_WIDTH_Z$]

  applyTimes = [0. $1.*DT$]

  ## particle velocities
<NAFunc velocitySequence_0>
  kind = randGauss
  mean =  $E_BEAM_GAMMA * E_BEAM_SPEED$
  sigma = $E_BEAM_GAMMA * 1.e6$
</NAFunc>
<NAFunc velocitySequence_1>
  kind = randGauss
  mean = 0.
  sigma =0.0
</NAFunc>
<NAFunc velocitySequence_2>
  kind = randGauss
  mean = 0.0
  sigma = 0.0
</NAFunc>

## some other optional parameters

## specify the total current (constant, may later implement as a function of time)
#current = 6.0e-2

## vary the macroparticle density (weights may still be variable if desired)
#nonUniformMacroPtclsFlag =1

## can also give the macroparticle flux as a function
<STFunc macroFluxFunc>
  kind = expression
  expression = 1.
</STFunc>

## can also give the weight as a function, otherwise it is 1
<STFunc weightFunc>
 kind = expression
 expression = 1.
</STFunc>

</ParticleSource> # end planarPtclEmitter