ChargedParticles.jl
A Julia package for representing charged particles inspired by PlasmaPy's particles subpackage.
Overview
ChargedParticles.jl provides a flexible type system for working with various particles including elementary particles, ions, and isotopes. It supports multiple string formats and construction methods, making it easy to work with common particles in plasma physics.
Features
- Support for elementary particles, ions, and isotopes
- Flexible string-based particle construction with common particle aliases
- Physical properties (mass, charge, atomic number, charge number, etc.)
- Integration with Mendeleev.jl for chemical element data
Installation
using Pkg
Pkg.add("ChargedParticles")
Quick Example
using ChargedParticles
# Create common particles
e = electron()
p = proton()
α = particle("alpha")
# Create ions and isotopes
fe = particle("Fe-56 3+") # Iron(III) ion
fe54 = particle(:Fe, 3, 54)
d = particle("D+") # Deuteron
# Access properties
println("Electron mass: ", mass(e))
println("Alpha particle charge: ", charge(α))
println("Iron(III) ion charge: ", charge(fe))
println("Iron-54 mass number: ", mass_number(fe54))
println("Deuteron mass: ", mass(d))
Electron mass: 9.1093837015e-31 kg
Alpha particle charge: 3.204353268e-19 C
Iron(III) ion charge: 4.806529901999999e-19 C
Iron-54 mass number: 54
Deuteron mass: 3.343583748273425e-27 kg
Related Packages
- PlasmaPy: A Python package for plasma physics.
- Mendeleev.jl: A Julia package for accessing periodic table data.
- Corpuscles.jl: A Julia package for for particle physics.