piol.scharge module¶
API reference¶
- piol.scharge.schargeCoulomb(driver, pleset, ds)[source]¶
Callback function for driver to implement space charge repulsion using the Coulomb model.
Force to q_1 calculated from F_1 = sum{ 1/(2*pi*epsilon_0) * q_1*q_i*w_i/(r*v_i) }, where q_i is the charge of particle i, w_i is its weight (how many real particles per second it represents) and v_i is the velocity of the particle. The total force is summed contributions from every other particle. The model works rather well, but is slow for large number of particles and suffers from individual particle scattering events due to large forces if two particles happen to end up really close to each other.
The effect the force has on particles is calculated from F=ma and the flight time dt=ds/v.
Particle beam with current I and N simulated particles can be modelled by setting the particle weights to I/(N*q), where q is the particle charge in Coulombs.
- Parameters
driver (Driver) – The particle driver.
pleset (dict) – Dictionary containing the particle properties at the plane being processed
ds (float) – Distance travelled along beam path
- Returns
New modified set of particles.
- Return type
dict