A wide range of astrophysical sources exhibit extreme and rapidly varying electromagnetic emission indicative of efficient nonthermal particle acceleration. Understanding these sources often involves comparing data with a broad range of theoretical scenarios. To this end, it is beneficial to have tools that enable not only fast and efficient parametric investigation of the predictions of a specific scenario but also the flexibility to explore different theoretical ideas. In this paper, we introduce Tleco, a versatile and lightweight toolkit for developing numerical models of relativistic outflows, including their particle acceleration mechanisms and resultant electromagnetic signature. Built on the Rust programming language and wrapped into a Python library, Tleco offers efficient algorithms for evolving relativistic particle distributions and for solving the resulting emissions in a customizable fashion. Tleco uses a fully implicit discretization algorithm to solve the Fokker–Planck equation with user-defined diffusion, advection, cooling, injection, and escape and offers prescriptions for radiative emission and cooling. These include, but are not limited to, synchrotron, inverse-Compton, and self-synchrotron absorption. Tleco is designed to be user friendly and adaptable to model particle acceleration and the resulting electromagnetic spectrum and temporal variability in a wide variety of astrophysical scenarios, including, but not limited to, gamma-ray bursts, pulsar wind nebulae, and jets from active galactic nuclei. In this work, we outline the core algorithms and proceed to evaluate and demonstrate their effectiveness. The code is open source and available in the GitHub repository: https://github.com/zkdavis/Tleco.
Read full abstract