Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “OpenMC implementations”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

The Effect of the Flux Separability Approximation on Multigroup Neutron Transport

The angular dependence of flux-weighted multigroup cross sections is commonly neglected when generating multigroup libraries. The error of this flux separability approximation is typically not isolated from other error sources due to a lack of availability of library generation and corresponding solvers that cannot relax this approximation. These errors can now be isolated and quantified with the availability of a multigroup Monte Carlo transport and multigroup library-generation capability in the OpenMC Monte Carlo transport code. This work will discuss relevant details of the OpenMC implementation, provide an example case useful for detailing the type of errors one can expect from making the flux separability approximation, and end with more realistic problems which show the impact of the approximation and highlight how it can strongly arise from an energy-dependent resonance absorption effect. Since the angle-dependence is intrinsically linked to the energy group structure, these examples also show that relaxing the flux separability approximation with angle-dependent cross sections could be used to reduce either the fine-tuning required to set a multigroup energy structure for a specific reactor type or the number of energy groups required to obtain a desired level of accuracy for a given problem. This trade-off could increase the costs of generating multigroup cross sections, and has the potential to require more memory for storing the multigroup library during the transport calculations, but it can significantly reduce the computational time required since the runtime of a discrete ordinates or method of characteristics neutron transport solver scales roughly linearly with the number of groups.

42 ENGINEERING↗

OpenMP application experiences: Porting to accelerated nodes

As recent enhancements to the OpenMP specification become available in its implementations, there is a need to share the results of experimentation in order to better understand the OpenMP implementation’s behavior in practice, to identify pitfalls, and to learn how the implementations can be effectively deployed in scientific codes. We report on experiences gained and practices adopted when using OpenMP to port a variety of ECP applications, mini-apps and libraries based on different computational motifs to accelerator-based leadership-class high-performance supercomputer systems at the United States Department of Energy. Additionally, we identify important challenges and open problems related to the deployment of OpenMP. Through our report of experiences, we find that OpenMP implementations are successful on current supercomputing platforms and that OpenMP is a promising programming model to use for applications to be run on emerging and future platforms with accelerated nodes.

97 MATHEMATICS AND COMPUTING↗

Implementation of the D1S Methodology for Shutdown Dose Rate Calculations in the OpenMC Monte Carlo Particle Transport Code

We present an implementation of the direct one-step (D1S) methodology for shutdown dose rate (SDR) calculations in the OpenMC Monte Carlo particle transport code. In addition to being the first fully open-source D1S implementation, it is also the first to require no ad hoc source code or nuclear data library modifications. The code can seamlessly switch between production of prompt and decay photons based on a user input parameter, and the decay data needed for decay photon generation are made available through a depletion chain file, which is already used for OpenMC’s built-in depletion/activation solver. A set of Python functions significantly eases the burden of computing and applying time correction factors needed to properly account for the time dependence of radionuclide activity. To assess the accuracy of the D1S implementation, SDR calculations have been carried out for three problems: a prism of iron irradiated by 14-MeV neutrons, the ITER port plug computational benchmark, and the Frascati Neutron Generator (FNG) ITER dose rate benchmark problem from the Shielding INtegral Benchmark Archive and Database (SINBAD). For each of these problems, comparisons were made to calculations using the rigorous two-step (R2S) method. The results on the iron prism problem illustrate how the D1S method achieves superior spatial resolution compared to the R2S method without the need for spatial discretization of the activation regions. The D1S and R2S results for the ITER port plug benchmark agree well with previously reported results in the literature. While the D1S results are 10% to 15% lower than the R2S results, this may be due to stochastic uncertainty and/or spatial discretization in the R2S calculations. On the FNG dose rate benchmark problem, the D1S method produces dose rate estimates that are within 4% of the dose rates predicted using a cell-based R2S workflow. The D1S estimates of the SDR are also in reasonable agreement with the experimental measurements and show the same basic trends that have been observed in previous works. A qualitative analysis of the execution time and uncertainty for the R2S and D1S workflows suggests that the D1S method would attain a higher figure of merit.

D1S method↗

Development and validation of fully open-source R2S shutdown dose rate capabilities in OpenMC *

We present the first fully open-source capabilities for shutdown dose rate (SDR) calculations of fusion energy facilities based on the Rigorous 2-Step (R2S) methodology. These capabilities have been implemented in the OpenMC Monte Carlo particle transport code, building on its existing capabilities while also leveraging new features that have been added to the code to support SDR calculations, such as decay photon source generation. Each of the individual physics components in the R2S workflow—neutron transport, activation, decay photon source generation, and photon transport—have been verified through code-to-code comparisons with MCNP6.2 and FISPACT-II 4.0. These comparisons generally demonstrate excellent agreement between codes for each of the physics components. The full cell-based R2S workflow was validated by performing a simulation of the first experimental campaign from the Frascati Neutron Generator (FNG) ITER dose rate benchmark problem from the Shielding INtegral Benchmark Archive and Database (SINBAD). For short cooling times, the dose calculated by OpenMC agrees with the experimental measurements within the stated experimental uncertainties. For longer cooling times, an overprediction of the shutdown dose was observed relative to experiment, which is consistent with previous studies in the literature. Altogether, these features constitute a combination of capabilities in a single, open-source codebase to provide the fusion community with a readily-accessible option for SDR calculations and a platform for rapidly analyzing the performance of fusion technology.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Point containment algorithms for constructive solid geometry with unbounded primitives

Here, we present several algorithms for evaluating point containment in constructive solid geometry (CSG) trees with unbounded primitives. Three algorithms are presented based on postfix, prefix, and infix notations of the CSG binary expression tree. We show that prefix and infix notations enable short-circuiting logic, which reduces the number of primitives that must be checked during point containment. To evaluate the performance of the algorithms, each algorithm was implemented in the OpenMC Monte Carlo particle transport code, which relies on CSG to represent solid bodies through which subatomic particles travel. Two sets of tests were carried out. First, the execution time to generate a rasterized image of a 2D slice of three CSG models of varying complexity was measured. Use of both prefix and infix notations offered significant speedup over the postfix notation that has traditionally been used in particle transport codes, with infix resulting in a 6 x reduction in execution time relative to postfix for a model of a tokamak fusion device. We then measured the execution time of neutron transport simulations of the same three models using each of the algorithms. The results and performance improvements reveal the same trends as for the rasterization test, with a 5.52 x overall speedup using the infix notation relative to the original postfix notation in OpenMC for the tokamak model.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Implementation of Triply Periodic Minimal Surfaces (TPMS) as surface objects in OpenMC

Triply Periodic Minimal Surfaces (TPMS) represent a promising geometry for future fuel designs due to their significant surface-to-volume ratio, which facilitates efficient cooling of nuclear fuel, a crucial factor for safety and efficiency. Demonstrating the remarkable capabilities of TPMS fuel requires initial modeling and simulation. This paper presents an implementation of TPMS in the Monte Carlo code OpenMC, enabling reactor physics modeling of TPMS. Here, the primary advantages over traditional methods using CAD files include reduced memory requirements for computations and high-fidelity implementation. This implementation has been tested against CAD files loaded in Serpent2, yielding promising results with low biases in the $k_{\textrm{eff}}$, comparable to biases in the material balance sheet. The implementation presented in this work will be used in future reactor physics computations related to new reactor designs involving TPMS-based fuels.

11 - NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Performance improvements of the windowed multipole formalism using a rational fraction approximation of the Faddeeva function

The windowed multipole (WMP) formalism was introduced as a way to calculate Doppler broadened cross sections on the fly during Monte Carlo simulations. While more arithmetic is needed compared to point-wise cross section look-ups, performance remained competitive from the large memory reductions and sequential data access. The single most expensive function call in a depleted fuel assembly problem using WMP comes from the evaluation of the Faddeeva function, which previously relied on a highly accurate, highly-branching algorithm. This paper explores the use of rational fraction approximations tailored to the domain interest of reactor physics applications and the development of lower accuracy approximations sufficient for our application. The rational approximations were implemented and tested in OpenMC on an infinite medium problem to stress the cross section calculation routine and a PWR assembly problem. In both cases, the rational approximation nearly eliminated the ∼ 20% penalty previously observed when comparing to point-wise libraries. (authors)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Software Quality Assurance for the MOOSE-Based Open-Source Multiphysics Code Cardinal - An Expanded CI Testing Suite

Cardinal is a wrapping of the GPU-oriented spectral element Computational Fluid Dynamics (CFD) code NekRS and the Monte Carlo particle transport code OpenMC within the Multiphysics Object-Oriented Simulation Environment (MOOSE). Cardinal provides high-resolution thermal-hydraulics and/or radiation transport feedback to MOOSE multiphysics simulations. Multiphysics feedback is implemented in a geometry-agnostic manner which eliminates the need for rigid one-to-one mappings. A generic data transfer implementation also allows NekRS and OpenMC to couple to any MOOSE application, enabling a broad set of multiphysics capabilities. Cardinal simulations can also leverage combinations of MPI, OpenMP, and GPU resources. Cardinal continuous development and improvement efforts have led to the software being considered as a high-fidelity design and licensing tool for key areas of nuclear reactor relevant physics, including neutron transport, fluid flow, heat transfer, and mechanical processes. The fast development and expansion of the software from a pure R&D framework towards its application in the nuclear industry and regulation require a focus on developing, enhancing and, maintaining Cardinal’s software quality through strict adherence to a Software Quality Assurance (SQA) framework and SQA program. To facilitate compliance with SQA standards, the Cardinal SQA Program has been initiated during Fiscal Year 2023 (FY23). During the development of the Cardinal SQA Program, multiple gaps have been identified. These gaps are primarily related to model verification and code pedigree as they relate to the use of Cardinal as a safety analysis tool. These gaps have been captured in a report published in 2023. A second report highlighted the progress made during Fiscal Year 2024 (FY24) and described Argonne’s effort to document and integrate software verification within Cardinal’s software development process. This report documents a snapshot of the verification test cases currently available for Cardinal and NekRS in their assimilation into a Continuous Integration (CI) platform. Following the CI practice permits the integrating of source code changes frequently and ensuring that the integrated codebase clears the verification testing for the software. It should be noted that the SQA program itself, including the program plans, procedures, configuration management, and testing strategies, need to be developed in a future step of this task.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Progress Towards NQA-1 for Cardinal in FY25

Cardinal is a wrapping of the GPU-oriented spectral element Computational Fluid Dynamics (CFD) code NekRS and the Monte Carlo particle transport code OpenMC within the Multiphysics Object-Oriented Simulation Environment (MOOSE). Cardinal provides high-resolution thermal-hydraulics and/or radiation transport feedback to MOOSE multiphysics simulations. Multiphysics feedback is implemented in a geometry-agnostic manner which eliminates the need for rigid one-to-one mappings. A generic data transfer implementation also allows NekRS and OpenMC to couple to any MOOSE application, enabling a broad set of multiphysics capabilities. Cardinal simulations can also leverage combinations of MPI, OpenMP, and GPU resources. Cardinal continuous development and improvement efforts have led to the software being considered as a high-fidelity design and licensing tool for key areas of nuclear reactor relevant physics, including neutron transport, fluid flow, heat transfer, and mechanical processes. The fast development and expansion of the software from a pure R&D framework towards its application in the nuclear industry and regulation require a focus on developing, enhancing,and maintaining Cardinal’s software quality through strict adherence to a Software Quality Assurance (SQA) framework and SQA program. To facilitate compliance with SQA standards, the Cardinal SQA Program was initiated during Fiscal Year 2023 (FY23). During the development of the Cardinal SQA Program, multiple gaps have been identified. These gaps are primarily related to model verification and code pedigree as they relate to the use of Cardinal as an analysis tool. These gaps were captured in a report published in 2023. A second report highlighted the progress made during Fiscal Year 2024 (FY24) and described Argonne’s effort to document and integrate software verification within Cardinal’s software development process. This report documents the progress made towards NQA-1 for Cardinal in the Fiscal Year 2025 (FY25). All cases in the expanded Continuous Integration (CI) suite of NekRS are included in this report which test the solvers and modules available in NekRS exhaustively. The NekRS tests are integrated with the Cardinal CI suite and made available in publicly accessible Github documentation. Following the CI practice permits integrating of source code changes frequently and ensuring that the integrated codebase clears the verification testing for the software. Also in this report is a brief overview of the development of the Cardinal Software Quality Assurance Plan (SQAP) that was done in FY25, though it should be noted that the rest of the documentation for the SQA program needs to be developed in a future step of this task.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Computing material volume fractions on a superimposed mesh as applied to Monte Carlo particle transport simulations

Here, we present a newly implemented ray tracing algorithm in OpenMC for efficiently computing material volume fractions on superimposed meshes in complex geometries. By firing rays along each coordinate direction through the geometry, the approach accumulates track-length data in each mesh element, thereby determining the fractional composition of each material. Scaling studies on three different models—a random tetrahedra configuration, the Frascati Neutron Generator ITER dose rate benchmark, and a stellarator design—show excellent parallel performance, with nearly linear speedup on modern multi-threaded and distributed-memory systems. An analysis of the residual error relative to high-resolution reference solutions demonstrated that under optimal conditions it decreases as 1/R, where R is the number of rays fired, making it straightforward to achieve user-prescribed accuracy. This new functionality enables practical, mesh-based approaches for detailed nuclear analyses in production Monte Carlo workflows without resorting to expensive, fully conformal or unstructured meshing.

Monte Carlo↗

The Random Ray Method Versus Multigroup Monte Carlo: The Method of Characteristics in OpenMC and SCONE

The Random Ray Method (TRRM) is a recently developed approach to solving neutral particle transport problems based on the Method of Characteristics. While the method previously has been implemented only in closed-source or limited-functionality codes, this work describes its implementation in two open-source Monte Carlo codes: OpenMC and SCONE. The random ray implementations required small modifications to the existing Multigroup Monte Carlo (MGMC) solvers, offering a rare venue for redundant, fine-grained, "apples-to-apples" speed and accuracy comparisons between transport methods. To this end, TRRM and MGMC solvers are evaluated against each other using each code's native capabilities on reactor eigenvalue problems with different degrees of energy discretization. On the C5G7 benchmark (featuring only seven energy groups), TRRM achieves a maximum pin power error comparable to or lower than that of MGMC for a given run time. On a problem with 69 energy groups, MGMC is found to scale more efficiently, obtaining a lower pin power error for a given run time. However, the defining difference between the two transport methods is found to be their vastly different uncertainty distributions. Specifically, TRRM is found to maintain similar levels of accuracy and uncertainty throughout the simulation domain whereas MGMC can exhibit orders-of-magnitude greater errors in areas of the problem that feature low neutron flux. For instance, TRRM provided an up to 373 times speed advantage compared with MGMC for computing the flux in low-flux regions in the moderator surrounding the C5G7 core.

42 ENGINEERING↗

Implementation of the Windowed Multipole Method in Shift

The windowed multipole (WMP) method has been implemented in the Shift Monte Carlo (MC) radiation transport code with support for both CPU and GPU execution. With this method, small WMP data libraries (~100 MB) can be used to accurately Doppler broaden cross sections to arbitrary temperatures “on the fly” during an MC simulation. This approach yields significant memory savings relative to traditional methods, making it ideal for high-fidelity analysis such as coupled multiphysics simulations. This document provides the exact forms of the WMP equations used by Shift, as well as a detailed description of the structure of WMP HDF5 data files provided by the Massachusetts Institute of Technology (MIT). The Shift implementation has been validated against the OpenMC radiation transport code, with excellent agreement demonstrated for 70 nuclides across an operative range of temperatures. CPU and GPU performance testing using a small module reactor (SMR) problem demonstrated that this method decreases the neutron tracking rate by a factor of ~2 on the Summitdev machine. A new set of WMP data being developed in-house will employ novel methods to improve tracking rates.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

ParaStell: parametric modeling and neutronics support for stellarator fusion power plants

The three-dimensional variation inherent to stellarator geometries and fusion sources motivates three-dimensional modeling to obtain accurate results from computational modeling in support of design and analysis of first wall, blanket, and shield (FWBS) systems. Manually constructing stellarator fusion power plant geometries in computer-aided design (CAD) and defining the corresponding fusion source can be cumbersome and challenging. The open-source parametric modeling toolset ParaStell has been developed to automate construction of such geometries in low-fidelity. Low-fidelity modeling is useful during the conceptual phase of engineering design as a means of rapidly exploring the design space of a given device. The modeling capability of ParaStell includes in-vessel components and magnets, for any given stellarator configuration, using a parametric definition and plasma equilibrium data. Furthermore, the toolset automates the generation of detailed, tetrahedral neutron source definitions and DAGMC geometries for use in neutronics modeling. ParaStell assists rapid design iteration, parametric study, and design optimization of stellarator fusion cores. As a demonstration of the design iteration capability, the effect of the three-dimensional parameter space on tritium breeding and magnet shielding is investigated, using the WISTELL-D configuration as a design basis. Blanket and shield thicknesses are varied in three dimensions, using the space available between the plasma edge and magnet coils as a constraint. The corresponding effects on tritium breeding ratio and magnet heating are tallied using the open-source Monte Carlo particle transport code OpenMC. The inclusion of additional and higher-fidelity modeling capabilities is planned for ParaStell’s future, as well as its implementation in machine-driven optimization.

Moreno, Connor↗

Mesh-based multiphysics coupling acceleration for fusion neutronics through clustering for fusion blanket applications

Accurate modeling of particle transport within fusion blankets is essential for predicting performance metrics such as heat deposition and the tritium breeding ratio (TBR). However, high-fidelity coupling of thermal fluids from computational fluid dynamics (CFD) to neutronics simulations often incurs significant computational costs due to the complexity of surface intersection calculations in Monte Carlo codes. This paper presents an accelerated multiphysics coupling method for neutronics that utilizes hierarchical agglomerative clustering to map complex material property distributions to a neutronics model. Implemented within the fusion reactor design and assessment (FREDA) framework, the method leverages existing Python packages to automate the creation of clustered geometries for OpenMC. The approach is demonstrated on a sector model of an ARC-class tokamak with an immersion molten salt blanket, and an simple geometry with varying isotopic concentrations. Results show that the clustering method significantly reduces computational burden without compromising fidelity, providing a foundation for agile iteration of neutronics simulations involving multiple coupled material properties.

Bae, Jin Whan [ORNL] (ORCID:0000000326548907)↗

Collision Tracking in OpenMC: Methods and Applications in Neutron Noise, Neutron Imaging, Time-of-Flight, and Multiplicity Counting

We present the development and application of a collision tracking feature within the OpenMC Monte Carlo particle transport code, designed for diverse applications such as neutron spectroscopy, scatter camera system, neutron noise, and multiplicity counting simulations. This feature enables the tracking of individual particle collisions, with potential applications in nuclear nonproliferation, reactor physics, and nuclear security. Additionally, the feature holds potential for the calibration of neutron detectors, specifically in converting light output into energy deposited within the detectors. The implementation consists of a set of filters—such as reaction type, energy, cell, and material—that constrain the set of collisions that are tracked, extensions to the Python API to enable simple input specification, and support for writing either OpenMC’s native HDF5-based format or the Monte Carlo particle list format. This feature was added to the official OpenMC release in version 0.15.3. In this work, the feature will be applied to showcase scenarios such as time-of-flight simulations, scatter-camera imaging for neutron source localization, neutron-noise analysis to extract integral kinetic parameters such as the prompt decay constant α, and multiplicity counting to estimate the mass of special nuclear materials. Ultimately, this feature aims to expand the application scope of open-source Monte Carlo particle transport codes such as OpenMC.

Monte Carlo code↗

IRMA

IRMA (In)elastic Representation of Materials As S(α,β) evaluations IRMA turns one phonon model into three outputs that usually require three separate tool chains: an evaluated nuclear-data file, predicted neutron-scattering spectra, and scattering kernels for Monte Carlo transport. The three outputs draw on a single, consistent description of the material, so the evaluation, the spectroscopy that can validate it, and the transport that uses it always agree about the physics. Nuclear data. IRMA writes ENDF-6 File 7 thermal scattering evaluations on automatically constructed (α, β) grids. This part reimplements and generalizes NJOY's LEAPR: the classic kernels reproduce freshly generated NJOY2016 tapes digit for digit and published reference tapes to about 1e-4, and the generalized paths add the exact coherent one-phonon term, anisotropic Debye-Waller tensors, coherent elastic for arbitrary crystals, and a per-species partition for polyatomic materials. The tapes feed NJOY, AMPX, FUDGE, and every transport code downstream of them. Neutron spectroscopy. The irma.spectra forward model projects the same physics onto an instrument's kinematics and resolution: INS spectra for VISION and generic indirect geometries, and 2-D S(Q,E) powder maps for direct-geometry spectrometers, from a phonopy model or straight from a phonon DOS. It can be used to predict a proposed measurement before beam time; in analysis, it supplies the calculated single-scattering counterpart of a measured spectrum, from the same material description the evaluation was built from. Monte Carlo transport. The irma.ncrystal exporter writes per-temperature scattering kernels for the companion NCrystal plugin, so McStas, OpenMC, and other NCrystal-aware codes sample the same physics. The exported kernels carry the per-site anisotropic Debye-Waller tensors, keeping directional coherent-elastic physics that NCrystal's standard scalar treatment does not represent. With the same physics inside a transport code, an entire beamline becomes a virtual experiment: IRMA's end-to-end validation ran a custom McStas implementation of the ARCS spectrometer, assembled from the existing McVine and McStas models, against measured data. From a bare crystal structure. The irma mlip front end builds the phonon model itself: a structure file and a choice of potential are enough. Nine pretrained machine-learned interatomic potentials are supported, on a laptop CPU, with no first-principles calculation; an approximate phonon model for a new material costs minutes, not a DFT campaign, and the build emits prefilled inputs for all three outputs. The result is a good starting point rather than a finished evaluation: survey-quality physics with every parameter exposed for review. A converged atomistic calculation enters the same way, as a phonopy model, when higher fidelity is needed.

Ramic, Kemal [Oak Ridge National Laboratory (ORNL)↗

Model Development and Analysis of a High-Fidelity Neutron Transport Sensor: The Quadrupole Detector Concept for Measurement of the Neutron Flux Gradient

Accurate reconstruction of the neutron flux distribution within a reactor core is essential for safe and efficient reactor operation. Traditional power shape synthesis in Light Water Reactors relies on hundreds of in-core detectors. However, this approach becomes impractical for Advanced Reactors and Microreactors due to limited space and harsh environments. To address this challenge, we propose a data-driven methodology that combines high-fidelity modeling with real-time ex-core sensor measurements, enabling the reconstruction of core power distribution while minimizing the reliance on intrusive in-core instrumentation. This project began in FY24 and achieved two initial milestones: (1) the definition of a three-year development plan for a Digital Twin framework and (2) the development of high-fidelity neutronics models of the Purdue University Reactor One (PUR-1) using both MCNP6 and OpenMC. The PUR-1 reactor, a zero-power facility, was selected due to its suitability for neutronics-focused modeling and the availability of experimental data for validation. Both models were benchmarked using neutron flux measurements obtained from irradiated gold foils, which were strategically placed within the core during a dedicated campaign in July 2024. This report marks the continuation and completion of those foundational tasks. The OpenMC model has been refined (improved geometric accuracy, expanded cross-section libraries, and refined sampling) and validated using additional experimental data. An updated sensor design—based on quadrupole configuration—was designed to measure both ex-core flux and its spatial gradient. These measurements will serve as inputs to a neural network-based reconstruction algorithm. Finally, the methodology was demonstrated on a two-dimensional test case representative of the heterogeneous material composition of the PUR-1 reactor core. A neural network implementation of the Kirchhoff-Helmholtz integral equation was employed to solve the boundary value problem using peripheral sensor measurements. The preliminary results confirm the strong potential of the proposed approach for accurate and minimally invasive neutron flux reconstruction.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Enhancing Monte Carlo Workflows for Nuclear Reactor Analysis with Metamodel-Driven Modeling

Monte Carlo codes are essential components of many reactor physics simulation workflows as high-fidelity continuous-energy neutron transport solvers. Among Monte Carlo radiation transport codes, MCNP is particularly notable due to its diverse simulation capabilities, large user base, and long validation history. Despite being a powerful simulation tool, MCNP provides limited capabilities to allow automated execution, model transformation, or support for user-defined logic and abstractions that limit its compatibility with modern workflows. Here, to better integrate MCNP into a modern scientific workflow, we have developed an intuitive yet full-featured MCNP Application Program Interface (API) in Python, named MCNPy, which provides a specialized set of classes for MCNP input development. Moreover, to guarantee that our reading, writing, and modeling capabilities remain self-consistent (and to render the huge scope of the MCNP API manageable), we have adopted a strategy of model-driven software development in which a generalized model of the MCNP input format has been created. From this generalized model, or “metamodel,” problem-specific implementations such as an engine for input validation or a codebase for programmatic operations may be automatically generated. Since MCNPy primarily acts as a Python front-end to the underlying Java API that directly interfaces with the metamodel, it is intrinsically linked to the metamodel and thus remains maintainable. With MCNPy, users can programmatically read, write, and modify any syntactically valid MCNP input file regardless of its origin. These capabilities allow users to automate complicated tasks like design optimization and model translation for nuclear systems. As examples, this work demonstrates the use of MCNPy to find the critical radius of a plutonium sphere and to translate a 9000+ line MCNP input file into a corresponding OpenMC model.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗