- randdenssrc
randDensSrc
Note
This source has been deprecated. Please use the xvLoaderEmitter kind with a PositionGenerator of kind bitRevSlabPosGen instead.
This particle source is an emitter, which uses bit-reversal with a standard pseudo-random number generator. While this source was originally designed for Cartesian simulations, it may also be used in a ZR cylindrical coordinate system.
This particle source is available with a VSimVE or VSimPD license.
randDensSrc Sub-Blocks
STFunc Block (optional block):
- macroDensFunc (default = 1)
The value for
<STFunc macroDensFunc>should be a number between0and1, inclusive. A uniform random number is selected for each particle load attempt, and if the random number is less than the value ofmacroDensFunc, then it is loaded, otherwise it is not loaded. Use this to create a non-uniform loading density.
NAFunc Block (optional block):
- velocitySequence\_0
The
<NAFunc velocitySequence_0>block defines sequences of numbers to represent the physical characteristics of particles defined by a ParticleSource. Initial particle velocities, for example, can be defined using anNAFuncwhich samples values from an analytic velocity distribution. AnNAFuncblock can be named one of:velocitySequence_0
velocitySequence_1
velocitySequence_2
velocitySequence_3
velocitySequence_4
velocitySequence_5
The
velocitySequence_0,velocitySequence_1, andvelocitySequence_2blocks always define the initial 3-component velocities of individual particles in the particle velocity space.The
velocitySequence_3block defines the next particle component, which will vary from one species kind to another. See Velocities and Internal Variables of Particles for a table of internal variables by species kind. For example, it may set initial values for particle weights. For fixed-weight particles theseNAFuncblocks can be set to a constant value usingkind=constNAFunc. For variable-weight particles more general distributions can be specified, as outlined in the NAFunc Block documentation.
randDensSrc Parameters
- density (double)
Positive value describing the density of the particles. This value is typically equivalent to the specified nominal density, however sometimes a scaling factor is used to load the particles more slowly, and prevent high frequency oscillations.
- applyPeriod (integer)
Positive value n, directing the simulation to apply the source at every nth time step.
- 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.
- 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.
Example Particle Source of Kind randDensSrc
<ParticleSource InitElecDeposition>
kind = randDensSrc
lowerBounds = [$XSTART+DX$ YSTART]
upperBounds = [$XEND-DX$ YEND]
density = $NOMDEN/100.$ # used to prevent high frequency oscillations when loading particles
applyTimes = [0. LOADTIME]
# Unit probability
<STFunc macroDensFunc>
kind = constantFunc
amplitude = 1.
</STFunc>
</ParticleSource>
Example Use of velocitySequence in a Particle Source
# Species kind = relBorisVWTagged, which has components x,y,z,ux,uy,uz,tag,weight
<ParticleSource gridSrc>
kind = gridDenSrc
density = PTCL_DENSITY
numPerDir = [1 1 1]
lowerBounds = [XSTART YSTART ZSTART]
upperBounds = [XEND YEND ZEND]
# Particle distribution uniform over initial phase space
<NAFunc velocitySequence_0> # ux
kind = bitRevNAFunc
</NAFunc>
<NAFunc velocitySequence_1> # uy
kind = randGamma
mean = MEAN_VEL
sigma = SIGMA_VEL
</NAFunc>
<NAFunc velocitySequence_2> # uz
kind = randKappa
sigmas = [$0.8*SIGMA_VEL$ SIGMA_VEL $1.2*SIGMA_VEL$]
</NAFunc>
<NAFunc velocitySequence_3> # tag
kind = randGaussLimit
mean = MEAN_VEL
sigma = SIGMA_VEL
lowerLimit = $2.*MEAN_VEL/3.$
upperLimit = $4.*MEAN_VEL/3.$
</NAFunc>
<NAFunc velocitySequence_4> # weight
kind = sysRandom
</NAFunc>
</ParticleSource>