This repository contains the Neural Networks developed in the paper by Ó. Amaro et al. "Neural network sampling of Bethe-Heitler process in particle-in-cell codes" (2024).
Pre-print: https://arxiv.org/abs/2406.02491
In this work we focus on Coulomb-QED processes like Bethe-Heitler (extension to Bremsstrahlung and Trident will be pursued in the future), which can be modelled in PIC codes using Monte-Carlo approaches. Here instead of pairing of particles and binary collisions, particles interact with their local environment (atomic fields in the case of Coulomb, or laser EM fields in the case of laser QED). Cross-sections can be computationally demanding to compute in run-time. A common alternative is to use look-up-tables. Although fast, these can be innefficient for multiparameter functions, as they scale poorly in memory. Neural Networks are a promising alternative to compress the same information into fewer parameters, leveraging on the simple nonlinear activation functions.
This work was based on the comp_scatt_ML project by Chiara Badiali and Pablo Bilbao, where the pairing and scattering of binary collisions between macro-electrons and macro-photons is implemented with a Neural Network. See their publication in JPP and pre-print.
models
- directory where trained models are storedscripts
- example scripts on how to create datasets
To use the notebooks, you must first clone the git repository.
git clone https://github.com/OsAmaro/osirisBetheHeitlerML.git
The training and model weights produced in our work are contained in this repository (ZIP ~760 MB, uncompressed ~3GB). Download training data here.
To avoid issues with previously installed Python packages, we recommend creating a new virtual environment.
The open-source version (currently without the ML modules) of the OSIRIS PIC code can be found here. To access the developer maintaned version with ML modules, see here.
All figures in the manuscript should be reproducible following the instructions in the notebooks.
To train a new DNN model the following steps should be followed:
-
Generate a dataset of rates (TCS and iCDF)
-
Choose an architecture for the DNN and modify
-
Convert the model to the format required by the fortran framework that you want to link to OSIRIS (FKB to produce a text file with the model weights).
-
Run PIC simulation and compare against theory or look-up-table implementations
This article comprises part of the PhD thesis work of Óscar Amaro, which will be submitted to Instituto Superior Técnico, University of Lisbon.
The authors thank would like to acknowledge fruitful discussions with GoLP team members and for proofreading the manuscript, in particular Prof. Marija Vranic, Mr.Diogo Carvalho, Mr. Bernardo Barbosa, Mr. Pablo Bilbao, and Mr. Lucas Ansia.
If you use the code, consider citing our paper:
@misc{amaroNeuralNetworkSampling2024,
title = {Neural Network Sampling of {{Bethe-Heitler}} Process in Particle-in-Cell Codes},
author = {Amaro, {\'O}scar and Badiali, Chiara and Martinez, Bertrand},
year = {2024},
month = jun,
number = {arXiv:2406.02491},
eprint = {2406.02491},
primaryclass = {physics},
publisher = {arXiv},
urldate = {2024-06-05},
archiveprefix = {arXiv},
copyright = {All rights reserved},
keywords = {Physics - Computational Physics,Physics - Plasma Physics}
}
To learn more about Coulomb-QED processes and their implementation via look-up-tables
- PoP paper "High-energy radiation and pair production by Coulomb processes in particle-in-cell simulations" by Bertrand Martinez et al
- OSIRIS-QED extensive benchmark by Bertrand Martinez on Bethe-Heitler, Bremsstrahlung and Trident processes
- Badiali et al 2022 JPP Machine-learning-based models in particle-in-cell codes for advanced physics extensions
- comp_scatt_ML by Chiara Badiali and Pablo Bilbao
- dawson sheet model by Diogo Carvalho