Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python 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 559 records · Page 31

A New Era of H-O-C-S Magma Solubility Modeling: Better, Faster, Stronger

H 2 O, CO 2 , and S are the most abundant volatiles in magmatic systems and are critical to understanding magma storage, phase equilibria, and volcanic eruptions. Models that consider all three of these components, however, may not allow for critical examination and adjustment of assumptions underlying the model, or provide benchmark testing or extensible interfaces. Thus, understanding why models produce different results can be challenging. We have gathered authors of established (D-Compress) and recent (VolFe, EVo, Sulfur_X, MAGEC) H-O-C-S volatile solubility models to work together to understand how and why our models diverge. We present a series of benchmark basalt degassing scenarios revealing that often understated model assumptions such as fO 2 buffer equations, fO 2 -Fe 3+ /ΣFe relationships, and even major element normalization routines have outsized effects on model results. All models consider S 2- and S 6+ melt species but with different approaches to sulfate/sulfide capacities, partition coefficients, and species fugacities, leading to divergence in the evolution of modeled gas compositions, melt S and Fe speciation, and fO 2 , with the extent of divergence depending on melt composition. Such scenarios enable meaningful intercomparison of existing models and lay the groundwork for a user-friendly yet powerful solubility modeling framework. Given our wealth of existing solubility literature, we suggest that the field of magmatic volatiles should focus now on the creation of modern tools and the modular implementation of existing model equations or methods, and that the evaluation of code usability, transparency, and benchmarking should be codified pillars of the peer-review process. As an example of such an endeavor, we present early work coupling these sulfur solubility models with VESIcal, an extensible and rigorously tested python library containing seven existing H 2 O-CO 2 solubility models. VESIcal includes the ability to extract, edit, and even interchange assumptions underlying any model. For example, users may combine or swap separately published H 2 O, CO 2 , and S models, as well as underlying model choices, such as Equations of State and redox models.

volatiles in magmas↗

Benchmark Exercise for the Control Rod Swelling Evaluation

The VTR core has six reactivity control assemblies and three safety assemblies. The control assemblies or primary control rods are adjusted during the normal operation to balance the core reactivity and to control the reactor power. A typical control assembly radial layout is presented in Figure 1. The figure shows the swelled absorber (B 4 C) rod. Initially, helium gas fills the gap between the pin and the cladding before irradiation swelling takes place. For VTR, HT9 steel was selected as the cladding and duct material. The main neutron absorbing material used in the VTR is B 4 C. When residing in the core, the neutronics, thermophysical, and mechanical properties of the materials used in a control assembly will degrade due to accumulated neutron damage. Material degradation limits how long a control assembly can reside in the core. Many phenomena affect the control assembly lifetime, such as the loss of reactivity worth due to B 4 C depletion, the mechanical interaction of the absorber rod and the cladding due to B 4 C swelling, the helium gas buildup in the pin due to B-10 capture, etc. B 4 C swelling, which causes closure of the gap between the absorber rod and the cladding, is usually considered as the main limiting factor from past experience. An initial study was conducted at PNNL to evaluate the irradiation behavior of a VTR control assembly. The evaluation was performed using the CNRD2 code that was initially developed for the FFTF. The study also included an assessment of the VTR control assembly and focused on a 61-pin control assembly design, which is different from that used (37-pin design) in the core design study. The study conducted by PNNL was reviewed independently by ANL. A Python script referred to as the Control Assembly Evaluation Script (CAES) was developed for the independent review and additional assessment of 37-pin control assembly design. The script has focused on the assessment of the absorber rod swelling for its importance in determining the control assembly lifetime. CAES uses geometry, neutronics, materials data as input to predict the swelling of the absorber rod during its residence in the reactor core. The results from CAES showed some non-negligible differences against the PNNL results. Some of the differences can be attributed to the different interpretation of the control rod assembly dimensions. To resolve this issue, a benchmark exercise was proposed. The benchmark specification was developed by PNNL. The benchmark exercise was performed independently at PNNL and ANL using different codes/scripts (CRND2 and CAES). This memo documents the results calculated using the different codes. However, this report is limited to presenting the results obtained. Further investigation of the cause of the observed difference will be performed as part of future activities, pending continuation of the VTR program.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

sparse_bias

This is a python package used to fit an unknown function from data that potential contains systematic biases related to metadata. The model fits the unknown function and uses a Bayesian horseshoe prior model to impose sparsity on the bias terms. This code has been generalized from research code developed for AIACHNE into a package that should have more general application in a wider class of statistical models.

Walton, Noah↗

Python Codebase and Jupyter Notebooks - Applications of Machine Learning Techniques to Geothermal Play Fairway Analysis in the Great Basin Region, Nevada

Git archive containing Python modules and resources used to generate machine-learning models used in the "Applications of Machine Learning Techniques to Geothermal Play Fairway Analysis in the Great Basin Region, Nevada" project. This software is licensed as free to use, modify, and distribute with attribution. Full license details are included within the archive. See "documentation.zip" for setup instructions and file trees annotated with module descriptions.

Brown, Stephen↗

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)↗

TRINIDI (Time-of-Flight Resonance Imaging with Neutrons for Isotopic Density Inference)

This software is an open-source Python library that provides tools for processing hyperspectral neutron time-of-flight radiography data. This type of data allows material decomposed reconstructions to be generated with the use of material characteristic spectral responses and the algorithms provided in this code library. The software library will contain tools for pre-processing the neutron measurement data, estimating measurement system parameters, reconstructing material decomposed radiographs, and computing material decomposed computed tomography (CT). Furthermore, it will have capability to generate and process simulated neutron time-of-flight data with the goal of benchmarking and demonstrating the tools that are provided. The software will include thorough documentation and application examples.

Balke, Thilo↗

Battery Lifecycle Framework

The Battery Lifecycle (BLC) Framework is an open-source platform that provides tools to visualize and share battery data from material characterization, cell testing, manufacturing, and field testing through the technology development cycle. BLC has three components: data importers, a front-end for querying the data and creating visualizations, and an application programming interface to provide access to the data from Python. BLC has been deployed for tracking the development of a battery from the lab to a manufacturing line and systems installed in the field and for comparing studies of multiple cells of the same battery chemistry and configuration. The code was developed around Redash, a robust open-source extract-transform-load engine. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. SAND2021-4546 O

De Angelis, Valerio↗

Validation of MCNP Critical Benchmarks Models of Highly Enriched Uranium Cylinders

A new centralized repository of high-quality MCNP models of critical benchmark experiments is currently under development at Los Alamos National Laboratory (LANL). The benchmark experiments are described in the International Criticality Safety Benchmark Evaluation Project (ICSBEP) Handbook, and the initial set of benchmark models are derived from the Whisper Suite provided with MCNP6.2. This effort is a collaboration among the Nuclear Criticality Safety, Nuclear Data, and Monte Carlo code development/application organization at LANL. The objective is to create a current single LANL benchmark collection that includes the latest ICSBEP revision that has a formal review and revision process, is contained in an open- source repository, and utilizes new Python tools for improved input and output file review.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Differentiable Quantum Programming with Unbounded Loops

The emergence of variational quantum applications has led to the development of automatic differentiation techniques in quantum computing. Existing work has formulated differentiable quantum programming with bounded loops, providing a framework for scalable gradient calculation by quantum means for training quantum variational applications. However, promising parameterized quantum applications, e.g., quantum walk and unitary implementation, cannot be trained in the existing framework due to the natural involvement of unbounded loops. To fill in the gap, we provide the first differentiable quantum programming framework with unbounded loops, including a newly designed differentiation rule, code transformation, and their correctness proof. Technically, we introduce a randomized estimator for derivatives to deal with the infinite sum in the differentiation of unbounded loops, whose applicability in classical and probabilistic programming is also discussed. We implement our framework with Python and Q# and demonstrate a reasonable sample efficiency. Through extensive case studies, we showcase an exciting application of our framework in automatically identifying close-to-optimal parameters for several parameterized quantum applications.

Computer Science↗

PIO Tools

This is a set of utilities for reading and manipulating PIO files written in python and C++. These files are intended to be building blocks for other scripts / programs that will use them to do great things. The PIO format itself is described in LA-UR-05-7425 at page 102 and embodied in code LA-CC-05-052. In addition to reading the raw PIO files, the bundled utilities will expand variable that use a compressed sparse row notation

Swaminarayan, Sriram↗

A Community Convention for Ecological Forecasting: Output Files and Metadata Version 1.0

This paper summarizes the open community conventions developed by the Ecological Forecasting Initiative (EFI) for the common formatting and archiving of ecological forecasts and the metadata associated with these forecasts. Such open standards are intended to promote interoperability and facilitate forecast communication, distribution, validation, and synthesis. For output files, we first describe the convention conceptually in terms of global attributes, forecast dimensions, forecasted variables, and ancillary indicator variables. We then illustrate the application of this convention to the two file formats that are currently preferred by the EFI, netCDF (network common data form), and comma-separated values (CSV), but note that the convention is extensible to future formats. For metadata, EFI's convention identifies a subset of conventional metadata variables that are required (e.g., temporal resolution and output variables) but focuses on developing a framework for storing information about forecast uncertainty propagation, data assimilation, and model complexity, which aims to facilitate cross-forecast synthesis. The initial application of this convention expands upon the Ecological Metadata Language (EML), a commonly used metadata standard in ecology. To facilitate community adoption, we also provide a Github repository containing a metadata validator tool and several vignettes in R and Python on how to both write and read in the EFI standard. Lastly, we provide guidance on forecast archiving, making an important distinction between short-term dissemination and long-term forecast archiving, while also touching on the archiving of code and workflows. Overall, the EFI convention is a living document that can continue to evolve over time through an open community process.

Michael C. Dietze↗

Validation of MCNP Critical Benchmark Models of Moderated Highly Enriched Uranium Slabs

A new centralized repository of high-quality MCNP models of critical benchmark experiments is currently under development at Los Alamos National Laboratory (LANL). The benchmark experiments are described in the International Criticality Safety Benchmark Evaluation Project (ICSBEP) Handbook, and the initial set of benchmark models are derived from the Whisper Suite provided with MCNP6.2. This effort is a collaboration among the Nuclear Criticality Safety, Nuclear Data, and Monte Carlo code development/application organizations at LANL. The goal is to build a single LANL benchmark collection that is up to date with the latest ICSBEP revision, has a formal review and revision process, is contained in an open-source repository, and utilizes new Python tools for improved input and output file review. This paper describes the validation of the models associated with HEU-MET-FAST-007, “Uranium Metal Slabs Moderated with Polyethylene, Plexiglas, and Teflon”. The Monte Carlo n-Particle (MCNP) models were compared to the second revision of HEU-MET-FAST-007. The experiment considered critical configurations of highly enriched uranium (HEU) metal slabs and various moderators in 43 unique cases. The slabs of uranium were separated by layers of moderating material, forming an assembly. The assembly was separated in two halves with one half placed on a stationary table and the other attached to a moveable table that could be raised and lowered via pulleys connected to the ceiling of the shielded room. To reach criticality, the two halves were brought together with a negligible gap between the assemblies.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

A Python Script to Read MCNP6.3 Surface-Source Files

This report provides a Python script to read an MCNP ® surface source file created with the SSW card with SYM = 0 (i.e., the default symmetry treatment). For background: the general format of an MCNP surface-source file is described in; however, that document did not provide coding and/or a tool to interrogate such files. The current format will not be given in this document other than through the record-read statements necessary for the script to function. The reader capability in this report is augmented with the ability to directly write a couple demonstrative outputs: 1. A comma-separated value (CSV) file containing particle phase-space state information and 2. A Matplotlib histogram of the energy distribution of the particles. This report also describes accompanying verification work that shows the script performing as required with MCNP6.2, MCNP6.3, and (expected) MCNP6.4 surface-source files. However, users of the enclosed script must still verify that the script is behaving correctly for their own work.

97 MATHEMATICS AND COMPUTING↗

Radiative interaction of atmosphere and surface: write up with elements of code

In passive satellite remote sensing of the Earth, separation of the path radiance (atmosphere-only contribution) from the surface reflection remains a “significant challenge”. Recent literature names it among the gaps in radiative transfer (RT) topics that “require continued research in the near future”. The challenge comes from multiple reflections (bouncing) between the atmosphere and surface – radiative interaction. In this paper we use a known RT technique, the matrix-operator method (MOM), and a new modification of the monochromatic vector RT (vRT) code IPOL (Intensity and POLarization) to simulate the interaction of a plane-parallel atmosphere and a few widely used surface reflection models. Following the idea of the Green’s function method, IPOL no longer takes the surface model parameters on input. Instead, it provides the path radiance, and the atmospheric reflection and transmission matrices as output. Despite many RT codes use the MOM formalism, this output does not seem common. The surface reflection matrix is computed externally. Therefore, this paper extends the Green’s function atmospheric correction technique to the case of polarized light. Aiming clarity rather than performance, we explain in Python the structure of the surface matrices for the isotropic (Lambertian), directional unpolarized, and polarized ocean reflection models. We then combine these surface matrices and the precomputed IPOL output to get numerically accurate signal at the top of atmosphere (TOA) and test it vs. published benchmarks. Then, for each benchmark scenario we show how to get the surface from the TOA signal, i.e. perform the RT-based atmospheric correction.

radiative transfer↗

Developments in SRW Code and Sirepo Framework Supporting Simulation of Time-Dependent Coherent X-ray Scattering Experiments

Physical optics simulations for beamlines and experiments are essential for the effective use of synchrotron light source facilities such as NSLS-II at BNL. The SRW software package supports such source-to-detector simulations for coherent X-ray scattering and imaging experiments through its Python interface and Sirepo browser-based graphical user interface. This allows one to define custom sample models, assess the feasibility of an experiment, and estimate most appropriate beamline settings before using valuable beamtime. We discuss the recent use of general-purpose GPU resources and coherent mode decomposition algorithms in SRW to accelerate physical optics simulations with partially coherent X-rays. To illustrate these new capabilities, we describe simulations of typical time series of partially coherent scattering images used in X-ray Photon Correlation Spectroscopy (XPCS) experiments; aiming to characterize the nanoscale dynamics of a disordered sample, representing a solution of nanoparticles undergoing Brownian diffusion.

36 MATERIALS SCIENCE↗

BuildingsBench: A Benchmark for Universal Building Load Forecasting [SWR-23-51]

The residential and commercial building stock in the United States is responsible for a significant percentage of energy consumption and greenhouse gas emissions. Electrification of end-uses, as well as decarbonizing the electrical grid through renewable energy sources such as solar and wind, constitutes the pathway to zero-emission buildings. Forecasting day-ahead building energy consumption is an integral part of this solution. Currently, specialized forecasting models are hand-made for each individual building, which is time-consuming, expensive, and leads to duplicated efforts. BuildingsBench is a Python software framework for training and comparing generalized machine learning models for universal building load forecasting. This challenge tasks a single foundational model to generalize its forecasts for a wide variety of buildings, across geographic regions, building types, weather patterns, and more. This software provide code for pre-training such models and subsequently evaluating their performance on a suite of hundreds of diverse real and synthetic buildings. BuildingsBench is a platform for: - Large-scale pretraining with the synthetic Buildings-900K dataset for short-term load forecasting (STLF). Buildings-900K is statistically representative of the entire U.S. building stock and is extracted from the NREL End-Use Load Profiles database. - Benchmarking on two tasks evaluating generalization: zero-shot STLF and transfer learning for STLF. We provide an index-based PyTorch Dataset for large-scale pretraining, easy data loading for multiple real building energy consumption datasets as PyTorch Tensors or Pandas DataFrames, simple (persistence) to advanced (transformer) baselines, metrics management, and more.

Emami, Patrick↗

The Nuclear System-of-Systems Capabilities Analytic Process

This dissertation discusses the impetus for, development of, and initial demonstration of NuSCAPTM: the Nuclear System-of-Systems Capabilities Analytic Process TM . NuSCAP is an approach executed via a Python® application that enables capabilities-based vulnerability analyses of military systems of systems (SOS) exposed to prompt nuclear weapon effects. The NuSCAP application calls on industry-standard, fast-running nuclear weapon effects tools and the Monte Carlo N-Particle®1 (MCNP®) code to evaluate the impact of nuclear weapon environments on the military capabilities of a complex and networked SOS.

45 MILITARY TECHNOLOGY, WEAPONRY, AND NATIONAL DEF↗

Dataset for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States"

This dataset contains all code for calibrating and analyzing machine learning models for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States". Please unzip the folders and follow the instructions from 'README.txt'. Required python modulessklearn=1.2.2numpy=1.23.3xgboost=2.0.2joblib=1.2.0 Required R libraryshapFlex:devtools::install_github("nredell/shapFlex")library(shapFlex)

Dave, Hari [Civil and Environmental Engineering De↗