Search NASA⌕ Search

SEARCH · Search NASA

Results for “Monte Carlo codes”

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.

At least 19 records

Automated Hybrid Variance Reduction on Advanced Architectures in the Shift Monte Carlo Code

Monte Carlo transport methods are the most accurate schemes for solving problems with complex energy and spatial features, but they come with a high computational cost. Although hybrid methods have enabled the use of Monte Carlo transport for a large class of problems, they still require significant computing resources. Modern multicore CPUs with large numbers of compute cores and graphical processing units (GPUs) provide opportunities to optimize the memory and run-time costs of hybrid Monte Carlo methods. This paper documents the development and analysis of three Monte Carlo transport algorithms that support hybrid transport using the consistent adjoint-driven importance sampling (CADIS) and forward-weighted CADIS methods in the Shift Monte Carlo code: history-based transport using static and dynamic threading on multicore CPUs and event-based transport enabling weight window tracking on GPUs. The results are shown for two challenging hybrid problems on the Frontier supercomputer at the Oak Ridge Leadership Computing Facility. The results show that all three methods yield good performance and enable solutions of difficult fixed-source transport problems in less than 2 min on 20 nodes of Frontier. Dynamic threading was observed to give up to 20% better scaling behavior than static threading. Moreover, the AMD Instinct 250X GPU was found to give 9 to 11 times greater throughput per graphics compute die than the best CPU performance. In conclusion, additional opportunities for optimization of hybrid transport on GPUs are discussed.

Denovo↗

RASPA3

RASPA3, a molecular simulation code for computing adsorption and diffusion in nanoporous materials and thermodynamic and transport properties of fluids. It implements force field based classical Monte Carlo/molecular dynamics in various ensembles. RASPA3 is rewritten from the ground up in C++23 with speed and code readability in mind. Transition-matrix Monte Carlo is added to compute the density of states and free energies. The Monte Carlo code for rigid molecules is based on quaternions, and the atomic positions needed in the energy evaluation are recreated from the center of mass position and quaternion orientation. The expanded ensemble methodology for fractional molecules, with a scaling parameter λ between 0 and 1, now also keeps track of analytic expressions of dU/dλ, allowing independent verification of the chemical potential using thermodynamic integration. The source code is freely available under the MIT license on GitHub.

Dubbeldam, David↗

Efficient continuous Energy-Multigroup hybrid depletion scheme using the Shift Monte Carlo code. Part I: Energy condensation sensitivity analysis

Monte Carlo (MC) codes coupled to depletion solvers are increasingly used to provide high fidelity fuel cycle modeling capabilities. Here, these coupled depletion-MC tools produce accurate results in general but can experience nonphysical spatial oscillations when time steps are large or when a system’s dominance ratio approaches unity. Two substepping techniques have been developed previously to remedy and dampen these spatial oscillations without needing to reduce step sizes. The first approach relied on higher-order techniques to account for spectral changes within steps (extrapolation and interpolation techniques). The second approach used the first order perturbation (FOP) theory to account for the change in the one-group spatial flux distribution within steps. This paper develops a hybrid depletion methodology which, in a way, combines how the flux is handled in both substepping techniques. Specifically, the multigroup (MG) MC Shift code is used to update the flux distribution within steps rather than a one-group FOP solver. A fully reflected pincell is investigated, which is not spatially dependent in the MG representation. Thus, the analysis in this paper is an initial demonstration of hybrid depletion. An upcoming companion paper will focus on how the hybrid depletion dampens spatial oscillations. The hybrid depletion approach is verified to be consistent with previous constant extrapolation depletion (CED) methods. This paper finds that the hybrid CED exhibits some error in the eigenvalue and one group constants within macro steps. To address this discrepancy, a simple interpolation scheme (CELI) is investigated. This work found that CELI sufficiently addresses the discrepancy in spectrum for macro steps up to 100 days. Overall, this work demonstrates that the hybrid depletion method can significantly reduce the number of high fidelity MC executions in a MC-coupled depletion with an acceptable eigenvalue error.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Preliminary estimates of nucleon fluxes in a water target exposed to solar-flare protons: BRYNTRN versus Monte Carlo code

A baryon transport code (BRYNTRN) has previously been verified using available Monte Carlo results for a solar-flare spectrum as the reference. Excellent results were obtained, but the comparisons were limited to the available data on dose and dose equivalent for moderate penetration studies that involve minor contributions from secondary neutrons. To further verify the code, the secondary energy spectra of protons and neutrons are calculated using BRYNTRN and LAHET (Los Alamos High-Energy Transport code, which is a Monte Carlo code). These calculations are compared for three locations within a water slab exposed to the February 1956 solar-proton spectrum. Reasonable agreement was obtained when various considerations related to the calculational techniques and their limitations were taken into account. Although the Monte Carlo results are preliminary, it appears that the neutron albedo, which is not currently treated in BRYNTRN, might be a cause for the large discrepancy seen at small penetration depths. It also appears that the nonelastic neutron production cross sections in BRYNTRN may underestimate the number of neutrons produced in proton collisions with energies below 200 MeV. The notion that the poor energy resolution in BRYNTRN may cause a large truncation error in neutron elastic scattering requires further study.

Shinn, Judy L.↗

Benchmarking Monte Carlo codes for the modelling of low-energy neutron production target reactions

The increasing adoption of accelerator-based neutron sources (ABNS) for applications including neutron capture therapy (NCT) research has highlighted the need for accurate simulation tools. Precise modelling of the neutron production target is crucial to ensure that simulated predictions of neutron beam characteristics used for subsequent beam shaping assembly design are reliable. This work presents a comprehensive benchmarking of four widely-used Monte Carlo codes - Geant4, PHITS, FLUKA (CERN), and MCNP - for modelling low-energy neutron production target reactions. Using their recommended physics models and cross-section libraries, we evaluate each code’s performance in simulating four beam-target reactions: 7 Li(p,n) 7 Be, 9 Be(p,n) 9 B, 9 Be(d,n) 10 B, and C(d,n)N. Predictions of neutron yield, angular distributions, and energy spectra are compared against available thick target experimental data. Results show varying levels of agreement between the codes depending on the reaction type, energy range, and beam characteristics. Geant4, MCNP and PHITS are the overall best performing codes for the simulation of total neutron yield and yield in the forward direction across most reactions. Across energies where experimental benchmarks exist, inter-code discrepancies in total and forward-directed yield are typically 10 to 30%, with larger deviations at near-threshold incident ion energies. PHITS provides the best overall reproduction of experimental spectra, particularly for the 9 Be(p,n) 9 B reaction. Additionally, PHITS demonstrates superior computational performance for most reactions. These findings provide valuable guidance for ABNS design, highlighting the strengths and limitations of each code for the simulation of low-energy neutron production reactions.

43 PARTICLE ACCELERATORS↗

Using the FLUKA Monte Carlo Code to Simulate the Interactions of Ionizing Radiation with Matter to Assist and Aid Our Understanding of Ground Based Accelerator Testing, Space Hardware Design, and Secondary Space Radiation Environments

Designing hardware to operate in the space radiation environment is a very difficult and costly activity. Ground based particle accelerators can be used to test for exposure to the radiation environment, one species at a time, however, the actual space environment cannot be duplicated because of the range of energies and isotropic nature of space radiation. The FLUKA Monte Carlo code is an integrated physics package based at CERN that has been under development for the last 40+ years and includes the most up-to-date fundamental physics theory and particle physics data. This work presents an overview of FLUKA and how it has been used in conjunction with ground based radiation testing for NASA and improve our understanding of secondary particle environments resulting from the interaction of space radiation with matter.

Reddell, Brandon↗

Initial validation of ALFRED: A Monte Carlo code built on Geant4 for TREAT energy deposition

Predicting the energy deposited in the specimen during an experiment in the Transient Reactor Test (TREAT) Facility is a complex problem due to the nature of the transients occurring in the reactor. In addition, the many particles contributing to energy deposition have different behavior in time and space. ALFRED, a new Geant4 based code, is developed to transport and simulate each particle generated in the core. This code is verified against OpenMC (Open Monte Carlo) on the Godiva benchmark and a simple TREAT model. Next, the energy deposition in TREAT is calculated: 181.05 ± 0.01 MeV for the “instantaneous” energy deposition (which accounts for the energy deposited within 1 s after neutron emission) in fuel and 189.90 ± 0.01 MeV for the total energy deposition in fuel. We discuss these results in this paper with previous calculations and experimental evaluations. This work demonstrates ALFRED’s potential as a high-fidelity tool for computing the spatial and temporal energy deposition in TREAT paving the way for a better understanding of the energy coupling factors in TREAT.

73 - NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Coupling Carbon Oxidation and Surface Recession in Direct-Simulation Monte Carlo Code, SPARTA

Ablative thermal protection system (TPS) materials for spacecraft are composites that are often made out of carbon-based reinforcement and a polymeric matrix. They endure high-temperature oxidation and surface recession when re-entering Earth’s atmosphere. Ablation is the result of many coupled and competing thermal, mechanical, and chemical phenomena, and it is difficult to isolate the role of each on the overall degradation of the TPS. Here we develop an ablation model for material recession coupled explicitly to finite rate carbon oxidation in complex microstructures. In this work, Stochastic PArallel Rarified-gas Time-accurate Analyzer (SPARTA), a direct-simulation Monte Carlo (DSMC) code, is modified to allow oxidation-driven ablation of implicitly defined carbon surfaces. In SPARTA, implicit surfaces are generated from the grid corner point values via a marching cubes algorithm, therefore creating a new set of surface elements every time ablation is performed. The finite-rate oxidation model developed by Gopalan et. al, was adapted to tally surface reactions and other surface data on a per-grid cell basis. The ablation functionality was also adjusted so once the reactions have occurred, the number of reactions leading to CO formation can be converted to corner point reduction values; therefore, carbon removal is directly proportional to surface recession. We also develop robust algorithms which handle the evolution of the flow cells and solid material regions, including split cells (flow cell divided in two by a solid surface). Finally, we demonstrate our implicit chemistry model for 2D and 3D geometries by producing reaction statistics and detailed visualization of oxidation-induced material recession at the microscale.

V Arias↗

Development of Accelerated Kinetic Monte Carlo Code for Simulation of Helium Bubble Evolution

A mesoscale model to predict helium bubble evolution is needed for tritium applications. Such a model requires that the conventional kinetic Monte Carlo (kMC) simulations be significantly accelerated. The objective of this report is to (a) highlight the concepts and mathematical expressions of the accelerated method for defect implementation that have not been published, (b) show an example input file to run the kMC code, and (c) provide suggestions on future improvement following my retirement.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Simulation of the radiological impact during selected space travel scenarios using the Monte Carlo code FLUKA

Radiation is one of the major challenges of space exploration and can negatively impact both biological and electronic systems, particularly in the case of long-term journeys or if the spaceship features inadequate shielding. Here, in this work, the cumulative dose levels from prompt radiation in the spacecraft are quantified alongside the residual dose contributions arising from activation of vessel components. The radiological impact was assessed for various space exploration scenarios, considering the same spaceship model featuring three shielding design variants. In each scenario, the radiation environment was generated with the Monte Carlo particle transport and interaction code FLUKA. These results can be used to quantify the contribution of prompt and residual dose in spacefaring ventures and help determine optimal radiation shielding needed to mitigate the overall radiological impact on both astronauts and equipment.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

A Large-Particle Monte Carlo Code for Simulating Non-Linear High-Energy Processes Near Compact Objects

High-energy radiation processes in compact cosmic objects are often expected to have a strongly non-linear behavior. Such behavior is shown, for example, by electron-positron pair cascades and the time evolution of relativistic proton distributions in dense radiation fields. Three independent techniques have been developed to simulate these non-linear problems: the kinetic equation approach; the phase-space density (PSD) Monte Carlo method; and the large-particle (LP) Monte Carlo method. In this paper, we present the latest version of the LP method and compare it with the other methods. The efficiency of the method in treating geometrically complex problems is illustrated by showing results of simulations of 1D, 2D and 3D systems. The method is shown to be powerful enough to treat non-spherical geometries, including such effects as bulk motion of the background plasma, reflection of radiation from cold matter, and anisotropic distributions of radiating particles. It can therefore be applied to simulate high-energy processes in such astrophysical systems as accretion discs with coronae, relativistic jets, pulsar magnetospheres and gamma-ray bursts.

Stern, Boris E.↗

Adding GPU Support to the Markov Chain Monte Carlo Code Catmip

In geophysics, we are confronted with many under-determined inverse problems. For example, all of our observations of earthquakes are made at the Earth’s surface. So, when we try to infer how slip during an earthquake evolves in space and time, we find that there are many potential slip histories that are consistent with our limited observations and our understanding of earthquake physics. One way to approach these problems is with Bayesian analysis which allows us to infer the ensemble of all potential slip models that satisfy the observations and our prior knowledge of earthquake physics. In Bayesian analysis, our prior knowledge is known as the prior probability density function or prior PDF, the fit to the data is known as the data likelihood, and the target PDF that satisfies both the prior PDF and data likelihood is known as the posterior PDF. However, simulating the posterior PDF typically requires using Markov Chain Monte Carlo (MCMC) to draw tens of billions of random realizations of earthquake slip models, which may not be computationally feasible. To make this and similar geophysical inversions computationally tractable, we developed the Cascading Adaptive Transitional Metropolis In Parallel (CATMIP) algorithm. CATMIP is an efficient parallel Markov Chain Monte Carlo (MCMC) sampler that is used for model fitting and uncertainty quantification in geophysics. Example use cases are earthquake rupture modeling, determining mineral composition on Mars, reconstructing the history of ocean salinity, and historical earthquake relocation. CATMIP employs many parallel instances of the Metropolis algorithm for sampling in a transitioning framework. Transitioning is a process in which a set of random samples at equilibrium with a known probability density function (PDF) are used as seeds for the Markov chains to sample successive target PDFs that incrementally move the distribution from the starting seeds to the final desired PDF that describes the relative plausibility of potential values for the model parameters. The algorithm is implemented as a Master-Worker model employing MPI for communication. The worker processes are loosely coupled with global parameters periodically optimized by the master process. This provides a very high amount of parallelism with little communication between updates. During the presentation we will discuss the history of the algorithm and elaborate the earthquake rupture modeling use case for the CATMIP package. Our first step toward GPU optimization was to optimize the code for the CPU. CPU profiling revealed that most of the compute time is spent in calls to level 2 BLAS routines and calls to GSL random number generators. We revised the algorithm to employ level 3 BLAS routines instead. In our presentation we will describe how this was accomplished. Adding GPU support to CATMIP consisted mostly of replacing the calls to GSL with calls to GPU vendor-provided library routines. A small number of loops were directly implemented in CUDA. In the presentation will provide implementation details. Finally, we will discuss methods for profiling and opportunities for further optimizing GPU execution. By creating a code with the flexibility to run on either a CPU or GPU architecture, CATMIP can be used on systems ranging from large CPU-based HPC environments to single servers with GPU acceleration and everything in between.

HECC↗