Simulate laser cooling with rust.
New: Paper out now on arxiv
atomecs
is a rust crate for simulating the laser-cooling of atoms by optical scattering forces. It supports numerous features:
- Doppler forces on atoms that scatter light, including the random fluctuations that give rise to the Doppler temperature limit.
- Magnetic fields, implemented on a grid or through simple analytical models.
- Atoms generated by an oven.
- Atoms generated on the surface of a simulation volume (eg, a chamber).
- Cooling light beams, defined by their detuning and gaussian intensity profiles.
- Volumes that define bounds for the simulation.
- File output in binary or text format.
- Thorough unit testing to ensure simulation results are correct.
- Good parallel performance on modern multi-core CPUs
- Simulations can be wrapped using python/matlab, as shown in the source_optimisation_example or the matlab examples.
After cloning the repository, you can run examples using e.g. cargo run --release --example 1d_mot
.
If you would like to plot results, you may like to look at the matlab examples useful.
You can build the program documentation using cargo doc
.
Important note: If you receive the error 'panicked while panicking' then see this issue - you may need to use an earlier toolchain.
atomecs
follows the data-oriented Entity-Component-System (ECS) pattern, which is implemented using specs.
ECS is well suited to high-performance simulations, and is flexible enough to accomodate changing design goals.
If you are unfamiliar with this pattern, and come from an object-oriented background, it is strongly recommended that you read about it before diving into the code.
Some useful ECS resources:
- For the advantages of the pattern, see Mike Acton's GDC talk
- Although written for Unity/C#, the concepts in the Unity Entities Package Documentation are very useful to understand.
- See also the specs book which describes the ECS used in
atomecs
.
- atom-atom interactions are not implemented. Most of our current work deals with atom sources, which have low steady-state number densities, so we haven't implemented this. Results for steady-state 3D MOTs should be interpreted carefully. This will be implemented in a future
The current developers of atomecs
are:
- Xuhui Chen, Oxford
- Elliot Bentine, Oxford
- Maurice Zeuner, Cambridge
- Tiffany Harte, Cambridge
The long term goal for atomecs
is to have a simulation suite for cold atom experiments.
If you'd like to get involved in development, please do!
Development is discussed through the issues. Feel free to fork, develop features, and raise a pull request to merge your changes back into the main repository.