Package voltrace

Welcome!

Voltrace is a general software package used for numerical electron optics. Its main feature is the implementation of the Boundary Element Method (BEM) to quickly calculate the surface charge distribution. The program supports both radial symmetry and general three-dimensional geometries. Electron tracing can be done very quickly using accurate radial series interpolation in both geometries. The electron trajectories obtained can help determine the aberrations of the optical components under study.

If you have any issues using the package, please contact us at [email protected].

Usage

In general, one starts with the voltrace.geometry module to create a mesh. For the BEM only the boundary of electrodes needs to be meshed. So in 2D (radial symmetry) the mesh consists of line elements while in 3D the mesh consists of triangles. Next, one specifies a suitable excitation (voltages) using the voltrace.excitation module. The excited geometry can then be passed to the solve_direct() function, which computes the resulting field. The field can be passed to the Tracer class to compute the trajectory of electrons moving through the field.

Validations

To make sure the software is correct, various problems from the literature with known solutions are analyzed using the Voltrace software and the results compared. In this manner it has been shown that the software produces very accurate results very quickly. The validations can be found in the /validations directory in the Github project. After installing Voltrace, the validations can be executed as follows:

    git clone https://github.com/leon-vv/Voltrace
    cd voltrace
    python3 ./validation/edwards2007.py --help

Units

SI units are used throughout the codebase. Except for charge, which is stored as \frac{\sigma}{\epsilon_0} for electrostatic problems and \frac{\sigma}{\mu_0} for magnetostatic problems.

Copyright statement

All Voltrace software is © copyrighted, Voltrace Software, 2026.

Sub-modules

voltrace.coordinate_system

The coordinate system module provides the CoordinateSystem class, which represents a local coordinate frame defined by an origin point and a set of …

voltrace.excitation

The excitation module allows to specify the excitation (or element types) of the different physical groups (electrodes) created with the …

voltrace.field

Radial series expansion in cylindrical symmetry …

voltrace.focus

Module containing a single function to find the focus of a beam of electron trajecories.

voltrace.geometric_object

The geometric object module defines the GeometricObject abstract base class, which provides move, rotate, and mirror operations to any …

voltrace.geometry

The geometry module allows the creation of general meshes in 2D and 3D. The builtin mesher uses so called parametric meshes, meaning that for any …

voltrace.license

The license module provides utilities for configuring the Voltrace license. Use set_license_file_path to point Voltrace at a license file if it is …

voltrace.mesher

The mesher module provides the Mesh class, which stores the discretised geometry (points, line elements, and triangles) along with named physical …

voltrace.plotting

The voltrace.plotting module uses the pyvista plotting library to provide some convenience functions to show the line and triangle meshes …

voltrace.solver

The solver module assembles the BEM matrix, solves for the surface charge distribution, and returns the resulting field. The top-level entry points …

voltrace.tracing

The tracing module provides the Tracer class for integrating charged-particle trajectories through any Voltrace field. Helper functions such as …

voltrace.typing

The typing module collects all semantic type aliases used throughout Voltrace. They are purely for static analysis (mypy, pyright) and all resolve to …