Skip to main content

Solver and tracer for electrostatic problems

Project description

Traceon

Traceon is a Python library designed for the modeling of electron microscopes.

Traceon features a Boundary Element Method (BEM) solver that computes electrostatic and magnetostatic fields for accurate particle tracing. By relying on the BEM rather than FEM, Traceon offers notable improvements in speed and accuracy compared to most commercial alternatives. It supports both radially symmetric and fully 3D geometries, while leveraging advanced axial field interpolations to greatly speed up the particle tracing.

Wait, is this commercial?

The core of Traceon is completely free to use and open source, and distributed under the MPL 2.0 license. The software downloaded when using pip install traceon does not include any closed source software. There is a commercial package called traceon_pro which builds on the traceon package to provide a more capable library.

Feature Traceon Traceon Pro
Parametric mesher
Plot module
Radial symmetric solver (electrostatic, magnetostatic)
Radial symmetric particle tracer
Radial symmetric axial interpolation (fast tracing)
3D direct solver (electrostatic, magnetostatic)
3D solver using fast multipole method
3D particle tracing
3D axial interpolation (fast tracing)
Coulomb interaction

Documentation

Website

Examples

API documentation v0.10.0

API documentation v0.9.0

Installation

Install using the Python package manager:

pip install traceon

The installation is known to work on Linux, Windows and Mac OS. Please reach out to me if you have any installation problems.

Validations

To ensure the accuracy of the package, different problems from the literature have been analyzed using this software. See /validation directory for more information. The validations can easily be executed from the command line, for example:

python3 ./validation/edwards2007.py --help
python3 ./validation/capacitance-sphere.py --help
etc...

License

MPL 2.0

Help! I have a problem!

Don't worry. You can reach me.

Open an issue

Send me an email

Gallery

Image of 3D deflector Image of Dohi mirror Image of Einzel lens traces

Release notes

v0.10.0

  • Make Field a GeometricObject (which can be moved, rotated, etc)
  • Introduce FieldSuperposition class to represent summation of arbitrary fields
  • Add type hints throughout codebase
  • Add initial support for couloumb interactions while tracing (pro only)

Breaking changes

  • Tracer.__call__ now takes velocities with unit m/s instead of eV

v0.9.0

  • Add permanent magnets
  • Small improvements to geometry module (add annulus methods)
  • More general rotations for GeometricObject
  • Various bug fixes and improvements

Breaking changes

  • FieldRadialAxial was moved from solver.py to field.py

v0.8.0

  • New plotting module (charge density, equipotential lines)
  • Automatic orientation of normal vectors
  • Geometry functions for extruding/revolving edges of surfaces
  • Tracing of particles other than electrons (charge, mass as input)
  • Various bug fixes and improvements

Breaking changes:

  • Call P.show() after P.plot_mesh() to show figures
  • Normal vectors should be oriented automatically (please check if this works correctly for your geometry)

v0.7.0

  • Generate structured, high quality meshes using the new parametric mesher (drop GMSH)
  • Consistenly use 3D points and geometries throughout codebase
  • Add support for Fast Multipole Method (Traceon Pro)
  • Add support for Mac OS on x64
  • Big improvements to code quality, testing, infrastructure
  • Drop dependency on GSL

v0.6.0:

  • New methods to integrate triangle potential and field contribution over a triangle
  • Fix 3D convergence issues by more accurately calculating neighbouring triangle interactions
  • Fix error calculation in particle tracing
  • Introduce logging module to control verbosity of printing
  • Clean up unit tests
  • Remove higher order (curved) triangle support, in preparation of parametric meshers and improved FFM implementation

v0.5.0:

  • Add preliminary support for magnetostatics
  • Improve and generalize mesh class (allow import/export)
  • Make consistent use of SI units

v0.4.0:

  • Introduce Fast Multipole Method (FMM) for large 3D problems
  • Compute 3D radial expansion coefficients using analytical formulas
  • Further speed up computation of 3D radial expansion coefficients
  • Big code quality improvement of validation/ files

v0.3.0:

  • Use adaptive integration using GNU Scientific Library (GSL)
  • Add support for boundary constraint
  • Use Vedo for better plotting capabilities
  • Use higher order triangle elements for 3D (curved triangles)
  • Precompute jacobians/positions for better performance
  • First implementation of element splitting based on charges (work in progress)

v0.2.0:

  • Use higher order charge distribution on line elements in radial symmetry
  • Use higher order line elements (polynomials) in radial symmetry
  • Better integration techniques, especially with regards to the logarithmic singularities

v0.1.0:

  • Uses the powerful GMSH library for meshing
  • Solve for surface charge distribution using BEM
  • General 3D geometries and radially symmetric geometries
  • Dielectrics
  • Floating conductors
  • Accurate electron tracing using adaptive time steps
  • Field/potential calculation by integration over surface charges
  • Fast field/potential calculation by radial series expansion
  • Superposition of electrostatic fields

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traceon-0.10.0.tar.gz (95.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

traceon-0.10.0-cp37-abi3-win_amd64.whl (180.3 kB view details)

Uploaded CPython 3.7+Windows x86-64

traceon-0.10.0-cp37-abi3-manylinux_2_31_x86_64.whl (165.6 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.31+ x86-64

traceon-0.10.0-cp37-abi3-macosx_13_0_x86_64.whl (130.1 kB view details)

Uploaded CPython 3.7+macOS 13.0+ x86-64

File details

Details for the file traceon-0.10.0.tar.gz.

File metadata

  • Download URL: traceon-0.10.0.tar.gz
  • Upload date:
  • Size: 95.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for traceon-0.10.0.tar.gz
Algorithm Hash digest
SHA256 440ef2ebc020791805a6a1f164a41ea1fa3d3655ab459f16f15d24af62a09104
MD5 9f973e2328076f2daee3ccaacd982568
BLAKE2b-256 cafa8baba09943ad0bb08a575b29b90e09038d1053bc55d327a6a8b59084eb08

See more details on using hashes here.

File details

Details for the file traceon-0.10.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: traceon-0.10.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 180.3 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for traceon-0.10.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 68427d89ec69f4c21ba509b99be7fd374abec66c9ec396ce3aac7d93af25a5ff
MD5 a0e0ed2a177456f29408f97527ba93bd
BLAKE2b-256 a6ca40c6e939aefd06d6141647e484a32e2918ecc8cf3cbfffc080d24ff9142c

See more details on using hashes here.

File details

Details for the file traceon-0.10.0-cp37-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for traceon-0.10.0-cp37-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 12c3165a565961e7f8176649ae4ca5d87f689a71df748ae367372b1de52425ca
MD5 1b045106412ca996e26853b6795b789f
BLAKE2b-256 8e09066c9b867949d91cbf17733bc21a344cb646be0af7bed11cc2039d96d5de

See more details on using hashes here.

File details

Details for the file traceon-0.10.0-cp37-abi3-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for traceon-0.10.0-cp37-abi3-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 e2db4059a3f738668ab17dc7da7452d9af855ef86cf67ae492aacf965b62652e
MD5 aed28152b4ebc2ea13bb30f9f9ac5afa
BLAKE2b-256 162083ee11f78b2b4b9e235ae816f0693f2c200157cc47f3506fbdba3554ae15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page