Space charge deposition functions. More...
Go to the source code of this file.
Functions | |
void | scharge_finalize (ScalarField &scharge) |
Finalize space charge calculation. | |
void | scharge_add_from_trajectory (ScalarField &scharge, pthread_mutex_t *mutex, double IQ, const ParticleP2D &x1, const ParticleP2D &x2) |
Function for adding charge to space charge density map from particle trajectory in 2d simulation. | |
void | scharge_add_from_trajectory (ScalarField &scharge, pthread_mutex_t *mutex, double IQ, const ParticlePCyl &x1, const ParticlePCyl &x2) |
Function for adding charge to space charge density map from particle trajectory in cylindrically symmetric simulation. | |
void | scharge_add_from_trajectory (ScalarField &scharge, pthread_mutex_t *mutex, double IQ, const ParticleP3D &x1, const ParticleP3D &x2) |
Function for adding charge to space charge density map from particle trajectory in 3d simulation. |
Space charge deposition functions.
void scharge_add_from_trajectory | ( | ScalarField & | scharge, |
pthread_mutex_t * | mutex, | ||
double | IQ, | ||
const ParticleP2D & | x1, | ||
const ParticleP2D & | x2 | ||
) |
Function for adding charge to space charge density map from particle trajectory in 2d simulation.
Adds contribution to space charge density map scharge from a particle carrying current per length IQ travelling from x1 to x2. Charge density is added to the mesh assuming that it is localized at the midpoint of x1 and x2. This function is supposed to be used so that x1 and x2 are at the mesh intersection points, through which particle trajectory has passed.
void scharge_add_from_trajectory | ( | ScalarField & | scharge, |
pthread_mutex_t * | mutex, | ||
double | IQ, | ||
const ParticlePCyl & | x1, | ||
const ParticlePCyl & | x2 | ||
) |
Function for adding charge to space charge density map from particle trajectory in cylindrically symmetric simulation.
Same as for scharge_add_from_trajectory(). Now IQ is real current (A).
void scharge_add_from_trajectory | ( | ScalarField & | scharge, |
pthread_mutex_t * | mutex, | ||
double | IQ, | ||
const ParticleP3D & | x1, | ||
const ParticleP3D & | x2 | ||
) |
Function for adding charge to space charge density map from particle trajectory in 3d simulation.
Same as for scharge_add_from_trajectory(). Now IQ is real current (A).
void scharge_finalize | ( | ScalarField & | scharge | ) |
Finalize space charge calculation.
Converts charge map built by calls to scharge_add_from_trajectory() to space charge density map suitable for potential solvers. Also corrects boundary space charge values.