Note
Go to the end to download the full example code.
Unipotential Lenses
Einzel lenses are three cylindrical lenses arranged in a specific pattern: the first electrode is grounded (0V), the second is at its focus_voltage, and the third is also grounded at (0V). They’re called unipotential lenses because they can provide beam focusing and defocusing without affecting the beam’s net energy, which reduces (sometimes!) the behavior we saw in cylindrical electrodes. Always make sure the aperture_center (in grid units) aligns with the center of the r_range() when you parameterize your beam.
We’ll first examine an example of an einzel lens used for focusing, which happens when the polarity of the focus_voltage is the same as the polarity of the charge- either negative to negative, or positive to positive. We’ll thus set it to -500V, with initial electron energies at 1keV. Observe the bulge, and then the focal point.

12 import numpy as np
13 from picht import ElectronOptics, ElectrodeConfig
14 import matplotlib.pyplot as plt
15
16 system = ElectronOptics(nr=100, nz=600, axial_size=0.6, radial_size = 0.1)
17
18 system.add_einzel_lens(
19 position=20.0,
20 width=300.0,
21 aperture_center=50.0,
22 aperture_width=48.0,
23 outer_diameter=50.0,
24 focus_voltage=-500
25 )
26
27 potential = system.solve_fields()
28
29 trajectories = system.simulate_beam(
30 energy_eV= 1000,
31 start_z=0,
32 r_range=(0.045, 0.055),
33 angle_range=(0, 0),
34 num_particles=10,
35 simulation_time=1e-7
36 )
37
38 figure = system.visualize_system(
39 trajectories=trajectories,
40 display_options=[True, False, False, False])
41
42 plt.show()
Total running time of the script: (0 minutes 5.834 seconds)