Particle Loader¶
All kinetic particles have access to the same type of particle loader.
- load density
Whether to define the density of loaded particles by macroparticles or physical particles.
- relative density
Use a function defining the density of loaded particles in macroparticles. With constant weight particles this is a value between 0 and 1 that will be multiplied by the macroparticles per cell of the particles definition.
- physical density
Use a function defining the density of loaded particles in physical particles. With variable weight particles this value is divided by the nominal density of the particles definition and is used to modify the weight of each loaded macroparticle.
- particle load placement
Whether to use a bit-reversed or grid-defined placement of macroparticles in each cell.
- grid
Place particles equidistant on the grid lines of the simulation. Useful for starting simulations “cold”.
- macro particles per direction
A vector describing the number of macroparticles to load per cell on each axis.
- bit-reversed
Places particles according to a bit-reversed algorithm. Number of macroparticles loaded per cell is based on the value given in the weight setting of the particles definition.
- load duration
Whether to load the particles only at the beginning of the simulation or repeatedly.
- initialize only
Particles will only be loaded at the beginning of the simulation.
- repeat loading
Particles will be loaded according to the parameters below.
- start time
The time at which to start loading particles.
- stop time
The time at which to stop loading particles.
- load after initialization
Loading will repeat in all cells during the loading period.
- load upon shift
Load particles into cells brought into the simulation by a moving window.
- velocity distribution
The velocity components of particles as they are loaded.
- u0
The velocity in the 0th dimension.
- u1
The velocity in the 1st dimension.
- u2
The velocity in the 2nd dimension.
- volume
The volume in which to load particles:
cartesian 3d slab
cylindrical 2d slab
Particle Loader from File Properties¶
All kinetic particles have access to the particle loader from file. This loader will use a user supplied .dat file consisting of particle positions and velocities. This file should have at least six columns for 3D constant weight particles, separated by spaces (no commas). For constant weight particles, the six columns specify \({x, y, z, P_x, P_y, P_z}\) , where \({P_i = \gamma v_i}\). For variable weight particles, a 7th column needs to be included to specify the weight of the particle. In 2D, the user should only supply \({x, y, P_x, P_y, P_z}\) for constant weight particles and a 6th column for the weight if particles are assigned a variable weight. Likewise, in 1D, the user should only supply \({x, P_x, P_y, P_z}\) and an optional 5th column for variable weight particles. If the user supplies the weight (the last column) for constant weight particles, Vorpal will read in the data but the output will not be correct. Therefore, if the particles are constant weight, then be sure to only supply 6 columns in 3D, 5 columns in 2D, and 4 columns in 1D.
This file may then have a constant shift or custom density function applied to it, and can be reloaded multiple times during the simulation run.
- file
Filename to load from. Must be located in the simulation directory.
- particle shift in direction 0
A shift to apply to the 0th component of all loaded particles.
- particle shift in direction 1
A shift to apply to the 1st component of all loaded particles.
- particle shift in direction 2
A shift to apply to the 2nd component of all loaded particles.
- density function
A space time function which can modify the density of loaded particles.
- load period [timesteps]
If zero, particles only loaded at initialization, otherwise will load according to a specified period.