Hello,
My understanding is that simulations are more accurate if the ppc (the number of macroparticles per cell) is larger. Typically I use a number from 3 to 6, depending on the memory load. I understand that PIConGPU does not simulate the dynamics of individual particles but it does it for these macroparticles. One can then extract the real charge density based on the distribution of the microparticles. But, is there a way to plot the location of these macroparticles directly?
Thank you.
Cristian
Hello @cbontoiu . Correct, in principle the PIC method and so PIConGPU operate with macroparticles only, and all particle-related output and operations are for macroparticles.
It is possible to get localtions of macroparticles from a simulation. As part of the checkpointing or particle output, for each species there will be records positionOffset and position which together give this information. Please refer to the openPMD standard for interpretation. This combined from those two data sets location mean the center of macroparticle. You can get the spatial form from attribute particleShape (it is for the whole species + iteration, not per macroparticle). Each macroparticle also has weighting in eponymous record. So that basically has the whole information on macroparticles.
PIConGPU also has phaseSpace plugin to give a 2D histogram for the species with specified axes, we use it in some examples.
Note that formally, the PIC method does not even need the actual physics simulated to have any particles, just in our area it happens so. So one could sometimes simplify interpretation of a macroparticle as weighting x real particles distributed inside the corresponding shape with the same momentum.
As a side note, if you have constrant charge and weighting among all macroparticles of the species of interest, the charge density is just a rescaling of distribution density in coordiate space.
Oh, and another potentially useful plugin for locations of macroparticles.
<species>_macroParticlesPerSuperCell gives a histogram of how macroparticle centers are distributed in supercells. Note that charge density operate with contiguous shapes (a macroparticle's contribution is split between all supercells its shape intersects, proportionally to intersection volume, also accounts for weighting) while this one only operates with centers.
@cbontoiu Did @sbastrakov's answer solve your problem? If yes, please feel free to close this issue.
@cbontoiu Thanks for closing the issue.
Most helpful comment
@cbontoiu Did @sbastrakov's answer solve your problem? If yes, please feel free to close this issue.