To absorb particles on conductor objects, a particle scraper must be created. The objects which should scrape particles are passed into the scrapers. In this example, target is a cylinder that will absorb all of the particles that hit it.
If particles will be absorbed on multiple conductors, the list is given to the particle scraper. For example:
Additionally, once the scraper is created, new conductors can be registered.
In general, only one scraper should be created.
Note that conductor objects can have an identification number, which is stored in condid. For the particle scraping to work properly, this number must be nonzero, and each conductor registered must have a unique condid. If the condid is not specified when creating the objects, it will by default have a unique condid.
Also note that the conductors used for particle scraping can be the same ones used in the field solution, but do not have to be.
The ParticleScraper class is defined in the python file particlescraper.py.
This will plot a grid in the z-x plane showing where particles will be examined for scraping. The grid is used to select particles that are near a conductor surface - only those particles are checked if they are inside the conductor.
The following function will cause beam species particles above a specified radius to be scraped.
This function is then installed so that it will be called during the particle scraping.
The scraping will occur each time step.
If the lost particles are being saved, i.e. top.lsavelostpart=1, the particles scraped by this method will be saved. If this is not desired, gaminv can be set to -1 and the particles will be scraped but not saved.
By default, Warp does not keep track of lost particles - they are just deleted. There are ways, however, of saving the lost particles. The simplest is to set the flag telling Warp to save them.
The lost particles can be accessed similarly to live particles. The following will return the x position of the lost particles for the beam species - this is the x position where the particles were lost.
The same argument can be given to the plot commands. This will plot the lost particles in the z-x plane.
A useful diagnostic that is always saved is lostpars, which holds the number of lost particles as a function of z in the beam frame. This is saved for each species. The following will plot the number of lost beam particles.
When using the particle scraper, there is an option, lcollectlpdata, to save lost particle statistics for the conductors.
After running the simulation, there are various methods for each of the conductors to post-process the saved data.
There is online documentation that can be obtained by this:
The data saved also includes particles emitted from the conductor and image charges.