Magnetic Lens Creation

Initialize a magnetic lens with the same parameters as electrodes, but with a few new concepts.

Mu_r is the relative permeability- a dimensionless constant specific to what material the magnet is. Iron has ~1000, air has 1, higher values increase the flux density (magnetic field strength). MMF is the magnetomotive force- sometimes referred to as ampere-turns. This is the magnetic analogue to voltage. By specifying MMF and Mu_r you control the properties of the magnet, especially since these are applicable both to DC electromagnets and permanent magnets.

Since the paraxial ray equation can sometimes create harmless artefacts at the middle particle’s trajectories, feel free to increase nr and nz more than you would for electrostatic lenses. The multigrid handler can take it.

Picht, Display Options
12 import numpy as np
13 from picht import ElectronOptics, MagneticLensConfig
14 import matplotlib.pyplot as plt
15
16 system = ElectronOptics(nr=200, nz=400, axial_size=0.1, radial_size=0.1)
17
18 mag_config = MagneticLensConfig(
19     start=100,
20     length=50,
21     ap_start=80,
22     ap_width=40,
23     outer_diameter = 100,
24     mu_r=1000,
25     mmf=200
26 )
27 system.add_magnetic_lens(mag_config)
28
29 system.solve_fields()
30
31 trajectories = system.simulate_beam(
32     energy_eV=10000,
33     start_z=0,
34     r_range=(0.042, 0.058),
35     angle_range=(0, 0),
36     num_particles=20,
37     simulation_time=2e-9
38 )
39
40 fig = system.visualize_system(trajectories=trajectories)
41 plt.show()

Total running time of the script: (0 minutes 4.648 seconds)

Gallery generated by Sphinx-Gallery