diff --git a/.github/workflows/paper.yml b/.github/workflows/paper.yml new file mode 100644 index 0000000..1d7dc44 --- /dev/null +++ b/.github/workflows/paper.yml @@ -0,0 +1,24 @@ +name: Draft PDF +on: [push] + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper.pdf diff --git a/3d_tokamak_source.png b/3d_tokamak_source.png new file mode 100644 index 0000000..298402a Binary files /dev/null and b/3d_tokamak_source.png differ diff --git a/energy_spectra.svg b/energy_spectra.svg new file mode 100644 index 0000000..a0f9b8c --- /dev/null +++ b/energy_spectra.svg @@ -0,0 +1,5531 @@ + + + + + + + + 2024-11-27T11:50:40.619379 + image/svg+xml + + + Matplotlib v3.9.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/paper.bib b/paper.bib new file mode 100644 index 0000000..6ea442b --- /dev/null +++ b/paper.bib @@ -0,0 +1,47 @@ +@article{fausser_tokamak_2012, + series = {Tenth {International} {Symposium} on {Fusion} {Nuclear} {Technology} ({ISFNT}-10)}, + title = {Tokamak {D}-{T} neutron source models for different plasma physics confinement modes}, + volume = {87}, + issn = {0920-3796}, + url = {https://www.sciencedirect.com/science/article/pii/S0920379612000853}, + doi = {10.1016/j.fusengdes.2012.02.025}, + abstract = {Neutronic studies of European demonstration fusion power plant (DEMO) have been so far based on plasma physics low confinement mode (L-mode). Future tokamaks, nevertheless, may likely use alternative confinement modes such as high or advanced confinement modes (H\&A-mode). Based on analytical formulae used in plasma physics, H\&A-modes D-T neutron sources formulae are proposed in this paper. For that purpose, a tokamak random neutron source generator, TRANSGEN, has been built generating bidimensional (radial and poloidal) neutron source maps to be used as input for neutronics Monte-Carlo codes (TRIPOLI-4 and MCNP5). The impact of such a source on the neutronic behavior of the European DEMO-2007 Helium-cooled lithium–lead reactor concept has been assessed and compared with previous results obtained using a L-mode neutron source. An A-mode neutron source map from TRANSGEN has been used with the code TRIPOLI-4. Assuming the same fusion power, results show that main reactor global neutronic parameters, e.g. tritium breeding ratio and neutron multiplication factor, evolved slightly when compared to present uncertainties margin. However, local parameters, such as the neutron wall loading (NWL), change significantly compared to L-mode shape: from −22\% to +11\% for NWL.}, + language = {en}, + number = {5}, + urldate = {2021-09-21}, + journal = {Fusion Engineering and Design}, + author = {Fausser, Clement and Puma, Antonella Li and Gabriel, Franck and Villari, Rosaria}, + month = aug, + year = {2012}, + keywords = {DEMO, Neutronics, TRIPOLI-4, Plasma source description}, + pages = {787--792}, +} + +@article{romano_openmc_2015, + series = {Joint {International} {Conference} on {Supercomputing} in {Nuclear} {Applications} and {Monte} {Carlo} 2013, {SNA} + {MC} 2013. {Pluri}- and {Trans}-disciplinarity, {Towards} {New} {Modeling} and {Numerical} {Simulation} {Paradigms}}, + title = {{OpenMC}: {A} state-of-the-art {Monte} {Carlo} code for research and development}, + volume = {82}, + issn = {0306-4549}, + shorttitle = {{OpenMC}}, + url = {https://www.sciencedirect.com/science/article/pii/S030645491400379X}, + doi = {10.1016/j.anucene.2014.07.048}, + abstract = {This paper gives an overview of OpenMC, an open source Monte Carlo particle transport code recently developed at the Massachusetts Institute of Technology. OpenMC uses continuous-energy cross sections and a constructive solid geometry representation, enabling high-fidelity modeling of nuclear reactors and other systems. Modern, portable input/output file formats are used in OpenMC: XML for input, and HDF5 for output. High performance parallel algorithms in OpenMC have demonstrated near-linear scaling to over 100,000 processors on modern supercomputers. Other topics discussed in this paper include plotting, CMFD acceleration, variance reduction, eigenvalue calculations, and software development processes.}, + language = {en}, + urldate = {2022-03-31}, + journal = {Annals of Nuclear Energy}, + author = {Romano, Paul K. and Horelik, Nicholas E. and Herman, Bryan R. and Nelson, Adam G. and Forget, Benoit and Smith, Kord}, + month = aug, + year = {2015}, + keywords = {Monte Carlo, Parallel, HDF5, Neutron transport, OpenMC, XML}, + pages = {90--97}, + file = {ScienceDirect Snapshot:C\:\\Users\\remidm\\Zotero\\storage\\7Z6DVQXL\\S030645491400379X.html:text/html}, +} + +@software{Crilly_NESST_-_Neutron_2024, + author = {Crilly, Aidan}, + month = apr, + title = {{NESST - Neutron Scattered Spectra Tool, ICF primary and scattered neutron spectroscopy analysis code}}, + url = {https://github.com/aidancrilly/NeSST}, + version = {1.0.0}, + year = {2024} +} \ No newline at end of file diff --git a/paper.md b/paper.md new file mode 100644 index 0000000..5301692 --- /dev/null +++ b/paper.md @@ -0,0 +1,85 @@ +--- +title: 'openmc-plasma-source: Pre-built Fusion Neutron Sources for OpenMC' +tags: + - Python + - OpenMC + - neutron sources + - fusion +authors: + - name: Remi Delaporte-Mathurin + corresponding: true + orcid: 0000-0003-1064-8882 + affiliation: 1 + - name: Jonathan Shimwell + orcid: 0000-0001-6909-0946 + affiliation: 2 + +affiliations: + - name: Plasma Science and Fusion Center, MIT, USA + index: 1 + - name: Proxima Fusion, Germany + index: 2 + +date: 26 November 2024 +bibliography: paper.bib + +--- + +# Summary + +`openmc-plasma-source` is a Python-based package offering a collection of pre-built neutron sources designed for fusion applications using the Monte Carlo particle transport code OpenMC [@romano_openmc_2015]. +By providing ready-to-use implementations for various neutron source configurations, such as tokamak, ring, and point sources, this package simplifies the often complex task of neutron source definition in fusion-related Monte Carlo simulations. +These sources are parameterised to account for spatial distributions, plasma temperatures, plasma pressure, and fusion fuel compositions. +DT (deuterium, tritium) plasmas with any ratio of D and T are supported including pure DD and pure TT plasmas. +The package computes spatial distributions of temperature and density and accounts for them when computing the spatially distributed reactivity for the different fusion reactions possible with the fuel composition. +The temperature, density and fuel composition are accounted for when producing the neutron energy distribution which also varies spatially. +The approach taken is also computationally efficient by making use of rotational symmetry to reduce the size of the source definition. + +The package is designed to integrate seamlessly into OpenMC workflows, allowing users to define sources in just a few lines of Python code. +It also supports advanced features like temperature-based neutron spectra and spatial source distributions, making it an invaluable tool for researchers simulating neutron behaviour in fusion devices. + +# Statement of need + +Accurate modelling of neutron sources is critical for fusion energy research, underpinning tasks such as reactor shielding design, material testing, and tritium breeding analysis. +In this context, OpenMC is a widely used tool for neutron transport simulations [@romano_openmc_2015]. +However, creating realistic neutron source models for fusion applications can be a time-consuming and error-prone process, requiring detailed knowledge of plasma physics and significant coding effort. + +Traditionally, researchers have implemented their own custom neutron source definitions, which often results in redundant work and inconsistencies between studies. +For example, spatial distributions, temperature effects, and fuel compositions must be correctly parameterised to ensure the fidelity of the simulations. +The lack of standardised tools for these tasks introduces variability, potential errors in simulations and a lack of reproducibility. + +`openmc-plasma-source` addresses these challenges by providing a standardised and easy-to-use interface for defining neutron sources in OpenMC. +The package implements the equations for neutron distributions based on established models, such as those described in @fausser_tokamak_2012 and fusion energy spectra from the NeSST tool [@Crilly_NESST_-_Neutron_2024]. +By automating the setup process and including extensive documentation and examples, it reduces barriers to entry for researchers new to OpenMC or neutron source modelling. + +# Pre-Built Configurations + +With pre-built configurations for tokamak, ring, and point sources, `openmc-plasma-source` is suitable for a wide range of applications. For example: + +- The **tokamak source** models realistic spatial and temperature distributions, optimised for computational efficiency through the use of ring sources (see \autoref{fig:tokamak_source} and \autoref{fig:3d_tokamak_source}). +- The **ring source** offers a simplified yet effective representation for cylindrical geometries. +- The **point source** is ideal for preliminary studies or cases requiring a concentrated neutron emission found in inertial confinement fusion or sealed-tube neutron generators. + +![Spatial neutron source density distributions of a tokamak source.\label{fig:tokamak_source}](https://user-images.githubusercontent.com/40028739/135100022-330aa51c-e2a2-401c-9738-90f3e99c84d4.png){ width=50% } + +![3D representation of a tokamak source.\label{fig:3d_tokamak_source}](3d_tokamak_source.png){ width=50% } + +# Custom Energy Spectra + +`openmc-plasma-source` allows for customisation of neutron energy spectra based on varying fusion fuel compositions and spatial parameters. +Users can define different fuel mixtures (e.g., DT, DD, TT) with associated spatially resolved temperature and density profiles, ensuring accurate and precise energy distributions. +This flexibility is crucial for capturing the full range of neutron behaviours in complex fusion scenarios (see \autoref{fig:energy_spectra}). + +![Neutron Energy Spectra for different fusion fuels.\label{fig:energy_spectra}](energy_spectra.svg) + +The package’s open-source nature and community-driven development further ensure its adaptability and relevance to the evolving needs of the fusion research community. + +# Example usage + +Examples can be found in the examples folder of the repository. + +# Acknowledgements + +We acknowledge contributions from the OpenMC development team and the fusion energy community for their feedback and support. + +# References