Skip to content

Particle-tracking code that models strong-field QED interactions

License

Notifications You must be signed in to change notification settings

tgblackburn/ptarmigan

Repository files navigation

Ptarmigan

OpenMPI build status MPICH build status version license

Simulate the interaction between a high-energy particle beam and an intense laser pulse, including the classical dynamics and strong-field QED processes.

A laser pulse (left) collides with a beam of electrons (right), lauching an electromagnetic shower

What's included

A summary of Ptarmigan's physics coverage can be found here.

Build

All of Ptarmigan's default dependencies are Rust crates, which are downloaded automatically by Cargo. Building the code in this case is as simple as running:

cargo build --release [-j NUM_THREADS]

where NUM_THREADS is the number of separate threads that Cargo is allowed to spawn.

The following optional features are available:

  • with-mpi, which enables parallel processing via MPI. Requires an MPI library (Ptarmigan is tested against OpenMPI and MPICH) and the Clang compiler.
  • hdf5-output, which enables output of complete particle data as an HDF5 file. Requires libhdf5. If with-mpi and hdf5-output are both specified, the HDF5 library must have been compiled with MPI support.

To build with a combination of these features, run:

cargo build --release --features with-mpi,hdf5-output [-j NUM_THREADS]

The Ptarmigan changelog can be found here.

Instructions for building the code on Windows can be found here.

Specify problem

Ptarmigan takes as its single argument the path to a YAML file describing the input configuration. Output is automatically written to the same directory as this file. The inputs for some test problems can be found in examples. Starting from scratch, the input needs to contain the following sections:

  • laser
  • beam

and optionally

  • control
  • constants
  • output
  • stats

The structure of the input file is described in detail here.

Run

Assuming Ptarmigan has been downloaded to ptarmigan and already built,

cd ptarmigan
[mpirun -n np] ./target/release/ptarmigan path/to/input.yaml

will run the code, parallelized over np MPI tasks (if MPI support has been enabled).

Output

The code bins the final-state particles to generate the distribution functions requested in the input file, which are written in plain-text or FITS format.

If hdf5-output is enabled, complete data about all particles can be written as a single HDF5 file.

Contribute

Pull requests, bug fixes and new features, are welcome!

Contributors:

  • Tom Blackburn
  • Kyle Fleck

Reference

The main reference for Ptarmigan is

T. G. Blackburn, B. King and S. Tang, "Simulations of laser-driven strong-field QED with Ptarmigan: Resolving wavelength-scale interference and ɣ-ray polarization," Physics of Plasmas 30, 093903 (2023), arXiv:2305.13061 [hep-ph]

and individual releases are archived on Zenodo.

About

Particle-tracking code that models strong-field QED interactions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages